omnifocus 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 736efe96b1222812da98464175ed830369fa7b935426516d2bc408f79a823fd5
4
- data.tar.gz: 5c607620f41f6bab752ea0566bc1fbaec1ff624d0ceca6b6829acc3772795024
3
+ metadata.gz: ddf124365ed5a5b3b49db9297322210bcd365be07a958b8d04c095367082a26a
4
+ data.tar.gz: eaa5696f26809287c533b6dc4dffdcb19839128fafb07d9e1d40b5bc1543815e
5
5
  SHA512:
6
- metadata.gz: 30021137f84365e0e9b18b36931c592473bc4c41acfab1d10ee4b7fb4dbd88c96541be49555bbe4887a8e97e3e3f850e22b3309eb9a8d1dcc7068a1b439967c8
7
- data.tar.gz: 4b28845beb951219077f85ad0e2491739e0584125560f49a35105473f4c5c494f89603c38e3e41eedd04a5bdf5c34d8b5b9902c245a982cc0edad2344caa868b
6
+ metadata.gz: fd581b4f1df8028d72b52eb5aa98ccd0e596b1d54309da10dc692f7f6b78735af92121bfd935301d95d62e16faf80f35c49e88b36cdc556d54ced436a7f51991
7
+ data.tar.gz: 63199ee6de77af1b367959445c897ab11c5bbe08eb9ed47bb9ab5e1eb70a40d5c4a1db3c72669ae2461792e0a3265455658d3882efe3db5d24d42bd7ffce719d
checksums.yaml.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,20 @@
1
+ === 2.7.0 / 2022-04-09
2
+
3
+ * 4 minor enhancements:
4
+
5
+ * Added #active qualifier
6
+ * Added all_active_tasks
7
+ * Added filtering to #all_subtasks.
8
+ * Added some cleanup to remove duplicate tasks (by ticket_id, first one wins).
9
+
10
+ * 5 bug fixes:
11
+
12
+ * Fix for CJK name support. (inevity)
13
+ * Fixed #non_dropped_project for newer omnifocus applescript changes.
14
+ * Fixed creating release/triage tasks for an existing project.
15
+ * Fixed filtering existing tasks, was ignoring '_' in project names and duplicating tasks.
16
+ * Force load all plugins in bin/of on start
17
+
1
18
  === 2.6.0 / 2020-02-12
2
19
 
3
20
  * 4 minor enhancements:
data/Rakefile CHANGED
@@ -20,7 +20,7 @@ Hoe.spec "omnifocus" do
20
20
  end
21
21
 
22
22
  def omnifocus cmd, options = nil
23
- inc = "-Ilib:../../omnifocus-github/dev/lib:../../omnifocus-redmine/dev/lib"
23
+ inc = "-Ilib:../../omnifocus-github/dev/lib"
24
24
 
25
25
  ruby "#{inc} bin/of #{cmd} #{options}"
26
26
  end
data/bin/of CHANGED
@@ -4,6 +4,7 @@ require 'rubygems'
4
4
  require 'omnifocus'
5
5
  require 'abbrev'
6
6
 
7
+ OmniFocus._load_plugins nil
7
8
  methods = OmniFocus.public_instance_methods(false).grep(/^cmd_/)
8
9
  methods.map! { |s| s[4..-1] }
9
10
 
data/lib/omnifocus.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  old_w, $-w = $-w, nil
2
2
  require 'rb-scpt'
3
3
  $-w = old_w
4
+ require "yaml"
4
5
 
5
6
  NERD_FOLDER = ENV["OF_FOLDER"] || "nerd"
6
7
 
@@ -29,7 +30,7 @@ include Appscript
29
30
  # bts_id: a string uniquely identifying a task: SYSTEM(-projectname)?#id
30
31
 
31
32
  class OmniFocus
32
- VERSION = "2.6.0"
33
+ VERSION = "2.7.0"
33
34
 
34
35
  class << self
35
36
  attr_accessor :description, :current_desc
@@ -73,10 +74,9 @@ class OmniFocus
73
74
  ##
74
75
  # Load any file matching "omnifocus/*.rb"
75
76
 
76
- def self._load_plugins
77
+ def self._load_plugins filter = ARGV.shift
77
78
  @__loaded__ ||=
78
79
  begin
79
- filter = ARGV.shift
80
80
  loaded = {}
81
81
  Gem.find_files("omnifocus/*.rb").each do |path|
82
82
  name = File.basename path
@@ -97,8 +97,6 @@ class OmniFocus
97
97
  end
98
98
 
99
99
  def load_or_create_config
100
- require "yaml"
101
-
102
100
  path = File.expand_path "~/.omnifocus.yml"
103
101
 
104
102
  unless File.exist? path then
@@ -126,8 +124,12 @@ class OmniFocus
126
124
  @omnifocus ||= Appscript.app('OmniFocus').default_document
127
125
  end
128
126
 
129
- def all_subtasks task
130
- [task] + task.tasks.get.flatten.map{|t| all_subtasks(t) }
127
+ def all_subtasks task, filter = nil
128
+ if filter then
129
+ [task] + task.tasks[filter].get.flatten.map{ |t| all_subtasks t, filter }
130
+ else
131
+ [task] + task.tasks.get.flatten.map{ |t| all_subtasks t }
132
+ end
131
133
  end
132
134
 
133
135
  def all_tasks
@@ -136,6 +138,10 @@ class OmniFocus
136
138
  omnifocus.flattened_projects.tasks.get.flatten.map{|t| all_subtasks(t) }.flatten
137
139
  end
138
140
 
141
+ def all_active_tasks
142
+ omnifocus.flattened_projects.tasks[active].get.flatten.map{|t| all_subtasks(t, active) }.flatten
143
+ end
144
+
139
145
  ##
140
146
  # Utility shortcut to make a new thing with a name via appscript.
141
147
 
@@ -168,7 +174,7 @@ class OmniFocus
168
174
  prefixen = self.class._plugins.map { |klass| klass::PREFIX rescue nil }
169
175
  of_tasks = nil
170
176
 
171
- prefix_re = /^(#{Regexp.union prefixen}(?:-[\w\s.-]+)?\#\d+)/
177
+ prefix_re = /^(#{Regexp.union prefixen}(?:-[\s\p{L}._-]+)?\#\d+)/
172
178
 
173
179
  if prefixen.all? then
174
180
  of_tasks = all_tasks.find_all { |task|
@@ -183,8 +189,15 @@ class OmniFocus
183
189
  end
184
190
 
185
191
  of_tasks.each do |of_task|
186
- ticket_id = of_task.name.get[prefix_re, 1]
192
+ ticket_id = of_task.name.get[prefix_re, 1]
187
193
  project = of_task.containing_project.name.get
194
+
195
+ if existing.key? ticket_id
196
+ warn "Duplicate task! #{ticket_id}"
197
+ warn " deleting: #{of_task.id_.get}"
198
+ omnifocus.flattened_projects.tasks.delete of_task
199
+ end
200
+
188
201
  existing[ticket_id] = project
189
202
  bug_db[project][ticket_id] = false
190
203
  end
@@ -590,19 +603,20 @@ class OmniFocus
590
603
  unless proj then
591
604
  warn "creating #{name} project"
592
605
  proj = make nerd_projects, :project, name, :review_interval => rep
606
+ end
593
607
 
608
+ rel_task = proj.tasks[rel_q].first.get rescue nil
609
+ tri_task = proj.tasks[tri_q].first.get rescue nil
610
+
611
+ if rel_task || tri_task then # repair
612
+ new_task_from proj, tri_task, "Release #{name}", rel_tag, -min30 unless rel_task
613
+ new_task_from proj, rel_task, "Triage #{name}", tri_tag, +min30 unless tri_task
614
+ else
594
615
  make proj, :task, "Release #{name}", props.merge(:due_date => rel_due_date,
595
616
  :primary_tag => rel_tag)
596
617
  make proj, :task, "Triage #{name}", props.merge(:due_date => tri_due_date,
597
618
  :primary_tag => tri_tag)
598
- return
599
619
  end
600
-
601
- rel_task = proj.tasks[rel_q].first.get rescue nil
602
- tri_task = proj.tasks[tri_q].first.get rescue nil
603
-
604
- new_task_from proj, tri_task, "Release #{name}", rel_tag, -min30 unless rel_task
605
- new_task_from proj, rel_task, "Triage #{name}", tri_tag, +min30 unless tri_task
606
620
  end
607
621
 
608
622
  def new_task_from proj, task, name, tag, offset
@@ -964,8 +978,12 @@ class OmniFocus
964
978
  its.status.eq(:active)
965
979
  end
966
980
 
981
+ def active
982
+ its.completed.eq(false)
983
+ end
984
+
967
985
  def non_dropped_project
968
- its.status.eq(:dropped).not
986
+ its.status.eq(:dropped_status).not
969
987
  end
970
988
 
971
989
  def all_projects
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnifocus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
8
  - aja
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIIDPjCCAiagAwIBAgIBBDANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
+ MIIDPjCCAiagAwIBAgIBBjANBgkqhkiG9w0BAQsF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kmX7TrEsjVmERC0pPqzQ5GQJgmEXDD7oMgaKXaAq
27
+ x2m+KSZDrqk7c8uho5OX6YMqg4KdxehfSLqqTZGoeV78qwf/jpPQZKTf+W9gUSJh
28
+ zsWpo4K50MP+QtdSbKXZwjAafpQ8hK0MnnZ/aeCsW9ov5vdXpYbf3dpg6ADXRGE7
29
+ lQY2y1tJ5/chqu6h7dQmnm2ABUqx9O+JcN9hbCYoA5i/EeubUEtFIh2w3SpO6YfB
30
+ JFmxn4h9YO/pVdB962BdBNNDia0kgIjI3ENnkLq0dKpYU3+F3KhEuTksLO0L6X/V
31
+ YsuyUzsMz6GQA4khyaMgKNSD
32
32
  -----END CERTIFICATE-----
33
- date: 2020-02-13 00:00:00.000000000 Z
33
+ date: 2022-04-09 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: rb-scpt
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.22'
89
+ version: '3.23'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.22'
96
+ version: '3.23'
97
97
  description: Synchronizes bug tracking systems to omnifocus.
98
98
  email:
99
99
  - ryand-ruby@zenspider.com
@@ -122,7 +122,7 @@ licenses:
122
122
  - MIT
123
123
  metadata:
124
124
  homepage_uri: https://github.com/seattlerb/omnifocus
125
- post_install_message:
125
+ post_install_message:
126
126
  rdoc_options:
127
127
  - "--main"
128
128
  - README.rdoc
@@ -139,8 +139,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  - !ruby/object:Gem::Version
140
140
  version: 1.3.1
141
141
  requirements: []
142
- rubygems_version: 3.0.3
143
- signing_key:
142
+ rubygems_version: 3.3.3
143
+ signing_key:
144
144
  specification_version: 4
145
145
  summary: Synchronizes bug tracking systems to omnifocus.
146
146
  test_files: []
metadata.gz.sig CHANGED
Binary file