Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

small cleanup (rdoc / license)

  • Loading branch information...
commit d38beac077d728e11ee19e8344956e1a154d98e0 1 parent ecea532
@jmettraux authored
View
124 Rakefile
@@ -5,46 +5,48 @@ require 'rake'
require 'rake/clean'
require 'rake/packagetask'
require 'rake/gempackagetask'
-require 'rake/rdoctask'
require 'rake/testtask'
+#require 'rake/rdoctask'
+require 'hanna/rdoctask'
-RUFUS_RTM_VERSION = '0.1'
+
+RUFUS_RTM_VERSION = '0.1.1'
#
# GEM SPEC
spec = Gem::Specification.new do |s|
- s.name = 'rufus-rtm'
- s.version = RUFUS_RTM_VERSION
- s.authors = [ 'John Mettraux' ]
- s.email = 'jmettraux@gmail.com'
- s.homepage = 'http://rufus.rubyforge.org/rufus-rtm'
- s.platform = Gem::Platform::RUBY
- s.summary = 'yet another RememberTheMilk wrapper'
- #s.license = 'MIT'
-
- s.require_path = 'lib'
- #s.autorequire = 'rufus-rtm'
- s.test_file = 'test/test.rb'
- s.has_rdoc = true
- s.extra_rdoc_files = [ 'README.txt' ]
-
- [ 'rufus-verbs' ].each do |d|
- s.requirements << d
- s.add_dependency d
- end
-
- files = FileList[ '{bin,docs,lib,test}/**/*' ]
- files.exclude 'rdoc'
- s.files = files.to_a
+ s.name = 'rufus-rtm'
+ s.version = RUFUS_RTM_VERSION
+ s.authors = [ 'John Mettraux' ]
+ s.email = 'jmettraux@gmail.com'
+ s.homepage = 'http://rufus.rubyforge.org/rufus-rtm'
+ s.platform = Gem::Platform::RUBY
+ s.summary = 'yet another RememberTheMilk wrapper'
+ #s.license = 'MIT'
+
+ s.require_path = 'lib'
+ #s.autorequire = 'rufus-rtm'
+ s.test_file = 'test/test.rb'
+ s.has_rdoc = true
+ s.extra_rdoc_files = [ 'README.txt' ]
+
+ [ 'rufus-verbs' ].each do |d|
+ s.requirements << d
+ s.add_dependency d
+ end
+
+ files = FileList[ '{bin,docs,lib,test}/**/*' ]
+ files.exclude 'html'
+ s.files = files.to_a
end
#
# tasks
-CLEAN.include('pkg', 'html', 'rdoc')
+CLEAN.include('pkg', 'html')
task :default => [ :clean, :repackage ]
@@ -53,68 +55,68 @@ task :default => [ :clean, :repackage ]
# TESTING
Rake::TestTask.new(:test) do |t|
- t.libs << 'test'
- t.test_files = FileList['test/test.rb']
- t.verbose = true
+ t.libs << 'test'
+ t.test_files = FileList['test/test.rb']
+ t.verbose = true
end
#
# PACKAGING
Rake::GemPackageTask.new(spec) do |pkg|
- #pkg.need_tar = true
+ #pkg.need_tar = true
end
Rake::PackageTask.new('rufus-rtm', RUFUS_RTM_VERSION) do |pkg|
- pkg.need_zip = true
- pkg.package_files = FileList[
- 'Rakefile',
- '*.txt',
- 'lib/**/*',
- 'test/**/*'
- ].to_a
- #pkg.package_files.delete("MISC.txt")
- class << pkg
- def package_name
- "#{@name}-#{@version}-src"
- end
+ pkg.need_zip = true
+ pkg.package_files = FileList[
+ 'Rakefile',
+ '*.txt',
+ 'lib/**/*',
+ 'test/**/*'
+ ].to_a
+ #pkg.package_files.delete("MISC.txt")
+ class << pkg
+ def package_name
+ "#{@name}-#{@version}-src"
end
+ end
end
#
# DOCUMENTATION
-#ALLISON=`allison --path`
-ALLISON='/Library/Ruby/Gems/1.8/gems/allison-2.0.3/lib/allison.rb'
-
Rake::RDocTask.new do |rd|
- rd.main = 'README.txt'
-
- rd.rdoc_dir = 'html/rufus-rtm'
-
- rd.rdoc_files.include(
- 'README.txt', 'CHANGELOG.txt', 'LICENSE.txt', 'lib/**/*.rb')
-
- rd.title = 'rufus-rtm rdoc'
-
- rd.options << '-N' # line numbers
- rd.options << '-S' # inline source
+ rd.main = 'README.txt'
+ rd.rdoc_dir = 'html/rufus-rtm'
+ rd.rdoc_files.include(
+ 'README.txt',
+ 'CHANGELOG.txt',
+ 'LICENSE.txt',
+ #'CREDITS.txt',
+ 'lib/**/*.rb')
+ #rd.rdoc_files.exclude('lib/tokyotyrant.rb')
+ rd.title = 'rufus-lua rtm'
+ rd.options << '-N' # line numbers
+ rd.options << '-S' # inline source
+end
- rd.template = ALLISON if File.exist?(ALLISON)
+task :rrdoc => :rdoc do
+ FileUtils.cp('doc/rdoc-style.css', 'html/rufus-rtm/')
end
#
# WEBSITE
-task :upload_website => [ :clean, :rdoc ] do
+task :upload_website => [ :clean, :rrdoc ] do
- account = 'jmettraux@rubyforge.org'
- webdir = '/var/www/gforge-projects/rufus'
+ account = 'jmettraux@rubyforge.org'
+ webdir = '/var/www/gforge-projects/rufus'
- sh "rsync -azv -e ssh html/rufus-rtm #{account}:#{webdir}/"
+ sh "rsync -azv -e ssh html/rufus-rtm #{account}:#{webdir}/"
end
View
320 doc/rdoc-style.css
@@ -0,0 +1,320 @@
+html, body {
+ height: 100%; }
+
+body {
+ font-family: Helvetica Neue, Helvetica, sans-serif;
+ font-size: 85%;
+ margin: 0;
+ padding: 0;
+ background: white;
+ color: black; }
+
+#wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -43px; }
+
+#footer-push {
+ height: 43px; }
+
+div.header, #footer {
+ background: #eee; }
+
+#footer {
+ border-top: 1px solid silver;
+ margin-top: 12px;
+ padding: 0 2em;
+ line-height: 30px;
+ text-align: center;
+ font-variant: small-caps;
+ font-size: 95%; }
+
+.clearing:after {
+ content: ".";
+ visibility: hidden;
+ height: 0;
+ display: block;
+ clear: both; }
+* html .clearing {
+ height: 1px; }
+.clearing *:first-child + html {
+ overflow: hidden; }
+
+h1, h2, h3, h4, h5, h6 {
+ margin: 0;
+ font-weight: normal; }
+
+a {
+ color: #0b3e71; }
+ a:hover {
+ background: #336699;
+ text-decoration: none;
+ color: #eef; }
+
+#diagram img {
+ border: 0; }
+
+#description a, .method .description a, .header a {
+ color: #336699; }
+ #description a:hover, .method .description a:hover, .header a:hover {
+ color: #eee; }
+#description h1 a, #description h2 a, #description h3 a, #description h4 a, #description h5 a, #description h6 a, .method .description h1 a, .method .description h2 a, .method .description h3 a, .method .description h4 a, .method .description h5 a, .method .description h6 a, .header h1 a, .header h2 a, .header h3 a, .header h4 a, .header h5 a, .header h6 a {
+ color: #0b3e71; }
+
+ol {
+ margin: 0;
+ padding: 0;
+ list-style: none; }
+ ol li {
+ margin-left: 0;
+ white-space: nowrap; }
+ ol li.other {
+ display: none; }
+
+ol.expanded li.other {
+ display: list-item; }
+
+table {
+ margin-bottom: 1em;
+ font-size: 1em;
+ border-collapse: collapse; }
+ table td, table th {
+ padding: .4em .8em; }
+ table thead {
+ background-color: #e8e8e8; }
+ table thead th {
+ font-variant: small-caps;
+ color: #666666; }
+ table tr {
+ border-bottom: 1px solid silver; }
+
+#index a.show, div.header a.show {
+ text-decoration: underline;
+ font-style: italic;
+ color: #666666; }
+ #index a.show:after, div.header a.show:after {
+ content: " ..."; }
+ #index a.show:hover, div.header a.show:hover {
+ color: black;
+ background: #ffe; }
+
+#index {
+ font: 85%/1.2 Helvetica neue, Helvetica, sans-serif; }
+ #index a {
+ text-decoration: none; }
+ #index h1 {
+ padding: .2em .5em .1em;
+ background: #ccc;
+ font: small-caps 1.2em Helvetica Neue, Helvetica, sans-serif;
+ color: #333;
+ border-bottom: 1px solid gray; }
+ #index form {
+ margin: 0;
+ padding: 0; }
+ #index form input {
+ margin: .4em;
+ margin-bottom: 0;
+ width: 90%; }
+ #index form #search.untouched {
+ color: #777777; }
+ #index ol {
+ padding: .4em .5em; }
+ #index ol li {
+ white-space: nowrap; }
+ #index #index-entries li a {
+ padding: 1px 2px; }
+ #index #index-entries.classes {
+ font-size: 1.1em; }
+ #index #index-entries.classes ol {
+ padding: 0; }
+ #index #index-entries.classes span.nodoc {
+ display: none; }
+ #index #index-entries.classes span.nodoc, #index #index-entries.classes a {
+ font-weight: bold; }
+ #index #index-entries.classes .parent {
+ font-weight: normal; }
+ #index #index-entries.methods li, #index #search-results.methods li {
+ margin-bottom: 0.2em; }
+ #index #index-entries.methods li a .method_name, #index #search-results.methods li a .method_name {
+ margin-right: 0.25em; }
+ #index #index-entries.methods li a .module_name, #index #search-results.methods li a .module_name {
+ color: #666666; }
+ #index #index-entries.methods li a:hover .module_name, #index #search-results.methods li a:hover .module_name {
+ color: #ddd; }
+
+div.header {
+ font-size: 80%;
+ padding: .5em 2%;
+ font-family: Helvetica, sans-serif;
+ border-bottom: 1px solid silver; }
+ div.header .name {
+ font-size: 1.6em;
+ font-family: Helvetica, sans-serif; }
+ div.header .name .type {
+ color: #666666;
+ font-size: 80%;
+ font-variant: small-caps; }
+ div.header h1.name {
+ font-size: 2.2em; }
+ div.header .paths, div.header .last-update, div.header .parent {
+ color: #666666; }
+ div.header .last-update .datetime {
+ color: #484848; }
+ div.header .parent {
+ margin-top: .3em; }
+ div.header .parent strong {
+ font-weight: normal;
+ color: #484848; }
+
+#content {
+ padding: 12px 2%; }
+ div.class #content {
+ position: relative;
+ width: 72%; }
+ #content pre, #content .method .synopsis {
+ font: 14px Monaco, DejaVu Sans Mono , Bitstream Vera Sans Mono , Courier New , monospace; }
+ #content pre {
+ color: black;
+ background: #eee;
+ border: 1px solid silver;
+ padding: .5em .8em;
+ overflow: auto; }
+ #content p code, #content p tt, #content li code, #content li tt, #content dl code, #content dl tt {
+ font: 14px Monaco, DejaVu Sans Mono , Bitstream Vera Sans Mono , Courier New , monospace;
+ background: #ffffe3;
+ padding: 2px 3px;
+ line-height: 1.4; }
+ #content h1 code, #content h1 tt, #content h2 code, #content h2 tt, #content h3 code, #content h3 tt, #content h4 code, #content h4 tt, #content h5 code, #content h5 tt, #content h6 code, #content h6 tt {
+ font-size: 1.1em; }
+ #content #text {
+ position: relative; }
+ #content #description p {
+ margin-top: .5em; }
+ #content #description h1, #content #description h2, #content #description h3, #content #description h4, #content #description h5, #content #description h6 {
+ font-family: Helvetica Neue, Helvetica, sans-serif; }
+ #content #description h1 {
+ font-size: 2.2em;
+ margin-bottom: .2em;
+ border-bottom: 3px double #d8d8d8;
+ padding-bottom: .1em; }
+ #content #description h2 {
+ font-size: 1.8em;
+ color: #0e3062;
+ margin: .8em 0 .3em 0; }
+ #content #description h3 {
+ font-size: 1.6em;
+ margin: .8em 0 .3em 0;
+ color: #666666; }
+ #content #description h4 {
+ font-size: 1.4em;
+ margin: .8em 0 .3em 0; }
+ #content #description h5 {
+ font-size: 1.2em;
+ margin: .8em 0 .3em 0;
+ color: #0e3062; }
+ #content #description h6 {
+ font-size: 1.0em;
+ margin: .8em 0 .3em 0;
+ color: #666666; }
+ #content #description ul, #content #description ol, #content .method .description ul, #content .method .description ol {
+ margin: .8em 0;
+ padding-left: 1.5em; }
+ #content #description ol, #content .method .description ol {
+ list-style: decimal; }
+ #content #description ol li, #content .method .description ol li {
+ white-space: normal; }
+
+#method-list {
+ position: absolute;
+ top: 0px;
+ right: -33%;
+ width: 28%;
+ background: #eee;
+ border: 1px solid silver;
+ padding: .4em 1%;
+ overflow: hidden; }
+ #method-list h2 {
+ font-size: 1.3em; }
+ #method-list h3 {
+ font-variant: small-caps;
+ text-transform: capitalize;
+ font-family: Helvetica Neue, Helvetica, sans-serif;
+ color: #666;
+ font-size: 1.1em; }
+ #method-list ol {
+ padding: 0 0 .5em .5em; }
+
+#context {
+ border-top: 1px dashed silver;
+ margin-top: 1em;
+ margin-bottom: 1em; }
+
+#context h2, #section h2 {
+ font: small-caps 1.2em Helvetica Neue, Helvetica, sans-serif;
+ color: #444;
+ margin: 1em 0 .2em 0; }
+
+#methods .method {
+ border: 1px solid silver;
+ margin-top: .5em;
+ background: #eee; }
+ #methods .method .synopsis {
+ color: black;
+ background: silver;
+ padding: .2em 1em; }
+ #methods .method .synopsis .name {
+ font-weight: bold; }
+ #methods .method .synopsis a {
+ text-decoration: none; }
+ #methods .method .description {
+ padding: 0 1em; }
+ #methods .method .description pre {
+ background: #f8f8f8; }
+ #methods .method .source {
+ margin: .5em 0; }
+ #methods .method .source-toggle {
+ font-size: 85%;
+ margin-left: 1em; }
+#methods .public-class {
+ background: #ffffe4; }
+#methods .public-instance .synopsis {
+ color: #eee;
+ background: #336699; }
+
+#content .method .source pre {
+ font-size: 90%;
+ background: #262626;
+ color: #ffdead;
+ margin: 1em;
+ padding: 0.5em;
+ border: 1px dashed #999;
+ overflow: auto; }
+ #content .method .source pre .ruby-constant {
+ color: #7fffd4;
+ background: transparent; }
+ #content .method .source pre .ruby-keyword {
+ color: #00ffff;
+ background: transparent; }
+ #content .method .source pre .ruby-ivar {
+ color: #eedd82;
+ background: transparent; }
+ #content .method .source pre .ruby-operator {
+ color: #00ffee;
+ background: transparent; }
+ #content .method .source pre .ruby-identifier {
+ color: #ffdead;
+ background: transparent; }
+ #content .method .source pre .ruby-node {
+ color: #ffa07a;
+ background: transparent; }
+ #content .method .source pre .ruby-comment {
+ color: #b22222;
+ font-weight: bold;
+ background: transparent; }
+ #content .method .source pre .ruby-regexp {
+ color: #ffa07a;
+ background: transparent; }
+ #content .method .source pre .ruby-value {
+ color: #7fffd4;
+ background: transparent; }
View
3  lib/rufus-rtm.rb
@@ -0,0 +1,3 @@
+
+require 'rufus/rtm'
+
View
11 lib/rufus/rtm.rb
@@ -1,4 +1,3 @@
-#
#--
# Copyright (c) 2008-2009, John Mettraux, jmettraux@gmail.com
#
@@ -20,17 +19,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
-# (MIT license)
+# Made in Japan.
#++
-#
-#
-# John Mettraux
-#
-# Made in Japan
-#
-# 2008/02/07
-#
require 'rufus/rtm/base'
require 'rufus/rtm/credentials'
View
11 lib/rufus/rtm/base.rb
@@ -1,4 +1,3 @@
-#
#--
# Copyright (c) 2008-2009, John Mettraux, jmettraux@gmail.com
#
@@ -20,17 +19,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
-# (MIT license)
+# Made in Japan.
#++
-#
-#
-# John Mettraux
-#
-# Made in Japan
-#
-# 2008/02/07
-#
require 'rubygems'
require 'rufus/verbs'
View
11 lib/rufus/rtm/credentials.rb
@@ -1,4 +1,3 @@
-#
#--
# Copyright (c) 2008-2009, John Mettraux, jmettraux@gmail.com
#
@@ -20,17 +19,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
-# (MIT license)
+# Made in Japan.
#++
-#
-#
-# John Mettraux
-#
-# Made in Japan
-#
-# 2008/02/07
-#
module Rufus::RTM
View
149 lib/rufus/rtm/resources.rb
@@ -1,4 +1,3 @@
-#
#--
# Copyright (c) 2008-2009, John Mettraux, jmettraux@gmail.com
#
@@ -20,17 +19,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
-# (MIT license)
+# Made in Japan.
#++
-#
-#
-# John Mettraux
-#
-# Made in Japan
-#
-# 2008/02/07
-#
module Rufus::RTM
@@ -63,61 +54,61 @@ def save!
protected
- #
- # a class method for listing attributes that can be found
- # in the hash reply coming from RTM...
- #
- def self.milk_attr (*att_names) #:nodoc:
-
- att_names.each do |att_name|
- class_eval %{
- def #{att_name}
- @hsh['#{att_name}']
- end
- }
- end
+ #
+ # a class method for listing attributes that can be found
+ # in the hash reply coming from RTM...
+ #
+ def self.milk_attr (*att_names) #:nodoc:
+
+ att_names.each do |att_name|
+ class_eval %{
+ def #{att_name}
+ @hsh['#{att_name}']
+ end
+ }
end
+ end
- #
- # Calls the milk() method (interacts with the RTM API).
- #
- def self.execute (method_name, args={})
+ #
+ # Calls the milk() method (interacts with the RTM API).
+ #
+ def self.execute (method_name, args={})
- args[:method] = "rtm.#{resource_name}.#{method_name}"
+ args[:method] = "rtm.#{resource_name}.#{method_name}"
- Rufus::RTM.milk(args)
- end
+ Rufus::RTM.milk(args)
+ end
- #
- # Returns the name of the resource as the API knows it
- # (for example 'tasks' or 'lists').
- #
- def self.resource_name
+ #
+ # Returns the name of the resource as the API knows it
+ # (for example 'tasks' or 'lists').
+ #
+ def self.resource_name
- self.to_s.split('::')[-1].downcase + 's'
- end
+ self.to_s.split('::')[-1].downcase + 's'
+ end
- #
- # Simply calls the timeline() class method.
- #
- def timeline
+ #
+ # Simply calls the timeline() class method.
+ #
+ def timeline
- MilkResource.timeline
- end
+ MilkResource.timeline
+ end
- #
- # Returns the current timeline (fetches one if none has yet
- # been prepared).
- #
- def self.timeline
+ #
+ # Returns the current timeline (fetches one if none has yet
+ # been prepared).
+ #
+ def self.timeline
- @timeline ||= Rufus::RTM.get_timeline
- end
+ @timeline ||= Rufus::RTM.get_timeline
+ end
- def queue_operation (method_name, args)
+ def queue_operation (method_name, args)
- @operations << [ method_name, args ]
- end
+ @operations << [ method_name, args ]
+ end
end
#
@@ -225,41 +216,41 @@ def self.add! (name, list_id=nil)
protected
- def prepare_api_args
- {
- :timeline => timeline,
- :list_id => list_id,
- :taskseries_id => taskseries_id,
- :task_id => task_id
- }
- end
+ def prepare_api_args
+ {
+ :timeline => timeline,
+ :list_id => list_id,
+ :taskseries_id => taskseries_id,
+ :task_id => task_id
+ }
+ end
- def self.parse_tasks (o)
+ def self.parse_tasks (o)
- o = if o.is_a?(Hash)
+ o = if o.is_a?(Hash)
- r = o[resource_name]
- o = r if r
- o['list']
- end
+ r = o[resource_name]
+ o = r if r
+ o['list']
+ end
- o = [ o ] unless o.is_a?(Array)
- # Nota bene : not the same thing as o = Array(o)
+ o = [ o ] unless o.is_a?(Array)
+ # Nota bene : not the same thing as o = Array(o)
- o.inject([]) do |r, h|
+ o.inject([]) do |r, h|
- list_id = h['id']
- s = h['taskseries']
- r += parse_taskseries(list_id, s) if s
- r
- end
+ list_id = h['id']
+ s = h['taskseries']
+ r += parse_taskseries(list_id, s) if s
+ r
end
+ end
- def self.parse_taskseries (list_id, o)
+ def self.parse_taskseries (list_id, o)
- o = [ o ] unless o.is_a?(Array)
- o.collect { |s| self.new list_id, s }
- end
+ o = [ o ] unless o.is_a?(Array)
+ o.collect { |s| self.new(list_id, s) }
+ end
end
class List < MilkResource
Please sign in to comment.
Something went wrong with that request. Please try again.