toodledo 1.3.5 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +14 -0
- data/{README.txt → README.md} +61 -48
- data/Rakefile +60 -18
- data/lib/toodledo.rb +5 -4
- data/lib/toodledo/command_line/client.rb +893 -840
- data/lib/toodledo/command_line/parser_helper.rb +24 -1
- data/lib/toodledo/command_line/task_formatter.rb +174 -150
- data/lib/toodledo/priority.rb +1 -0
- data/lib/toodledo/repeat.rb +2 -0
- data/lib/toodledo/server_error.rb +17 -0
- data/lib/toodledo/session.rb +53 -18
- data/lib/toodledo/status.rb +37 -35
- data/lib/toodledo/task.rb +8 -3
- data/lib/toodledo/version.rb +11 -0
- data/test/client_test.rb +60 -12
- data/test/helper.rb +11 -0
- data/test/parser_helper_test.rb +36 -6
- data/test/session_test.rb +221 -39
- data/test/toodledo_functional_test.rb +33 -7
- data/toodledo.gemspec +97 -0
- metadata +35 -60
- data/Manifest.txt +0 -41
- data/lib/toodledo/item_not_found_error.rb +0 -8
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
$: << File.expand_path(File.dirname(__FILE__) + "/../lib")
|
3
|
-
require 'test/unit'
|
4
|
-
require 'toodledo'
|
1
|
+
require 'helper'
|
5
2
|
|
6
3
|
=begin
|
7
4
|
This is a functional test suite that runs against Toodledo and verifies that
|
@@ -23,11 +20,36 @@ class ToodledoFunctionalTest < Test::Unit::TestCase
|
|
23
20
|
# proxy = { 'host' => '127.0.0.1', 'port' => '8080'}
|
24
21
|
proxy = nil
|
25
22
|
|
26
|
-
logger = Logger.new(STDOUT)
|
27
|
-
logger.level = Logger::DEBUG
|
23
|
+
@logger = Logger.new(STDOUT)
|
24
|
+
@logger.level = Logger::DEBUG
|
28
25
|
|
29
|
-
@session = Session.new(@user_id, @password, logger, @app_id)
|
26
|
+
@session = Session.new(@user_id, @password, @logger, @app_id)
|
30
27
|
@session.connect(base_url, proxy)
|
28
|
+
remove_old_fixtures
|
29
|
+
end
|
30
|
+
|
31
|
+
# In case an old test aborted and left crud in the testing account
|
32
|
+
def remove_old_fixtures
|
33
|
+
contexts = @session.get_contexts
|
34
|
+
contexts.each do |context|
|
35
|
+
@logger.debug "Remove old context #{context.name}, id #{context.server_id}"
|
36
|
+
@session.delete_context(context.server_id)
|
37
|
+
end
|
38
|
+
goals = @session.get_goals
|
39
|
+
goals.each do |goal|
|
40
|
+
@logger.debug "Remove old goal #{goal.name}, id #{goal.server_id}"
|
41
|
+
@session.delete_goal(goal.server_id)
|
42
|
+
end
|
43
|
+
folders = @session.get_folders
|
44
|
+
folders.each do |folder|
|
45
|
+
@logger.debug "Remove old folder #{folder.name}, id #{folder.server_id}"
|
46
|
+
@session.delete_folder(folder.server_id)
|
47
|
+
end
|
48
|
+
tasks = @session.get_tasks
|
49
|
+
tasks.each do |task|
|
50
|
+
@logger.debug "Remove old task #{task.title}, id #{task.server_id}"
|
51
|
+
@session.delete_task(task.server_id)
|
52
|
+
end
|
31
53
|
end
|
32
54
|
|
33
55
|
def teardown
|
@@ -120,6 +142,10 @@ class ToodledoFunctionalTest < Test::Unit::TestCase
|
|
120
142
|
|
121
143
|
folders = @session.get_folders()
|
122
144
|
assert_not_nil folders
|
145
|
+
@logger.debug "After add folder: #{folders.length} folders exist:"
|
146
|
+
folders.each_with_index do |folder, i|
|
147
|
+
@logger.debug " #{i}. Folder #{folder.name}, id #{folder.server_id}"
|
148
|
+
end
|
123
149
|
assert folders.length == 1
|
124
150
|
folder = folders[0]
|
125
151
|
|
data/toodledo.gemspec
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{toodledo}
|
8
|
+
s.version = "1.3.8"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = [%q{Will Sargent}]
|
12
|
+
s.date = %q{2011-06-28}
|
13
|
+
s.description = %q{This is a Ruby API and client for http://toodledo.com, a task management
|
14
|
+
website. It implements all of the calls from Toodledo's developer API, and
|
15
|
+
provides a nice wrapper around the functionality.
|
16
|
+
|
17
|
+
The client allows you to work with Toodledo from the command line. It will
|
18
|
+
work in either interactive or command line mode.
|
19
|
+
|
20
|
+
You can also use the client in your shell scripts, or use the API directly
|
21
|
+
as part of a web application. Custom private RSS feed? Want to have the Mac
|
22
|
+
read out your top priority? Input tasks through Quicksilver? Print out
|
23
|
+
tasks with a BetaBrite? It can all happen.
|
24
|
+
}
|
25
|
+
s.email = %q{will.sargent@gmail.com}
|
26
|
+
s.executables = [%q{toodledo}]
|
27
|
+
s.extra_rdoc_files = [
|
28
|
+
"README.md"
|
29
|
+
]
|
30
|
+
s.files = [
|
31
|
+
"History.txt",
|
32
|
+
"README.md",
|
33
|
+
"Rakefile",
|
34
|
+
"bin/toodledo",
|
35
|
+
"lib/toodledo.rb",
|
36
|
+
"lib/toodledo/command_line/add_command.rb",
|
37
|
+
"lib/toodledo/command_line/base_command.rb",
|
38
|
+
"lib/toodledo/command_line/client.rb",
|
39
|
+
"lib/toodledo/command_line/complete_command.rb",
|
40
|
+
"lib/toodledo/command_line/context_formatter.rb",
|
41
|
+
"lib/toodledo/command_line/delete_command.rb",
|
42
|
+
"lib/toodledo/command_line/edit_command.rb",
|
43
|
+
"lib/toodledo/command_line/folder_formatter.rb",
|
44
|
+
"lib/toodledo/command_line/goal_formatter.rb",
|
45
|
+
"lib/toodledo/command_line/hotlist_command.rb",
|
46
|
+
"lib/toodledo/command_line/interactive_command.rb",
|
47
|
+
"lib/toodledo/command_line/list_contexts_command.rb",
|
48
|
+
"lib/toodledo/command_line/list_folders_command.rb",
|
49
|
+
"lib/toodledo/command_line/list_goals_command.rb",
|
50
|
+
"lib/toodledo/command_line/list_tasks_by_context_command.rb",
|
51
|
+
"lib/toodledo/command_line/list_tasks_command.rb",
|
52
|
+
"lib/toodledo/command_line/parser_helper.rb",
|
53
|
+
"lib/toodledo/command_line/setup_command.rb",
|
54
|
+
"lib/toodledo/command_line/stdin_command.rb",
|
55
|
+
"lib/toodledo/command_line/task_formatter.rb",
|
56
|
+
"lib/toodledo/context.rb",
|
57
|
+
"lib/toodledo/folder.rb",
|
58
|
+
"lib/toodledo/goal.rb",
|
59
|
+
"lib/toodledo/invalid_configuration_error.rb",
|
60
|
+
"lib/toodledo/priority.rb",
|
61
|
+
"lib/toodledo/repeat.rb",
|
62
|
+
"lib/toodledo/server_error.rb",
|
63
|
+
"lib/toodledo/session.rb",
|
64
|
+
"lib/toodledo/status.rb",
|
65
|
+
"lib/toodledo/task.rb",
|
66
|
+
"lib/toodledo/version.rb",
|
67
|
+
"test/client_test.rb",
|
68
|
+
"test/helper.rb",
|
69
|
+
"test/parser_helper_test.rb",
|
70
|
+
"test/session_test.rb",
|
71
|
+
"test/toodledo_functional_test.rb",
|
72
|
+
"toodledo.gemspec"
|
73
|
+
]
|
74
|
+
s.homepage = %q{http://github.com/wsargent/toodledo}
|
75
|
+
s.require_paths = [%q{lib}]
|
76
|
+
s.rubygems_version = %q{1.8.5}
|
77
|
+
s.summary = %q{A command line client and API to Toodledo}
|
78
|
+
|
79
|
+
if s.respond_to? :specification_version then
|
80
|
+
s.specification_version = 3
|
81
|
+
|
82
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
83
|
+
s.add_runtime_dependency(%q<cmdparse>, [">= 0"])
|
84
|
+
s.add_runtime_dependency(%q<highline>, [">= 0"])
|
85
|
+
s.add_development_dependency(%q<flexmock>, [">= 0"])
|
86
|
+
else
|
87
|
+
s.add_dependency(%q<cmdparse>, [">= 0"])
|
88
|
+
s.add_dependency(%q<highline>, [">= 0"])
|
89
|
+
s.add_dependency(%q<flexmock>, [">= 0"])
|
90
|
+
end
|
91
|
+
else
|
92
|
+
s.add_dependency(%q<cmdparse>, [">= 0"])
|
93
|
+
s.add_dependency(%q<highline>, [">= 0"])
|
94
|
+
s.add_dependency(%q<flexmock>, [">= 0"])
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toodledo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 11
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 3
|
8
|
-
-
|
9
|
-
version: 1.3.
|
9
|
+
- 8
|
10
|
+
version: 1.3.8
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Will Sargent
|
@@ -14,16 +15,17 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
-
default_executable:
|
18
|
+
date: 2011-06-28 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: cmdparse
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
24
25
|
requirements:
|
25
26
|
- - ">="
|
26
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
27
29
|
segments:
|
28
30
|
- 0
|
29
31
|
version: "0"
|
@@ -33,81 +35,53 @@ dependencies:
|
|
33
35
|
name: highline
|
34
36
|
prerelease: false
|
35
37
|
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
36
39
|
requirements:
|
37
40
|
- - ">="
|
38
41
|
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
39
43
|
segments:
|
40
44
|
- 0
|
41
45
|
version: "0"
|
42
46
|
type: :runtime
|
43
47
|
version_requirements: *id002
|
44
|
-
- !ruby/object:Gem::Dependency
|
45
|
-
name: rubyforge
|
46
|
-
prerelease: false
|
47
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
48
|
-
requirements:
|
49
|
-
- - ">="
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
segments:
|
52
|
-
- 2
|
53
|
-
- 0
|
54
|
-
- 4
|
55
|
-
version: 2.0.4
|
56
|
-
type: :development
|
57
|
-
version_requirements: *id003
|
58
48
|
- !ruby/object:Gem::Dependency
|
59
49
|
name: flexmock
|
60
50
|
prerelease: false
|
61
|
-
requirement: &
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
62
53
|
requirements:
|
63
54
|
- - ">="
|
64
55
|
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
65
57
|
segments:
|
66
58
|
- 0
|
67
59
|
version: "0"
|
68
60
|
type: :development
|
69
|
-
version_requirements: *
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - ">="
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
segments:
|
78
|
-
- 2
|
79
|
-
- 6
|
80
|
-
- 2
|
81
|
-
version: 2.6.2
|
82
|
-
type: :development
|
83
|
-
version_requirements: *id005
|
84
|
-
description: |-
|
85
|
-
== DESCRIPTION:
|
86
|
-
|
87
|
-
This is a Ruby API and client for http://toodledo.com, a task management
|
88
|
-
website. It implements all of the calls from Toodledo's developer API, and
|
61
|
+
version_requirements: *id003
|
62
|
+
description: |
|
63
|
+
This is a Ruby API and client for http://toodledo.com, a task management
|
64
|
+
website. It implements all of the calls from Toodledo's developer API, and
|
89
65
|
provides a nice wrapper around the functionality.
|
90
66
|
|
91
67
|
The client allows you to work with Toodledo from the command line. It will
|
92
68
|
work in either interactive or command line mode.
|
93
69
|
|
94
70
|
You can also use the client in your shell scripts, or use the API directly
|
95
|
-
as part of a web application. Custom private RSS feed? Want to have the Mac
|
71
|
+
as part of a web application. Custom private RSS feed? Want to have the Mac
|
96
72
|
read out your top priority? Input tasks through Quicksilver? Print out
|
97
73
|
tasks with a BetaBrite? It can all happen.
|
98
|
-
|
74
|
+
|
75
|
+
email: will.sargent@gmail.com
|
99
76
|
executables:
|
100
77
|
- toodledo
|
101
78
|
extensions: []
|
102
79
|
|
103
80
|
extra_rdoc_files:
|
104
|
-
-
|
105
|
-
- Manifest.txt
|
106
|
-
- README.txt
|
81
|
+
- README.md
|
107
82
|
files:
|
108
83
|
- History.txt
|
109
|
-
-
|
110
|
-
- README.txt
|
84
|
+
- README.md
|
111
85
|
- Rakefile
|
112
86
|
- bin/toodledo
|
113
87
|
- lib/toodledo.rb
|
@@ -135,50 +109,51 @@ files:
|
|
135
109
|
- lib/toodledo/folder.rb
|
136
110
|
- lib/toodledo/goal.rb
|
137
111
|
- lib/toodledo/invalid_configuration_error.rb
|
138
|
-
- lib/toodledo/item_not_found_error.rb
|
139
112
|
- lib/toodledo/priority.rb
|
140
113
|
- lib/toodledo/repeat.rb
|
141
114
|
- lib/toodledo/server_error.rb
|
142
115
|
- lib/toodledo/session.rb
|
143
116
|
- lib/toodledo/status.rb
|
144
117
|
- lib/toodledo/task.rb
|
118
|
+
- lib/toodledo/version.rb
|
145
119
|
- test/client_test.rb
|
120
|
+
- test/helper.rb
|
146
121
|
- test/parser_helper_test.rb
|
147
122
|
- test/session_test.rb
|
148
123
|
- test/toodledo_functional_test.rb
|
149
|
-
|
150
|
-
homepage: http://
|
124
|
+
- toodledo.gemspec
|
125
|
+
homepage: http://github.com/wsargent/toodledo
|
151
126
|
licenses: []
|
152
127
|
|
153
128
|
post_install_message:
|
154
|
-
rdoc_options:
|
155
|
-
|
156
|
-
- README.txt
|
129
|
+
rdoc_options: []
|
130
|
+
|
157
131
|
require_paths:
|
158
132
|
- lib
|
159
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
160
135
|
requirements:
|
161
136
|
- - ">="
|
162
137
|
- !ruby/object:Gem::Version
|
138
|
+
hash: 3
|
163
139
|
segments:
|
164
140
|
- 0
|
165
141
|
version: "0"
|
166
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
167
144
|
requirements:
|
168
145
|
- - ">="
|
169
146
|
- !ruby/object:Gem::Version
|
147
|
+
hash: 3
|
170
148
|
segments:
|
171
149
|
- 0
|
172
150
|
version: "0"
|
173
151
|
requirements: []
|
174
152
|
|
175
|
-
rubyforge_project:
|
176
|
-
rubygems_version: 1.
|
153
|
+
rubyforge_project:
|
154
|
+
rubygems_version: 1.8.5
|
177
155
|
signing_key:
|
178
156
|
specification_version: 3
|
179
157
|
summary: A command line client and API to Toodledo
|
180
|
-
test_files:
|
181
|
-
|
182
|
-
- test/parser_helper_test.rb
|
183
|
-
- test/session_test.rb
|
184
|
-
- test/toodledo_functional_test.rb
|
158
|
+
test_files: []
|
159
|
+
|
data/Manifest.txt
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
README.txt
|
4
|
-
Rakefile
|
5
|
-
bin/toodledo
|
6
|
-
lib/toodledo.rb
|
7
|
-
lib/toodledo/command_line/add_command.rb
|
8
|
-
lib/toodledo/command_line/base_command.rb
|
9
|
-
lib/toodledo/command_line/client.rb
|
10
|
-
lib/toodledo/command_line/complete_command.rb
|
11
|
-
lib/toodledo/command_line/context_formatter.rb
|
12
|
-
lib/toodledo/command_line/delete_command.rb
|
13
|
-
lib/toodledo/command_line/edit_command.rb
|
14
|
-
lib/toodledo/command_line/folder_formatter.rb
|
15
|
-
lib/toodledo/command_line/goal_formatter.rb
|
16
|
-
lib/toodledo/command_line/hotlist_command.rb
|
17
|
-
lib/toodledo/command_line/interactive_command.rb
|
18
|
-
lib/toodledo/command_line/list_contexts_command.rb
|
19
|
-
lib/toodledo/command_line/list_folders_command.rb
|
20
|
-
lib/toodledo/command_line/list_goals_command.rb
|
21
|
-
lib/toodledo/command_line/list_tasks_by_context_command.rb
|
22
|
-
lib/toodledo/command_line/list_tasks_command.rb
|
23
|
-
lib/toodledo/command_line/parser_helper.rb
|
24
|
-
lib/toodledo/command_line/setup_command.rb
|
25
|
-
lib/toodledo/command_line/stdin_command.rb
|
26
|
-
lib/toodledo/command_line/task_formatter.rb
|
27
|
-
lib/toodledo/context.rb
|
28
|
-
lib/toodledo/folder.rb
|
29
|
-
lib/toodledo/goal.rb
|
30
|
-
lib/toodledo/invalid_configuration_error.rb
|
31
|
-
lib/toodledo/item_not_found_error.rb
|
32
|
-
lib/toodledo/priority.rb
|
33
|
-
lib/toodledo/repeat.rb
|
34
|
-
lib/toodledo/server_error.rb
|
35
|
-
lib/toodledo/session.rb
|
36
|
-
lib/toodledo/status.rb
|
37
|
-
lib/toodledo/task.rb
|
38
|
-
test/client_test.rb
|
39
|
-
test/parser_helper_test.rb
|
40
|
-
test/session_test.rb
|
41
|
-
test/toodledo_functional_test.rb
|