toodledo 1.3.2 → 1.3.3

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/README.txt CHANGED
@@ -134,168 +134,4 @@ this instead:
134
134
  * toodledo
135
135
 
136
136
  == LICENSE:
137
- GNU LESSER GENERAL PUBLIC LICENSE
138
- Version 3, 29 June 2007
139
-
140
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
141
- Everyone is permitted to copy and distribute verbatim copies
142
- of this license document, but changing it is not allowed.
143
-
144
-
145
- This version of the GNU Lesser General Public License incorporates
146
- the terms and conditions of version 3 of the GNU General Public
147
- License, supplemented by the additional permissions listed below.
148
-
149
- 0. Additional Definitions.
150
-
151
- As used herein, "this License" refers to version 3 of the GNU Lesser
152
- General Public License, and the "GNU GPL" refers to version 3 of the GNU
153
- General Public License.
154
-
155
- "The Library" refers to a covered work governed by this License,
156
- other than an Application or a Combined Work as defined below.
157
-
158
- An "Application" is any work that makes use of an interface provided
159
- by the Library, but which is not otherwise based on the Library.
160
- Defining a subclass of a class defined by the Library is deemed a mode
161
- of using an interface provided by the Library.
162
-
163
- A "Combined Work" is a work produced by combining or linking an
164
- Application with the Library. The particular version of the Library
165
- with which the Combined Work was made is also called the "Linked
166
- Version".
167
-
168
- The "Minimal Corresponding Source" for a Combined Work means the
169
- Corresponding Source for the Combined Work, excluding any source code
170
- for portions of the Combined Work that, considered in isolation, are
171
- based on the Application, and not on the Linked Version.
172
-
173
- The "Corresponding Application Code" for a Combined Work means the
174
- object code and/or source code for the Application, including any data
175
- and utility programs needed for reproducing the Combined Work from the
176
- Application, but excluding the System Libraries of the Combined Work.
177
-
178
- 1. Exception to Section 3 of the GNU GPL.
179
-
180
- You may convey a covered work under sections 3 and 4 of this License
181
- without being bound by section 3 of the GNU GPL.
182
-
183
- 2. Conveying Modified Versions.
184
-
185
- If you modify a copy of the Library, and, in your modifications, a
186
- facility refers to a function or data to be supplied by an Application
187
- that uses the facility (other than as an argument passed when the
188
- facility is invoked), then you may convey a copy of the modified
189
- version:
190
-
191
- a) under this License, provided that you make a good faith effort to
192
- ensure that, in the event an Application does not supply the
193
- function or data, the facility still operates, and performs
194
- whatever part of its purpose remains meaningful, or
195
-
196
- b) under the GNU GPL, with none of the additional permissions of
197
- this License applicable to that copy.
198
-
199
- 3. Object Code Incorporating Material from Library Header Files.
200
-
201
- The object code form of an Application may incorporate material from
202
- a header file that is part of the Library. You may convey such object
203
- code under terms of your choice, provided that, if the incorporated
204
- material is not limited to numerical parameters, data structure
205
- layouts and accessors, or small macros, inline functions and templates
206
- (ten or fewer lines in length), you do both of the following:
207
-
208
- a) Give prominent notice with each copy of the object code that the
209
- Library is used in it and that the Library and its use are
210
- covered by this License.
211
-
212
- b) Accompany the object code with a copy of the GNU GPL and this license
213
- document.
214
-
215
- 4. Combined Works.
216
-
217
- You may convey a Combined Work under terms of your choice that,
218
- taken together, effectively do not restrict modification of the
219
- portions of the Library contained in the Combined Work and reverse
220
- engineering for debugging such modifications, if you also do each of
221
- the following:
222
-
223
- a) Give prominent notice with each copy of the Combined Work that
224
- the Library is used in it and that the Library and its use are
225
- covered by this License.
226
-
227
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
228
- document.
229
-
230
- c) For a Combined Work that displays copyright notices during
231
- execution, include the copyright notice for the Library among
232
- these notices, as well as a reference directing the user to the
233
- copies of the GNU GPL and this license document.
234
-
235
- d) Do one of the following:
236
-
237
- 0) Convey the Minimal Corresponding Source under the terms of this
238
- License, and the Corresponding Application Code in a form
239
- suitable for, and under terms that permit, the user to
240
- recombine or relink the Application with a modified version of
241
- the Linked Version to produce a modified Combined Work, in the
242
- manner specified by section 6 of the GNU GPL for conveying
243
- Corresponding Source.
244
-
245
- 1) Use a suitable shared library mechanism for linking with the
246
- Library. A suitable mechanism is one that (a) uses at run time
247
- a copy of the Library already present on the user's computer
248
- system, and (b) will operate properly with a modified version
249
- of the Library that is interface-compatible with the Linked
250
- Version.
251
-
252
- e) Provide Installation Information, but only if you would otherwise
253
- be required to provide such information under section 6 of the
254
- GNU GPL, and only to the extent that such information is
255
- necessary to install and execute a modified version of the
256
- Combined Work produced by recombining or relinking the
257
- Application with a modified version of the Linked Version. (If
258
- you use option 4d0, the Installation Information must accompany
259
- the Minimal Corresponding Source and Corresponding Application
260
- Code. If you use option 4d1, you must provide the Installation
261
- Information in the manner specified by section 6 of the GNU GPL
262
- for conveying Corresponding Source.)
263
-
264
- 5. Combined Libraries.
265
-
266
- You may place library facilities that are a work based on the
267
- Library side by side in a single library together with other library
268
- facilities that are not Applications and are not covered by this
269
- License, and convey such a combined library under terms of your
270
- choice, if you do both of the following:
271
-
272
- a) Accompany the combined library with a copy of the same work based
273
- on the Library, uncombined with any other library facilities,
274
- conveyed under the terms of this License.
275
-
276
- b) Give prominent notice with the combined library that part of it
277
- is a work based on the Library, and explaining where to find the
278
- accompanying uncombined form of the same work.
279
-
280
- 6. Revised Versions of the GNU Lesser General Public License.
281
-
282
- The Free Software Foundation may publish revised and/or new versions
283
- of the GNU Lesser General Public License from time to time. Such new
284
- versions will be similar in spirit to the present version, but may
285
- differ in detail to address new problems or concerns.
286
-
287
- Each version is given a distinguishing version number. If the
288
- Library as you received it specifies that a certain numbered version
289
- of the GNU Lesser General Public License "or any later version"
290
- applies to it, you have the option of following the terms and
291
- conditions either of that published version or of any later version
292
- published by the Free Software Foundation. If the Library as you
293
- received it does not specify a version number of the GNU Lesser
294
- General Public License, you may choose any version of the GNU Lesser
295
- General Public License ever published by the Free Software Foundation.
296
-
297
- If the Library as you received it specifies that a proxy can decide
298
- whether future versions of the GNU Lesser General Public License shall
299
- apply, that proxy's public statement of acceptance of any version is
300
- permanent authorization for you to choose that version for the
301
- Library.
137
+ GPL v3
data/lib/toodledo.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  module Toodledo
6
6
 
7
7
  # Required for gem
8
- VERSION = '1.3.2'
8
+ VERSION = '1.3.3'
9
9
 
10
10
  # Returns the configuration object.
11
11
  def self.get_config()
@@ -244,7 +244,7 @@ module Toodledo
244
244
  def read_token(user_id)
245
245
  token_path = get_token_file(user_id)
246
246
  unless token_path
247
- logger.debug("read_token: no token found for #{user_id.inspect}, returning nil")
247
+ logger.debug("read_token: no token found for #{user_id.inspect}, returning nil") if logger
248
248
  return nil
249
249
  end
250
250
 
@@ -263,7 +263,7 @@ module Toodledo
263
263
  expiration_time = Time.now - EXPIRATION_TIME_IN_SECS
264
264
  too_old = expiration_time - last_modified_time > 0
265
265
 
266
- logger.debug "is_too_old: time = #{last_modified_time}, expires = #{expiration_time}, too_old = #{too_old}"
266
+ logger.debug "is_too_old: time = #{last_modified_time}, expires = #{expiration_time}, too_old = #{too_old}" if logger
267
267
 
268
268
  return too_old
269
269
  end
@@ -288,7 +288,7 @@ module Toodledo
288
288
 
289
289
  # Writes the token file to the filesystem.
290
290
  def write_token(user_id, token)
291
- logger.debug("write_token: user_id = #{user_id.inspect}, token = #{token.inspect}")
291
+ logger.debug("write_token: user_id = #{user_id.inspect}, token = #{token.inspect}") if logger
292
292
  token_path = File.expand_path(File.join(get_tokens_directory(), user_id))
293
293
  File.open(token_path, 'w') {|f| f.write(token) }
294
294
  end
@@ -347,7 +347,7 @@ module Toodledo
347
347
 
348
348
  lastdelete = result.elements['lastdelete'].text
349
349
  if (lastdelete != nil)
350
- logger.debug("lastdelete = #{lastdelete}")
350
+ logger.debug("lastdelete = #{lastdelete}") if logger
351
351
  last_deleted_date = DateTime.strptime(lastdelete, fmt)
352
352
  else
353
353
  last_deleted_date = nil
data/lib/toodledo/task.rb CHANGED
@@ -239,8 +239,8 @@ module Toodledo
239
239
  startdate = Date.strptime(startdate, Session::DATE_FORMAT)
240
240
  end
241
241
 
242
- status = el.elements['status'].text
243
- status = Status::NONE if (status == '0')
242
+ status = el.elements['status'].text.to_i
243
+ status = Status::NONE if (status == 0)
244
244
 
245
245
  star = (el.elements['star'].text.to_i == 1)
246
246
 
@@ -296,4 +296,4 @@ module Toodledo
296
296
 
297
297
  end
298
298
 
299
- end
299
+ end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toodledo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 3
8
+ - 3
9
+ version: 1.3.3
5
10
  platform: ruby
6
11
  authors:
7
12
  - Will Sargent
@@ -9,49 +14,73 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-02-16 00:00:00 -08:00
17
+ date: 2010-10-04 00:00:00 -07:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: cmdparse
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ">="
22
26
  - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
23
29
  version: "0"
24
- version:
30
+ type: :runtime
31
+ version_requirements: *id001
25
32
  - !ruby/object:Gem::Dependency
26
33
  name: highline
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
34
+ prerelease: false
35
+ requirement: &id002 !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - ">="
32
38
  - !ruby/object:Gem::Version
39
+ segments:
40
+ - 0
33
41
  version: "0"
34
- version:
42
+ type: :runtime
43
+ version_requirements: *id002
35
44
  - !ruby/object:Gem::Dependency
36
- name: flexmock
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
37
56
  type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
57
+ version_requirements: *id003
58
+ - !ruby/object:Gem::Dependency
59
+ name: flexmock
60
+ prerelease: false
61
+ requirement: &id004 !ruby/object:Gem::Requirement
40
62
  requirements:
41
63
  - - ">="
42
64
  - !ruby/object:Gem::Version
65
+ segments:
66
+ - 0
43
67
  version: "0"
44
- version:
68
+ type: :development
69
+ version_requirements: *id004
45
70
  - !ruby/object:Gem::Dependency
46
71
  name: hoe
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
72
+ prerelease: false
73
+ requirement: &id005 !ruby/object:Gem::Requirement
50
74
  requirements:
51
75
  - - ">="
52
76
  - !ruby/object:Gem::Version
53
- version: 2.4.0
54
- version:
77
+ segments:
78
+ - 2
79
+ - 6
80
+ - 2
81
+ version: 2.6.2
82
+ type: :development
83
+ version_requirements: *id005
55
84
  description: |-
56
85
  == DESCRIPTION:
57
86
 
@@ -131,18 +160,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
131
160
  requirements:
132
161
  - - ">="
133
162
  - !ruby/object:Gem::Version
163
+ segments:
164
+ - 0
134
165
  version: "0"
135
- version:
136
166
  required_rubygems_version: !ruby/object:Gem::Requirement
137
167
  requirements:
138
168
  - - ">="
139
169
  - !ruby/object:Gem::Version
170
+ segments:
171
+ - 0
140
172
  version: "0"
141
- version:
142
173
  requirements: []
143
174
 
144
175
  rubyforge_project: toodledo
145
- rubygems_version: 1.3.5
176
+ rubygems_version: 1.3.6
146
177
  signing_key:
147
178
  specification_version: 3
148
179
  summary: A command line client and API to Toodledo