rufus-rtm 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.txt +5 -3
- data/LICENSE.txt +1 -1
- data/README.txt +46 -46
- data/Rakefile +78 -0
- data/TODO.txt +4 -0
- data/lib/rufus/rtm.rb +1 -1
- data/lib/rufus/rtm/base.rb +21 -13
- data/lib/rufus/rtm/credentials.rb +1 -1
- data/lib/rufus/rtm/resources.rb +1 -11
- data/rufus-rtm.gemspec +62 -0
- data/test/tasks_test.rb +99 -0
- metadata +32 -16
data/CHANGELOG.txt
CHANGED
@@ -2,10 +2,12 @@
|
|
2
2
|
= rufus-rtm CHANGELOG.txt
|
3
3
|
|
4
4
|
|
5
|
-
== rufus-rtm - 0.
|
5
|
+
== rufus-rtm - 0.1.3 released 2010/01/24
|
6
6
|
|
7
|
-
-
|
8
|
-
|
7
|
+
- removed ugly World.include(Rufus::Verbs) (shame on me)
|
8
|
+
- ruby 1.9.x friendly
|
9
|
+
- removed evil "require 'rubygems'" from rufus/rtm/base.rb
|
10
|
+
- can now pass rtm key and secret via method params (Giorgio's request)
|
9
11
|
|
10
12
|
|
11
13
|
== rufus-rtm - 0.1 released 2008/02/14
|
data/LICENSE.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
Copyright (c) 2008, John Mettraux, jmettraux@gmail.com
|
2
|
+
Copyright (c) 2008-2010, John Mettraux, jmettraux@gmail.com
|
3
3
|
|
4
4
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.txt
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
== getting it
|
6
6
|
|
7
|
-
|
7
|
+
gem install rufus-rtm
|
8
8
|
|
9
9
|
or at
|
10
10
|
|
@@ -26,80 +26,80 @@ You have to apply for the first two ones at http://www.rememberthemilk.com/servi
|
|
26
26
|
|
27
27
|
Once you have the API key and the shared secret, you have to get the frob and the auth token. Fire your 'irb' and
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
>> require 'rubygems'
|
30
|
+
>> require 'rufus/rtm'
|
31
31
|
|
32
|
-
|
32
|
+
please visit this URL with your browser and then hit 'enter' :
|
33
33
|
|
34
|
-
|
34
|
+
http://www.rememberthemilk.com/services/auth/?api_sig=70036e47c38da170fee431f04e29e8f0&frob=fa794036814b78fddf3e5641fe7c37f80e7d91fc&perms=delete&api_key=7f07e4fc5a944bf8c02a7d1e45c79346
|
35
35
|
|
36
36
|
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...
|
37
37
|
|
38
|
-
|
38
|
+
ok, now getting auth token...
|
39
39
|
|
40
|
-
|
41
|
-
|
40
|
+
here are your RTM_FROB and RTM_AUTH_TOKEN, make sure to place them
|
41
|
+
in your environment :
|
42
42
|
|
43
|
-
|
44
|
-
|
43
|
+
export RTM_FROB=3cef465718317b837eec2faeb5340fe777d55c7c
|
44
|
+
export RTM_AUTH_TOKEN=ca0022d705ea1831543b7cdd2d7e3d707a0e1efb
|
45
45
|
|
46
46
|
make then sure that all the 4 variables are set in the environment you use for running 'rufus-rtm'.
|
47
47
|
|
48
48
|
|
49
49
|
== usage
|
50
50
|
|
51
|
-
|
52
|
-
|
51
|
+
require 'rubygems'
|
52
|
+
require 'rufus/rtm'
|
53
53
|
|
54
|
-
|
54
|
+
include Rufus::RTM
|
55
55
|
|
56
|
-
|
57
|
-
|
56
|
+
#
|
57
|
+
# listing tasks
|
58
58
|
|
59
|
-
|
60
|
-
|
59
|
+
tasks = Task.find
|
60
|
+
# finding all the tasks
|
61
61
|
|
62
|
-
|
63
|
-
|
62
|
+
tasks = Task.find :filter => "status:incomplete"
|
63
|
+
# finding all the incomplete tasks
|
64
64
|
|
65
|
-
|
65
|
+
tasks.each do |task|
|
66
66
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
67
|
+
puts "task id #{task.task_id}"
|
68
|
+
puts " #{task.name} (#{task.tags.join(",")})"
|
69
|
+
puts
|
70
|
+
end
|
71
71
|
|
72
|
-
|
73
|
-
|
72
|
+
#
|
73
|
+
# adding a task
|
74
74
|
|
75
|
-
|
76
|
-
|
75
|
+
task = Task.add! "study this rufus-rtm gem"
|
76
|
+
# gets added to the 'Inbox' by default
|
77
77
|
|
78
|
-
|
78
|
+
puts "task id is #{task.task_id}"
|
79
79
|
|
80
|
-
|
81
|
-
|
80
|
+
#
|
81
|
+
# enumerating lists
|
82
82
|
|
83
|
-
|
83
|
+
lists = List.find
|
84
84
|
|
85
|
-
|
85
|
+
w = lists.find { |l| l.name == 'Work' }
|
86
86
|
|
87
|
-
|
87
|
+
puts "my Work list id is #{w.list_id}"
|
88
88
|
|
89
|
-
|
90
|
-
|
89
|
+
#
|
90
|
+
# adding a task to a list
|
91
91
|
|
92
|
-
|
92
|
+
task = Task.add! "work, more work", w.list_id
|
93
93
|
|
94
|
-
|
95
|
-
|
94
|
+
#
|
95
|
+
# completing a task
|
96
96
|
|
97
|
-
|
97
|
+
task.complete!
|
98
98
|
|
99
|
-
|
100
|
-
|
99
|
+
#
|
100
|
+
# deleting a task
|
101
101
|
|
102
|
-
|
102
|
+
task.delete!
|
103
103
|
|
104
104
|
|
105
105
|
Note that the methods that change the state of the Remember The Milk dataset have names ending with an exclamation mark.
|
@@ -123,19 +123,19 @@ The gem 'rufus-verbs' (http://rufus.rubyforge.org/rufus-verbs)
|
|
123
123
|
|
124
124
|
On the rufus-ruby list[http://groups.google.com/group/rufus-ruby] :
|
125
125
|
|
126
|
-
|
126
|
+
http://groups.google.com/group/rufus-ruby
|
127
127
|
|
128
128
|
|
129
129
|
== issue tracker
|
130
130
|
|
131
|
-
http://
|
131
|
+
http://github.com/jmettraux/rufus-rtm/issues
|
132
132
|
|
133
133
|
|
134
134
|
== source
|
135
135
|
|
136
136
|
http://github.com/jmettraux/rufus-rtm
|
137
137
|
|
138
|
-
|
138
|
+
git clone git://github.com/jmettraux/rufus-rtm.git
|
139
139
|
|
140
140
|
|
141
141
|
== author
|
data/Rakefile
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
require 'lib/rufus/rtm/base.rb'
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'rake'
|
7
|
+
|
8
|
+
|
9
|
+
#
|
10
|
+
# CLEAN
|
11
|
+
|
12
|
+
require 'rake/clean'
|
13
|
+
CLEAN.include('pkg', 'tmp', 'html')
|
14
|
+
task :default => [ :clean ]
|
15
|
+
|
16
|
+
|
17
|
+
#
|
18
|
+
# GEM
|
19
|
+
|
20
|
+
require 'jeweler'
|
21
|
+
|
22
|
+
Jeweler::Tasks.new do |gem|
|
23
|
+
|
24
|
+
gem.version = Rufus::RTM::VERSION
|
25
|
+
gem.name = 'rufus-rtm'
|
26
|
+
gem.summary = 'yet another RememberTheMilk wrapper'
|
27
|
+
|
28
|
+
gem.description = %{
|
29
|
+
yet another RememberTheMilk wrapper
|
30
|
+
}
|
31
|
+
gem.email = 'jmettraux@gmail.com'
|
32
|
+
gem.homepage = 'http://github.com/jmettraux/rufus-rtm/'
|
33
|
+
gem.authors = [ 'John Mettraux' ]
|
34
|
+
gem.rubyforge_project = 'rufus'
|
35
|
+
|
36
|
+
gem.test_file = 'test/test.rb'
|
37
|
+
|
38
|
+
gem.add_dependency 'rufus-verbs', '>= 1.0.0'
|
39
|
+
gem.add_development_dependency 'yard', '>= 0'
|
40
|
+
|
41
|
+
# gemspec spec : http://www.rubygems.org/read/chapter/20
|
42
|
+
end
|
43
|
+
Jeweler::GemcutterTasks.new
|
44
|
+
|
45
|
+
|
46
|
+
#
|
47
|
+
# DOC
|
48
|
+
|
49
|
+
begin
|
50
|
+
|
51
|
+
require 'yard'
|
52
|
+
|
53
|
+
YARD::Rake::YardocTask.new do |doc|
|
54
|
+
doc.options = [
|
55
|
+
'-o', 'html/rufus-rtm', '--title',
|
56
|
+
"rufus-rtm #{Rufus::RTM::VERSION}"
|
57
|
+
]
|
58
|
+
end
|
59
|
+
|
60
|
+
rescue LoadError
|
61
|
+
|
62
|
+
task :yard do
|
63
|
+
abort "YARD is not available : sudo gem install yard"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
|
68
|
+
#
|
69
|
+
# TO THE WEB
|
70
|
+
|
71
|
+
task :upload_website => [ :clean, :yard ] do
|
72
|
+
|
73
|
+
account = 'jmettraux@rubyforge.org'
|
74
|
+
webdir = '/var/www/gforge-projects/rufus'
|
75
|
+
|
76
|
+
sh "rsync -azv -e ssh html/rufus-rtm #{account}:#{webdir}/"
|
77
|
+
end
|
78
|
+
|
data/TODO.txt
ADDED
data/lib/rufus/rtm.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2008-
|
2
|
+
# Copyright (c) 2008-2010, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/rufus/rtm/base.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2008-
|
2
|
+
# Copyright (c) 2008-2010, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -23,36 +23,45 @@
|
|
23
23
|
#++
|
24
24
|
|
25
25
|
|
26
|
-
require 'rubygems'
|
27
26
|
require 'rufus/verbs'
|
28
27
|
|
29
|
-
require 'json'
|
30
|
-
require 'md5'
|
28
|
+
require 'json' # gem install 'json' or 'json_pure'
|
31
29
|
|
32
|
-
|
30
|
+
begin
|
31
|
+
|
32
|
+
require 'md5'
|
33
|
+
|
34
|
+
def md5 (s)
|
35
|
+
MD5.md5(s).to_s
|
36
|
+
end
|
37
|
+
|
38
|
+
rescue LoadError # ruby 1.9.x
|
39
|
+
|
40
|
+
require 'digest/md5'
|
41
|
+
|
42
|
+
def md5 (s)
|
43
|
+
Digest::MD5.hexdigest(s)
|
44
|
+
end
|
45
|
+
end
|
33
46
|
|
34
47
|
|
35
48
|
module Rufus
|
36
49
|
module RTM
|
37
50
|
|
38
|
-
VERSION = '0.1.
|
51
|
+
VERSION = '0.1.3'
|
39
52
|
|
40
53
|
AUTH_ENDPOINT = "http://www.rememberthemilk.com/services/auth/"
|
41
54
|
REST_ENDPOINT = "http://api.rememberthemilk.com/services/rest/"
|
42
55
|
|
43
|
-
#
|
44
56
|
# Signs the RTM request (sets the 'api_sig' parameter).
|
45
57
|
#
|
46
58
|
def self.sign (params, secret) #:nodoc:
|
47
59
|
|
48
|
-
|
49
|
-
|
50
|
-
params['api_sig'] = sig.to_s
|
60
|
+
params['api_sig'] = md5(secret + params.sort.flatten.join)
|
51
61
|
|
52
62
|
params
|
53
63
|
end
|
54
64
|
|
55
|
-
#
|
56
65
|
# Calls an API method (milk the cow).
|
57
66
|
#
|
58
67
|
def self.milk (params={}) #:nodoc:
|
@@ -82,12 +91,11 @@ module RTM
|
|
82
91
|
|
83
92
|
sign(ps, secret)
|
84
93
|
|
85
|
-
res = get(endpoint, :query => ps)
|
94
|
+
res = Rufus::Verbs.get(endpoint, :query => ps)
|
86
95
|
|
87
96
|
JSON.parse(res.body)['rsp']
|
88
97
|
end
|
89
98
|
|
90
|
-
#
|
91
99
|
# Requests a timeline from RTM.
|
92
100
|
#
|
93
101
|
def self.get_timeline #:nodoc:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2008-
|
2
|
+
# Copyright (c) 2008-2010, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
data/lib/rufus/rtm/resources.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#--
|
2
|
-
# Copyright (c) 2008-
|
2
|
+
# Copyright (c) 2008-2010, John Mettraux, jmettraux@gmail.com
|
3
3
|
#
|
4
4
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
5
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -38,7 +38,6 @@ module Rufus::RTM
|
|
38
38
|
@operations = []
|
39
39
|
end
|
40
40
|
|
41
|
-
#
|
42
41
|
# Saves the instance back to RTM.
|
43
42
|
#
|
44
43
|
def save!
|
@@ -54,7 +53,6 @@ module Rufus::RTM
|
|
54
53
|
|
55
54
|
protected
|
56
55
|
|
57
|
-
#
|
58
56
|
# a class method for listing attributes that can be found
|
59
57
|
# in the hash reply coming from RTM...
|
60
58
|
#
|
@@ -69,7 +67,6 @@ module Rufus::RTM
|
|
69
67
|
end
|
70
68
|
end
|
71
69
|
|
72
|
-
#
|
73
70
|
# Calls the milk() method (interacts with the RTM API).
|
74
71
|
#
|
75
72
|
def self.execute (method_name, args={})
|
@@ -79,7 +76,6 @@ module Rufus::RTM
|
|
79
76
|
Rufus::RTM.milk(args)
|
80
77
|
end
|
81
78
|
|
82
|
-
#
|
83
79
|
# Returns the name of the resource as the API knows it
|
84
80
|
# (for example 'tasks' or 'lists').
|
85
81
|
#
|
@@ -88,7 +84,6 @@ module Rufus::RTM
|
|
88
84
|
self.to_s.split('::')[-1].downcase + 's'
|
89
85
|
end
|
90
86
|
|
91
|
-
#
|
92
87
|
# Simply calls the timeline() class method.
|
93
88
|
#
|
94
89
|
def timeline
|
@@ -96,7 +91,6 @@ module Rufus::RTM
|
|
96
91
|
MilkResource.timeline
|
97
92
|
end
|
98
93
|
|
99
|
-
#
|
100
94
|
# Returns the current timeline (fetches one if none has yet
|
101
95
|
# been prepared).
|
102
96
|
#
|
@@ -166,7 +160,6 @@ module Rufus::RTM
|
|
166
160
|
@tags = TagArray.new(self, h['tags'])
|
167
161
|
end
|
168
162
|
|
169
|
-
#
|
170
163
|
# Deletes the task.
|
171
164
|
#
|
172
165
|
def delete!
|
@@ -174,7 +167,6 @@ module Rufus::RTM
|
|
174
167
|
self.class.execute('delete', prepare_api_args)
|
175
168
|
end
|
176
169
|
|
177
|
-
#
|
178
170
|
# Marks the task as completed.
|
179
171
|
#
|
180
172
|
def complete!
|
@@ -182,7 +174,6 @@ module Rufus::RTM
|
|
182
174
|
self.class.execute('complete', prepare_api_args)
|
183
175
|
end
|
184
176
|
|
185
|
-
#
|
186
177
|
# Sets the tags for the task.
|
187
178
|
#
|
188
179
|
def tags= (tags)
|
@@ -199,7 +190,6 @@ module Rufus::RTM
|
|
199
190
|
parse_tasks(execute('getList', params))
|
200
191
|
end
|
201
192
|
|
202
|
-
#
|
203
193
|
# Adds a new task (and returns it).
|
204
194
|
#
|
205
195
|
def self.add! (name, list_id=nil)
|
data/rufus-rtm.gemspec
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{rufus-rtm}
|
8
|
+
s.version = "0.1.3"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["John Mettraux"]
|
12
|
+
s.date = %q{2010-01-24}
|
13
|
+
s.description = %q{
|
14
|
+
yet another RememberTheMilk wrapper
|
15
|
+
}
|
16
|
+
s.email = %q{jmettraux@gmail.com}
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.txt"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
"CHANGELOG.txt",
|
23
|
+
"LICENSE.txt",
|
24
|
+
"README.txt",
|
25
|
+
"Rakefile",
|
26
|
+
"TODO.txt",
|
27
|
+
"lib/rufus-rtm.rb",
|
28
|
+
"lib/rufus/rtm.rb",
|
29
|
+
"lib/rufus/rtm/base.rb",
|
30
|
+
"lib/rufus/rtm/credentials.rb",
|
31
|
+
"lib/rufus/rtm/resources.rb",
|
32
|
+
"rufus-rtm.gemspec",
|
33
|
+
"test/tasks_test.rb",
|
34
|
+
"test/test.rb"
|
35
|
+
]
|
36
|
+
s.homepage = %q{http://github.com/jmettraux/rufus-rtm/}
|
37
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
38
|
+
s.require_paths = ["lib"]
|
39
|
+
s.rubyforge_project = %q{rufus}
|
40
|
+
s.rubygems_version = %q{1.3.5}
|
41
|
+
s.summary = %q{yet another RememberTheMilk wrapper}
|
42
|
+
s.test_files = [
|
43
|
+
"test/test.rb"
|
44
|
+
]
|
45
|
+
|
46
|
+
if s.respond_to? :specification_version then
|
47
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
48
|
+
s.specification_version = 3
|
49
|
+
|
50
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
51
|
+
s.add_runtime_dependency(%q<rufus-verbs>, [">= 1.0.0"])
|
52
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
53
|
+
else
|
54
|
+
s.add_dependency(%q<rufus-verbs>, [">= 1.0.0"])
|
55
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
56
|
+
end
|
57
|
+
else
|
58
|
+
s.add_dependency(%q<rufus-verbs>, [">= 1.0.0"])
|
59
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
data/test/tasks_test.rb
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
|
2
|
+
#
|
3
|
+
# Testing rufus-rtm
|
4
|
+
#
|
5
|
+
# John Mettraux at openwfe.org
|
6
|
+
#
|
7
|
+
# Tue Feb 5 18:16:55 JST 2008
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'rubygems'
|
11
|
+
|
12
|
+
require 'test/unit'
|
13
|
+
|
14
|
+
$: << File.dirname(__FILE__) + '/../lib'
|
15
|
+
|
16
|
+
require 'rufus/rtm'
|
17
|
+
|
18
|
+
include Rufus::RTM
|
19
|
+
|
20
|
+
|
21
|
+
class TasksTest < Test::Unit::TestCase
|
22
|
+
|
23
|
+
#def setup
|
24
|
+
#end
|
25
|
+
|
26
|
+
#def teardown
|
27
|
+
#end
|
28
|
+
|
29
|
+
def test_0
|
30
|
+
|
31
|
+
taskname = "milk the cow #{Time.now.to_i}"
|
32
|
+
|
33
|
+
t0 = Task.add!(taskname)
|
34
|
+
|
35
|
+
assert_kind_of Task, t0
|
36
|
+
assert_equal taskname, t0.name
|
37
|
+
|
38
|
+
ts = Task.find
|
39
|
+
|
40
|
+
#puts "tasks : #{ts.size}"
|
41
|
+
|
42
|
+
t1 = ts.find { |t| t.task_id == t0.task_id }
|
43
|
+
assert_equal taskname, t1.name
|
44
|
+
assert_equal '', t1.tags.join(',')
|
45
|
+
|
46
|
+
ts = Task.find :filter => "status:incomplete"
|
47
|
+
|
48
|
+
#puts "incomplete tasks : #{ts.size}"
|
49
|
+
|
50
|
+
t1 = ts.find { |t| t.task_id == t0.task_id }
|
51
|
+
assert_equal taskname, t1.name
|
52
|
+
|
53
|
+
t1.delete!
|
54
|
+
|
55
|
+
ts = Task.find :filter => "status:incomplete"
|
56
|
+
|
57
|
+
t1 = ts.find { |t| t.task_id == t0.task_id }
|
58
|
+
assert_nil t1
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_1
|
62
|
+
|
63
|
+
lists = List.find
|
64
|
+
assert_not_nil(lists.find { |e| e.name == 'Inbox' })
|
65
|
+
|
66
|
+
work = lists.find { |e| e.name == 'Work' }
|
67
|
+
|
68
|
+
taskname = "more work #{Time.now.to_i}"
|
69
|
+
|
70
|
+
t0 = Task.add! taskname, work.list_id
|
71
|
+
|
72
|
+
tasks = Task.find :list_id => work.list_id, :filer => 'status:incomplete'
|
73
|
+
|
74
|
+
assert_not_nil(tasks.find { |t| t.task_id == t0.task_id })
|
75
|
+
|
76
|
+
t0.complete!
|
77
|
+
|
78
|
+
tasks = Task.find :list_id => work.list_id, :filer => 'status:completed'
|
79
|
+
assert_not_nil(tasks.find { |t| t.task_id == t0.task_id })
|
80
|
+
|
81
|
+
t0.delete!
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_2
|
85
|
+
|
86
|
+
key = ENV.delete('RTM_API_KEY')
|
87
|
+
secret = ENV.delete('RTM_SHARED_SECRET')
|
88
|
+
|
89
|
+
assert_raise RuntimeError do
|
90
|
+
lists = List.find
|
91
|
+
end
|
92
|
+
|
93
|
+
assert_not_nil List.find(:api_key => key, :shared_secret => secret)
|
94
|
+
|
95
|
+
ENV['RTM_API_KEY'] = key
|
96
|
+
ENV['RTM_SHARED_SECRET'] = secret
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rufus-rtm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
@@ -9,43 +9,59 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-24 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rufus-verbs
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.0.0
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: yard
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
19
29
|
version_requirements: !ruby/object:Gem::Requirement
|
20
30
|
requirements:
|
21
31
|
- - ">="
|
22
32
|
- !ruby/object:Gem::Version
|
23
33
|
version: "0"
|
24
34
|
version:
|
25
|
-
description:
|
35
|
+
description: "\n yet another RememberTheMilk wrapper\n "
|
26
36
|
email: jmettraux@gmail.com
|
27
37
|
executables: []
|
28
38
|
|
29
39
|
extensions: []
|
30
40
|
|
31
41
|
extra_rdoc_files:
|
42
|
+
- LICENSE.txt
|
32
43
|
- README.txt
|
44
|
+
files:
|
33
45
|
- CHANGELOG.txt
|
34
46
|
- LICENSE.txt
|
35
|
-
|
47
|
+
- README.txt
|
48
|
+
- Rakefile
|
49
|
+
- TODO.txt
|
50
|
+
- lib/rufus-rtm.rb
|
51
|
+
- lib/rufus/rtm.rb
|
36
52
|
- lib/rufus/rtm/base.rb
|
37
53
|
- lib/rufus/rtm/credentials.rb
|
38
54
|
- lib/rufus/rtm/resources.rb
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
- LICENSE.txt
|
43
|
-
- README.txt
|
55
|
+
- rufus-rtm.gemspec
|
56
|
+
- test/tasks_test.rb
|
57
|
+
- test/test.rb
|
44
58
|
has_rdoc: true
|
45
|
-
homepage: http://
|
46
|
-
|
47
|
-
rdoc_options: []
|
59
|
+
homepage: http://github.com/jmettraux/rufus-rtm/
|
60
|
+
licenses: []
|
48
61
|
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options:
|
64
|
+
- --charset=UTF-8
|
49
65
|
require_paths:
|
50
66
|
- lib
|
51
67
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -60,12 +76,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
76
|
- !ruby/object:Gem::Version
|
61
77
|
version: "0"
|
62
78
|
version:
|
63
|
-
requirements:
|
64
|
-
|
79
|
+
requirements: []
|
80
|
+
|
65
81
|
rubyforge_project: rufus
|
66
|
-
rubygems_version: 1.3.
|
82
|
+
rubygems_version: 1.3.5
|
67
83
|
signing_key:
|
68
|
-
specification_version:
|
84
|
+
specification_version: 3
|
69
85
|
summary: yet another RememberTheMilk wrapper
|
70
86
|
test_files:
|
71
87
|
- test/test.rb
|