omnifocus 2.4.0 → 2.5.0
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/{History.txt → History.rdoc} +14 -0
- data/Manifest.txt +2 -2
- data/{README.txt → README.rdoc} +0 -0
- data/Rakefile +4 -0
- data/lib/omnifocus.rb +104 -26
- metadata +24 -11
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3469a0eb4e6804a2821904b2a3caeb7c17969eb0d4ad4599e5735e1818189f4e
|
4
|
+
data.tar.gz: 14156e5f8b81b9d776bb596dccfbc3656fa0c682ac110b1c3fddfd7270cb9b66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 359141e95a1ef11921321333d58c05f347a1b9febb677d9cae0ba4d06b8979c58da5e7db1e75afb5333401a86ef6cf4f429a049865d4171aca4bac70538fa01f
|
7
|
+
data.tar.gz: 93e91a7d9e23b10591e8c42a5aac207cd99550a977c922eb276ceb6f68bad3ea77447df2caea181ad4a0b8fca23d8c9ed8e5d3dfd0b0f65836ab6fd50542d33e
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -1,3 +1,17 @@
|
|
1
|
+
=== 2.5.0 / 2019-10-08
|
2
|
+
|
3
|
+
* 5 minor enhancements:
|
4
|
+
|
5
|
+
* Extended _context to try tags first.
|
6
|
+
* Extended _flattened_contexts to try tags first.
|
7
|
+
* Extended reschedule subcommand to create missing release/triage tasks where needed.
|
8
|
+
* Refactored _context and _flattened_contexts methods.
|
9
|
+
* Refactored neww project sub-command to new_or_repair_project.
|
10
|
+
|
11
|
+
* 1 bug fix:
|
12
|
+
|
13
|
+
* Fixed to work with omnifocus 3 (single context -> multiple tags)
|
14
|
+
|
1
15
|
=== 2.4.0 / 2019-01-02
|
2
16
|
|
3
17
|
* 1 minor enhancement:
|
data/Manifest.txt
CHANGED
data/{README.txt → README.rdoc}
RENAMED
File without changes
|
data/Rakefile
CHANGED
data/lib/omnifocus.rb
CHANGED
@@ -29,7 +29,7 @@ include Appscript
|
|
29
29
|
# bts_id: a string uniquely identifying a task: SYSTEM(-projectname)?#id
|
30
30
|
|
31
31
|
class OmniFocus
|
32
|
-
VERSION = "2.
|
32
|
+
VERSION = "2.5.0"
|
33
33
|
|
34
34
|
##
|
35
35
|
# bug_db = {
|
@@ -296,27 +296,10 @@ class OmniFocus
|
|
296
296
|
when "nil" then
|
297
297
|
omnifocus.make :new => :inbox_task, :with_properties => {:name => title}
|
298
298
|
when "project" then
|
299
|
-
|
300
|
-
start_date = hour 0
|
301
|
-
due_date1 = hour 16
|
302
|
-
due_date2 = hour 16.5
|
303
|
-
|
304
|
-
cont = context("Releasing").thing
|
305
|
-
proj = make nerd_projects, :project, title, :review_interval => rep
|
306
|
-
|
307
|
-
props = {
|
308
|
-
:repetition => rep,
|
309
|
-
:context => cont,
|
310
|
-
:defer_date => start_date
|
311
|
-
}
|
312
|
-
|
313
|
-
make proj, :task, "Release #{title}", props.merge(:due_date => due_date1)
|
314
|
-
make proj, :task, "Triage #{title}", props.merge(:due_date => due_date2)
|
299
|
+
new_or_repair_project title
|
315
300
|
else
|
316
|
-
|
317
|
-
project
|
318
|
-
project.make :new => :task, :with_properties => {:name => title}
|
319
|
-
|
301
|
+
project = omnifocus.flattened_projects[its.name.eq(project_name)].first.get
|
302
|
+
make project, :task, title
|
320
303
|
puts "created task in #{project_name}: #{title}"
|
321
304
|
end
|
322
305
|
end
|
@@ -367,14 +350,14 @@ class OmniFocus
|
|
367
350
|
filter = its.completed.eq(false).and(its.repetition.eq(:missing_value))
|
368
351
|
|
369
352
|
h1 = Hash.new 0
|
370
|
-
|
353
|
+
_flattened_contexts.each do |context|
|
371
354
|
context.tasks[filter].get.each do |task|
|
372
355
|
h1[[task.containing_project.name.get, context.name.get].join(": ")] += 1
|
373
356
|
end
|
374
357
|
end
|
375
358
|
|
376
359
|
h2 = Hash.new 0
|
377
|
-
|
360
|
+
_flattened_contexts.each do |context|
|
378
361
|
h2[context.name.get] += context.tasks[filter].count
|
379
362
|
end
|
380
363
|
|
@@ -508,6 +491,61 @@ class OmniFocus
|
|
508
491
|
return rels, tasks, projs
|
509
492
|
end
|
510
493
|
|
494
|
+
def new_or_repair_project name
|
495
|
+
warn "project #{name}"
|
496
|
+
|
497
|
+
rep = weekly
|
498
|
+
start_date = hour 0
|
499
|
+
rel_due_date = hour 16
|
500
|
+
tri_due_date = hour 16.5
|
501
|
+
props = {
|
502
|
+
:repetition => rep,
|
503
|
+
:defer_date => start_date,
|
504
|
+
:estimated_minutes => 10,
|
505
|
+
}
|
506
|
+
|
507
|
+
min30 = 30 * 60
|
508
|
+
|
509
|
+
rel_q = its.completed.eq(false).and(its.name.begins_with("Release"))
|
510
|
+
tri_q = its.completed.eq(false).and(its.name.begins_with("Triage"))
|
511
|
+
|
512
|
+
rel_tag = context("Releasing").thing
|
513
|
+
tri_tag = context("Triaging").thing
|
514
|
+
|
515
|
+
proj = nerd_projects.projects[name].get rescue nil
|
516
|
+
|
517
|
+
unless proj then
|
518
|
+
warn "creating #{name} project"
|
519
|
+
proj = make nerd_projects, :project, name, :review_interval => rep
|
520
|
+
|
521
|
+
make proj, :task, "Release #{name}", props.merge(:due_date => rel_due_date,
|
522
|
+
:primary_tag => rel_tag)
|
523
|
+
make proj, :task, "Triage #{name}", props.merge(:due_date => tri_due_date,
|
524
|
+
:primary_tag => tri_tag)
|
525
|
+
return
|
526
|
+
end
|
527
|
+
|
528
|
+
rel_task = proj.tasks[rel_q].first.get rescue nil
|
529
|
+
tri_task = proj.tasks[tri_q].first.get rescue nil
|
530
|
+
|
531
|
+
new_task_from proj, tri_task, "Release #{name}", rel_tag, -min30 unless rel_task
|
532
|
+
new_task_from proj, rel_task, "Triage #{name}", tri_tag, +min30 unless tri_task
|
533
|
+
end
|
534
|
+
|
535
|
+
def new_task_from proj, task, name, tag, offset
|
536
|
+
warn " + #{name} task"
|
537
|
+
|
538
|
+
props = {
|
539
|
+
:estimated_minutes => 10,
|
540
|
+
:due_date => task.due_date.get + offset,
|
541
|
+
:defer_date => task.defer_date.get,
|
542
|
+
:repetition => task.repetition.get,
|
543
|
+
:primary_tag => tag,
|
544
|
+
}
|
545
|
+
|
546
|
+
make proj, :task, name, props
|
547
|
+
end
|
548
|
+
|
511
549
|
def fix_project_review_intervals rels, skip
|
512
550
|
rels.tasks.each do |task|
|
513
551
|
begin
|
@@ -594,6 +632,31 @@ class OmniFocus
|
|
594
632
|
end
|
595
633
|
end
|
596
634
|
|
635
|
+
def fix_missing_tasks skip
|
636
|
+
q_rel = its.completed.eq(false).and(its.name.begins_with("Release"))
|
637
|
+
q_tri = its.completed.eq(false).and(its.name.begins_with("Triage"))
|
638
|
+
|
639
|
+
nerd_projects.projects.get.each do |proj|
|
640
|
+
name = proj.name.get
|
641
|
+
|
642
|
+
rel = proj.tasks[q_rel].first.get rescue nil
|
643
|
+
tri = proj.tasks[q_tri].first.get rescue nil
|
644
|
+
|
645
|
+
case [!!rel, !!tri]
|
646
|
+
when [true, true] then
|
647
|
+
# do nothing
|
648
|
+
when [false, false] then
|
649
|
+
# do nothing?
|
650
|
+
when [true, false] then # create triage
|
651
|
+
warn " Repairing triage for #{name}"
|
652
|
+
new_or_repair_project name unless skip
|
653
|
+
when [false, true] then # create release
|
654
|
+
warn " Repairing release for #{name}"
|
655
|
+
new_or_repair_project name unless skip
|
656
|
+
end
|
657
|
+
end
|
658
|
+
end
|
659
|
+
|
597
660
|
def cmd_reschedule args
|
598
661
|
skip = ARGV.first == "-n"
|
599
662
|
|
@@ -608,6 +671,9 @@ class OmniFocus
|
|
608
671
|
|
609
672
|
warn "Checking releasing task schedules"
|
610
673
|
fix_release_task_schedule projs, tasks, skip
|
674
|
+
|
675
|
+
warn "Repairing any missing release or triage tasks"
|
676
|
+
fix_missing_tasks skip
|
611
677
|
end
|
612
678
|
end
|
613
679
|
|
@@ -640,7 +706,7 @@ class OmniFocus
|
|
640
706
|
end
|
641
707
|
|
642
708
|
def method_missing m, *a
|
643
|
-
warn [m,*a].inspect
|
709
|
+
warn "%s#method_missing(%s)" % [self.class.name, [m,*a].inspect[1..-2]]
|
644
710
|
thing.send m, *a
|
645
711
|
end
|
646
712
|
|
@@ -838,14 +904,26 @@ class OmniFocus
|
|
838
904
|
}
|
839
905
|
end
|
840
906
|
|
907
|
+
def _flattened_contexts
|
908
|
+
contexts = self.omnifocus.flattened_tags.get rescue nil
|
909
|
+
contexts ||= self.omnifocus.flattened_contexts.get rescue nil
|
910
|
+
contexts
|
911
|
+
end
|
912
|
+
|
913
|
+
def _context name
|
914
|
+
context = self.omnifocus.flattened_tags[name].get rescue nil
|
915
|
+
context ||= self.omnifocus.flattened_contexts[name].get rescue nil
|
916
|
+
context
|
917
|
+
end
|
918
|
+
|
841
919
|
def all_contexts
|
842
|
-
|
920
|
+
_flattened_contexts.map { |c|
|
843
921
|
Context.new omnifocus, c
|
844
922
|
}
|
845
923
|
end
|
846
924
|
|
847
925
|
def context name
|
848
|
-
context =
|
926
|
+
context = _context name
|
849
927
|
Context.new omnifocus, context if context
|
850
928
|
end
|
851
929
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnifocus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
|
31
31
|
UfBugfLD19bu3nvL+zTAGx/U
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2019-
|
33
|
+
date: 2019-10-09 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rb-scpt
|
@@ -60,6 +60,20 @@ dependencies:
|
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '2.0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: octokit
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '2.0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '2.0'
|
63
77
|
- !ruby/object:Gem::Dependency
|
64
78
|
name: rdoc
|
65
79
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,14 +100,14 @@ dependencies:
|
|
86
100
|
requirements:
|
87
101
|
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
103
|
+
version: '3.18'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
110
|
+
version: '3.18'
|
97
111
|
description: Synchronizes bug tracking systems to omnifocus.
|
98
112
|
email:
|
99
113
|
- ryand-ruby@zenspider.com
|
@@ -104,14 +118,14 @@ executables:
|
|
104
118
|
- omnifocus_new
|
105
119
|
extensions: []
|
106
120
|
extra_rdoc_files:
|
107
|
-
- History.
|
121
|
+
- History.rdoc
|
108
122
|
- Manifest.txt
|
109
|
-
- README.
|
123
|
+
- README.rdoc
|
110
124
|
files:
|
111
125
|
- ".autotest"
|
112
|
-
- History.
|
126
|
+
- History.rdoc
|
113
127
|
- Manifest.txt
|
114
|
-
- README.
|
128
|
+
- README.rdoc
|
115
129
|
- Rakefile
|
116
130
|
- bin/of
|
117
131
|
- bin/omnifocus
|
@@ -124,7 +138,7 @@ metadata: {}
|
|
124
138
|
post_install_message:
|
125
139
|
rdoc_options:
|
126
140
|
- "--main"
|
127
|
-
- README.
|
141
|
+
- README.rdoc
|
128
142
|
require_paths:
|
129
143
|
- lib
|
130
144
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -138,8 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
152
|
- !ruby/object:Gem::Version
|
139
153
|
version: 1.3.1
|
140
154
|
requirements: []
|
141
|
-
|
142
|
-
rubygems_version: 2.7.3
|
155
|
+
rubygems_version: 3.0.6
|
143
156
|
signing_key:
|
144
157
|
specification_version: 4
|
145
158
|
summary: Synchronizes bug tracking systems to omnifocus.
|
metadata.gz.sig
CHANGED
Binary file
|