Skip to content

Commit

Permalink
switched from rdoc to yard
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed Sep 2, 2009
1 parent a0edf5a commit 6196f20
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 385 deletions.
90 changes: 45 additions & 45 deletions README.txt
Expand Up @@ -4,7 +4,7 @@


== getting it == getting it


sudo gem install -y rufus-rtm sudo gem install -y rufus-rtm


or at or at


Expand All @@ -26,80 +26,80 @@ You have to apply for the first two ones at http://www.rememberthemilk.com/servi


Once you have the API key and the shared secret, you have to get the frob and the auth token. Fire your 'irb' and Once you have the API key and the shared secret, you have to get the frob and the auth token. Fire your 'irb' and


>> require 'rubygems' >> require 'rubygems'
>> require 'rufus/rtm' >> require 'rufus/rtm'


please visit this URL with your browser and then hit 'enter' : please visit this URL with your browser and then hit 'enter' :


http://www.rememberthemilk.com/services/auth/?api_sig=70036e47c38da170fee431f04e29e8f0&frob=fa794036814b78fddf3e5641fe7c37f80e7d91fc&perms=delete&api_key=7f07e4fc5a944bf8c02a7d1e45c79346 http://www.rememberthemilk.com/services/auth/?api_sig=70036e47c38da170fee431f04e29e8f0&frob=fa794036814b78fddf3e5641fe7c37f80e7d91fc&perms=delete&api_key=7f07e4fc5a944bf8c02a7d1e45c79346


visit, the given URL, you should finally be greeted by a message like "You have successfully authorized the application API Application. You may now close this window and continue the authentication process with the application that sent you here.", hit enter... visit, the given URL, you should finally be greeted by a message like "You have successfully authorized the application API Application. You may now close this window and continue the authentication process with the application that sent you here.", hit enter...


ok, now getting auth token... ok, now getting auth token...


here are your RTM_FROB and RTM_AUTH_TOKEN, make sure to place them here are your RTM_FROB and RTM_AUTH_TOKEN, make sure to place them
in your environment : in your environment :


export RTM_FROB=3cef465718317b837eec2faeb5340fe777d55c7c export RTM_FROB=3cef465718317b837eec2faeb5340fe777d55c7c
export RTM_AUTH_TOKEN=ca0022d705ea1831543b7cdd2d7e3d707a0e1efb export RTM_AUTH_TOKEN=ca0022d705ea1831543b7cdd2d7e3d707a0e1efb


make then sure that all the 4 variables are set in the environment you use for running 'rufus-rtm'. make then sure that all the 4 variables are set in the environment you use for running 'rufus-rtm'.




== usage == usage


require 'rubygems' require 'rubygems'
require 'rufus/rtm' require 'rufus/rtm'


include Rufus::RTM include Rufus::RTM


# #
# listing tasks # listing tasks


tasks = Task.find tasks = Task.find
# finding all the tasks # finding all the tasks


tasks = Task.find :filter => "status:incomplete" tasks = Task.find :filter => "status:incomplete"
# finding all the incomplete tasks # finding all the incomplete tasks


tasks.each do |task| tasks.each do |task|


puts "task id #{task.task_id}" puts "task id #{task.task_id}"
puts " #{task.name} (#{task.tags.join(",")})" puts " #{task.name} (#{task.tags.join(",")})"
puts puts
end end


# #
# adding a task # adding a task


task = Task.add! "study this rufus-rtm gem" task = Task.add! "study this rufus-rtm gem"
# gets added to the 'Inbox' by default # gets added to the 'Inbox' by default


puts "task id is #{task.task_id}" puts "task id is #{task.task_id}"


# #
# enumerating lists # enumerating lists


lists = List.find lists = List.find


w = lists.find { |l| l.name == 'Work' } w = lists.find { |l| l.name == 'Work' }


puts "my Work list id is #{w.list_id}" puts "my Work list id is #{w.list_id}"


# #
# adding a task to a list # adding a task to a list


task = Task.add! "work, more work", w.list_id task = Task.add! "work, more work", w.list_id


# #
# completing a task # completing a task


task.complete! task.complete!


# #
# deleting a task # deleting a task


task.delete! task.delete!




Note that the methods that change the state of the Remember The Milk dataset have names ending with an exclamation mark. Note that the methods that change the state of the Remember The Milk dataset have names ending with an exclamation mark.
Expand All @@ -123,7 +123,7 @@ The gem 'rufus-verbs' (http://rufus.rubyforge.org/rufus-verbs)


On the rufus-ruby list[http://groups.google.com/group/rufus-ruby] : On the rufus-ruby list[http://groups.google.com/group/rufus-ruby] :


http://groups.google.com/group/rufus-ruby http://groups.google.com/group/rufus-ruby




== issue tracker == issue tracker
Expand All @@ -135,7 +135,7 @@ http://rubyforge.org/tracker/?atid=18584&group_id=4812&func=browse


http://github.com/jmettraux/rufus-rtm http://github.com/jmettraux/rufus-rtm


git clone git://github.com/jmettraux/rufus-rtm.git git clone git://github.com/jmettraux/rufus-rtm.git




== author == author
Expand Down
29 changes: 9 additions & 20 deletions Rakefile
Expand Up @@ -8,7 +8,7 @@ require 'rake/gempackagetask'
require 'rake/testtask' require 'rake/testtask'


#require 'rake/rdoctask' #require 'rake/rdoctask'
require 'hanna/rdoctask' #require 'hanna/rdoctask'




gemspec = File.read('rufus-rtm.gemspec') gemspec = File.read('rufus-rtm.gemspec')
Expand Down Expand Up @@ -73,31 +73,20 @@ end
# #
# DOCUMENTATION # DOCUMENTATION


Rake::RDocTask.new do |rd| task :rdoc do

sh %{
rd.main = 'README.txt' rm -fR rdoc
rd.rdoc_dir = 'html/rufus-rtm' yardoc 'lib/**/*.rb' \
rd.rdoc_files.include( -o html/rufus-rtm \
'README.txt', --title 'rufus-rtm'
'CHANGELOG.txt', }
'LICENSE.txt',
#'CREDITS.txt',
'lib/**/*.rb')
#rd.rdoc_files.exclude('lib/tokyotyrant.rb')
rd.title = 'rufus-rtm rdoc'
rd.options << '-N' # line numbers
rd.options << '-S' # inline source
end

task :rrdoc => :rdoc do
FileUtils.cp('doc/rdoc-style.css', 'html/rufus-rtm/')
end end




# #
# WEBSITE # WEBSITE


task :upload_website => [ :clean, :rrdoc ] do task :upload_website => [ :clean, :rdoc ] do


account = 'jmettraux@rubyforge.org' account = 'jmettraux@rubyforge.org'
webdir = '/var/www/gforge-projects/rufus' webdir = '/var/www/gforge-projects/rufus'
Expand Down

0 comments on commit 6196f20

Please sign in to comment.