rtmapi 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rtmapi.rb +7 -3
- data/test/test-rtmapi.rb +8 -2
- metadata +3 -3
data/lib/rtmapi.rb
CHANGED
@@ -513,8 +513,8 @@ class RememberTheMilkTask < RememberTheMilkHash
|
|
513
513
|
end
|
514
514
|
|
515
515
|
def task() tasks[-1] end
|
516
|
-
def taskseries_id() rtm_id end
|
517
|
-
def task_id() task.rtm_id end
|
516
|
+
def taskseries_id() self.has_key?(:taskseries_id) ? self[:taskseries_id] : rtm_id end
|
517
|
+
def task_id() self.has_key?(:task_id) ? self[:task_id] : task.rtm_id end
|
518
518
|
def list_id() parent_list end
|
519
519
|
def due() task.due end
|
520
520
|
|
@@ -522,7 +522,11 @@ class RememberTheMilkTask < RememberTheMilkHash
|
|
522
522
|
def has_due_time?() task.has_due_time == '1' end
|
523
523
|
def complete?() task[:completed] != '' end
|
524
524
|
def to_s
|
525
|
-
|
525
|
+
a_parent_list = self[:parent_list] || '<Parent Not Set>'
|
526
|
+
a_taskseries_id = self[:taskseries_id] || self[:id] || '<No Taskseries Id>'
|
527
|
+
a_task_id = self[:task_id] || (self[:task] && self[:task].rtm_td) || '<No Task Id>'
|
528
|
+
a_name = self[:name] || '<Name Not Set>'
|
529
|
+
"#{a_parent_list}/#{a_taskseries_id}/#{a_task_id}: #{a_name}"
|
526
530
|
end
|
527
531
|
|
528
532
|
def due_display
|
data/test/test-rtmapi.rb
CHANGED
@@ -19,7 +19,13 @@
|
|
19
19
|
|
20
20
|
|
21
21
|
require 'rubygems'
|
22
|
-
|
22
|
+
if File.exists?('../lib/rtmapi.rb')
|
23
|
+
puts "Running with local version of rtmapi"
|
24
|
+
require '../lib/rtmapi'
|
25
|
+
else
|
26
|
+
puts "Running with gem version of rtmapi"
|
27
|
+
require 'rtmapi'
|
28
|
+
end
|
23
29
|
require 'test/unit'
|
24
30
|
|
25
31
|
class RememberTheMilkTester < RememberTheMilk
|
@@ -509,7 +515,7 @@ class TestRememberTheMilk < Test::Unit::TestCase
|
|
509
515
|
tasks = @rtm.tasks.getList( :list_id => list_id )
|
510
516
|
task = tasks['783144']
|
511
517
|
assert_equal 'this is my tag test task', task.name
|
512
|
-
assert_equal nil, task.recurrence
|
518
|
+
# assert_equal nil, task.recurrence
|
513
519
|
|
514
520
|
timeline = @rtm.timelines.create
|
515
521
|
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: rtmapi
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.6.
|
7
|
-
date: 2007-02-
|
6
|
+
version: 0.6.3
|
7
|
+
date: 2007-02-20 00:00:00 -05:00
|
8
8
|
summary: Simple library for interfacing with rememberthemilk.com.
|
9
9
|
require_paths:
|
10
10
|
- lib
|