omnifocus 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data.tar.gz.sig +0 -0
  2. data/History.txt +7 -0
  3. data/Rakefile +1 -1
  4. data/lib/omnifocus.rb +16 -19
  5. metadata +67 -19
  6. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ === 1.3.1 / 2011-02-18
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * Refactored. Extracted into walk_queue_deep
6
+ * Updated to mechanize 1.0.x! No more WWW! YAY!
7
+
1
8
  === 1.3.0 / 2009-10-10
2
9
 
3
10
  * 1 minor enhancement:
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ Hoe.spec "omnifocus" do
9
9
  developer "Ryan Davis", "ryand-ruby@zenspider.com"
10
10
 
11
11
  extra_deps << ["rb-appscript", "~> 0.5.3"]
12
- extra_deps << ["mechanize", "~> 0.9.0"]
12
+ extra_deps << ["mechanize", "~> 1.0.0"]
13
13
 
14
14
  self.rubyforge_name = "seattlerb"
15
15
 
@@ -12,7 +12,7 @@ require 'appscript'
12
12
  # bts_id: a string uniquely identifying a task: SYSTEM(-projectname)?#id
13
13
 
14
14
  class OmniFocus
15
- VERSION = '1.3.0'
15
+ VERSION = '1.3.1'
16
16
 
17
17
  ##
18
18
  # bug_db = {
@@ -69,18 +69,23 @@ class OmniFocus
69
69
  @omnifocus
70
70
  end
71
71
 
72
- def all_folders
73
- queue = omnifocus.folders.get
74
- folders = []
72
+ def walk_queue_deep queue, msg
73
+ result = []
75
74
 
76
75
  until queue.empty? do
77
- folder = queue.shift
78
- folders << folder
79
- subfolders = folder.folders.get
80
- queue.push(*subfolders)
76
+ item = queue.shift
77
+ result << item
78
+ subitems = item.send(msg).get
79
+ queue.push(*subitems)
81
80
  end
82
81
 
83
- folders
82
+ result
83
+ end
84
+
85
+ def all_folders
86
+ queue = omnifocus.folders.get
87
+
88
+ walk_queue_deep queue, :folders
84
89
  end
85
90
 
86
91
  def all_projects
@@ -89,16 +94,8 @@ class OmniFocus
89
94
 
90
95
  def all_tasks
91
96
  queue = all_projects.map { |project| project.tasks.get }.flatten
92
- tasks = []
93
-
94
- until queue.empty? do
95
- task = queue.shift
96
- tasks << task
97
- subtasks = task.tasks.get
98
- queue.push(*subtasks)
99
- end
100
97
 
101
- tasks
98
+ walk_queue_deep queue, :tasks
102
99
  end
103
100
 
104
101
  ##
@@ -146,7 +143,7 @@ class OmniFocus
146
143
  # Returns the mechanize agent
147
144
 
148
145
  def mechanize
149
- @mechanize ||= WWW::Mechanize.new
146
+ @mechanize ||= Mechanize.new
150
147
  end
151
148
 
152
149
  ##
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnifocus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ hash: 25
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 3
9
+ - 1
10
+ version: 1.3.1
5
11
  platform: ruby
6
12
  authors:
7
13
  - Ryan Davis
@@ -30,39 +36,73 @@ cert_chain:
30
36
  FBHgymkyj/AOSqKRIpXPhjC6
31
37
  -----END CERTIFICATE-----
32
38
 
33
- date: 2009-10-11 00:00:00 -07:00
39
+ date: 2011-02-18 00:00:00 -08:00
34
40
  default_executable:
35
41
  dependencies:
36
42
  - !ruby/object:Gem::Dependency
37
43
  name: rb-appscript
38
- type: :runtime
39
- version_requirement:
40
- version_requirements: !ruby/object:Gem::Requirement
44
+ prerelease: false
45
+ requirement: &id001 !ruby/object:Gem::Requirement
46
+ none: false
41
47
  requirements:
42
48
  - - ~>
43
49
  - !ruby/object:Gem::Version
50
+ hash: 13
51
+ segments:
52
+ - 0
53
+ - 5
54
+ - 3
44
55
  version: 0.5.3
45
- version:
56
+ type: :runtime
57
+ version_requirements: *id001
46
58
  - !ruby/object:Gem::Dependency
47
59
  name: mechanize
48
- type: :runtime
49
- version_requirement:
50
- version_requirements: !ruby/object:Gem::Requirement
60
+ prerelease: false
61
+ requirement: &id002 !ruby/object:Gem::Requirement
62
+ none: false
51
63
  requirements:
52
64
  - - ~>
53
65
  - !ruby/object:Gem::Version
54
- version: 0.9.0
55
- version:
66
+ hash: 23
67
+ segments:
68
+ - 1
69
+ - 0
70
+ - 0
71
+ version: 1.0.0
72
+ type: :runtime
73
+ version_requirements: *id002
56
74
  - !ruby/object:Gem::Dependency
57
- name: hoe
75
+ name: minitest
76
+ prerelease: false
77
+ requirement: &id003 !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 11
83
+ segments:
84
+ - 2
85
+ - 0
86
+ - 2
87
+ version: 2.0.2
58
88
  type: :development
59
- version_requirement:
60
- version_requirements: !ruby/object:Gem::Requirement
89
+ version_requirements: *id003
90
+ - !ruby/object:Gem::Dependency
91
+ name: hoe
92
+ prerelease: false
93
+ requirement: &id004 !ruby/object:Gem::Requirement
94
+ none: false
61
95
  requirements:
62
96
  - - ">="
63
97
  - !ruby/object:Gem::Version
64
- version: 2.3.3
65
- version:
98
+ hash: 41
99
+ segments:
100
+ - 2
101
+ - 9
102
+ - 1
103
+ version: 2.9.1
104
+ type: :development
105
+ version_requirements: *id004
66
106
  description: Synchronizes bug tracking systems to omnifocus.
67
107
  email:
68
108
  - ryand-ruby@zenspider.com
@@ -95,21 +135,29 @@ rdoc_options:
95
135
  require_paths:
96
136
  - lib
97
137
  required_ruby_version: !ruby/object:Gem::Requirement
138
+ none: false
98
139
  requirements:
99
140
  - - ">="
100
141
  - !ruby/object:Gem::Version
142
+ hash: 3
143
+ segments:
144
+ - 0
101
145
  version: "0"
102
- version:
103
146
  required_rubygems_version: !ruby/object:Gem::Requirement
147
+ none: false
104
148
  requirements:
105
149
  - - ">="
106
150
  - !ruby/object:Gem::Version
151
+ hash: 25
152
+ segments:
153
+ - 1
154
+ - 3
155
+ - 1
107
156
  version: 1.3.1
108
- version:
109
157
  requirements: []
110
158
 
111
159
  rubyforge_project: seattlerb
112
- rubygems_version: 1.3.5
160
+ rubygems_version: 1.4.2
113
161
  signing_key:
114
162
  specification_version: 3
115
163
  summary: Synchronizes bug tracking systems to omnifocus.
metadata.gz.sig CHANGED
Binary file