doing 2.1.36 → 2.1.37

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -4912
  3. data/Gemfile.lock +1 -1
  4. data/README.md +1 -1
  5. data/bin/commands/done.rb +4 -4
  6. data/bin/commands/meanwhile.rb +3 -3
  7. data/bin/commands/note.rb +2 -2
  8. data/bin/commands/now.rb +3 -3
  9. data/bin/commands/on.rb +2 -1
  10. data/bin/doing +7 -0
  11. data/docs/doc/Array.html +1 -1
  12. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  13. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  14. data/docs/doc/BooleanTermParser/Query.html +1 -1
  15. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  16. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  17. data/docs/doc/BooleanTermParser.html +1 -1
  18. data/docs/doc/Doing/Color.html +1 -1
  19. data/docs/doc/Doing/Completion.html +1 -1
  20. data/docs/doc/Doing/Configuration.html +1 -1
  21. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  22. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  23. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  24. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  25. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  26. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  27. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  28. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  29. data/docs/doc/Doing/Errors.html +1 -1
  30. data/docs/doc/Doing/Hooks.html +1 -1
  31. data/docs/doc/Doing/Item.html +1 -1
  32. data/docs/doc/Doing/Items.html +1 -1
  33. data/docs/doc/Doing/Logger.html +1 -1
  34. data/docs/doc/Doing/Note.html +1 -1
  35. data/docs/doc/Doing/Pager.html +1 -1
  36. data/docs/doc/Doing/Plugins.html +1 -1
  37. data/docs/doc/Doing/Prompt.html +1 -1
  38. data/docs/doc/Doing/Section.html +1 -1
  39. data/docs/doc/Doing/TemplateString.html +1 -1
  40. data/docs/doc/Doing/Types.html +1 -1
  41. data/docs/doc/Doing/Util/Backup.html +1 -1
  42. data/docs/doc/Doing/Util.html +1 -1
  43. data/docs/doc/Doing/WWID.html +1 -1
  44. data/docs/doc/Doing.html +2 -2
  45. data/docs/doc/FalseClass.html +1 -1
  46. data/docs/doc/GLI/Commands/Help.html +1 -1
  47. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  48. data/docs/doc/GLI/Commands.html +1 -1
  49. data/docs/doc/GLI.html +1 -1
  50. data/docs/doc/Hash.html +1 -1
  51. data/docs/doc/Object.html +1 -1
  52. data/docs/doc/PhraseParser/Operator.html +1 -1
  53. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  54. data/docs/doc/PhraseParser/Query.html +1 -1
  55. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  56. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  57. data/docs/doc/PhraseParser/TermClause.html +1 -1
  58. data/docs/doc/PhraseParser.html +1 -1
  59. data/docs/doc/Status.html +1 -1
  60. data/docs/doc/String.html +1 -1
  61. data/docs/doc/Symbol.html +1 -1
  62. data/docs/doc/Time.html +1 -1
  63. data/docs/doc/TrueClass.html +1 -1
  64. data/docs/doc/_index.html +1 -1
  65. data/docs/doc/file.README.html +2 -2
  66. data/docs/doc/index.html +2 -2
  67. data/docs/doc/top-level-namespace.html +1 -1
  68. data/doing.rdoc +1 -1
  69. data/lib/doing/chronify/string.rb +5 -4
  70. data/lib/doing/prompt.rb +3 -1
  71. data/lib/doing/version.rb +1 -1
  72. data/lib/doing.rb +1 -0
  73. metadata +2 -2
@@ -283,7 +283,7 @@
283
283
  </div>
284
284
 
285
285
  <div id="footer">
286
- Generated on Fri Feb 25 09:00:49 2022 by
286
+ Generated on Sat Mar 12 11:56:36 2022 by
287
287
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
288
288
  0.9.27 (ruby-3.0.1).
289
289
  </div>
@@ -105,7 +105,7 @@
105
105
  </div>
106
106
 
107
107
  <div id="footer">
108
- Generated on Fri Feb 25 09:00:49 2022 by
108
+ Generated on Sat Mar 12 11:56:35 2022 by
109
109
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
110
110
  0.9.27 (ruby-3.0.1).
111
111
  </div>
data/docs/doc/Status.html CHANGED
@@ -316,7 +316,7 @@
316
316
  </div>
317
317
 
318
318
  <div id="footer">
319
- Generated on Fri Feb 25 09:00:49 2022 by
319
+ Generated on Sat Mar 12 11:56:35 2022 by
320
320
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
321
321
  0.9.27 (ruby-3.0.1).
322
322
  </div>
data/docs/doc/String.html CHANGED
@@ -1129,7 +1129,7 @@ be recognized, e.g. %greensomething still finds
1129
1129
  </div>
1130
1130
 
1131
1131
  <div id="footer">
1132
- Generated on Fri Feb 25 09:00:49 2022 by
1132
+ Generated on Sat Mar 12 11:56:35 2022 by
1133
1133
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1134
1134
  0.9.27 (ruby-3.0.1).
1135
1135
  </div>
data/docs/doc/Symbol.html CHANGED
@@ -342,7 +342,7 @@
342
342
  </div>
343
343
 
344
344
  <div id="footer">
345
- Generated on Fri Feb 25 09:00:49 2022 by
345
+ Generated on Sat Mar 12 11:56:35 2022 by
346
346
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
347
347
  0.9.27 (ruby-3.0.1).
348
348
  </div>
data/docs/doc/Time.html CHANGED
@@ -240,7 +240,7 @@
240
240
  </div>
241
241
 
242
242
  <div id="footer">
243
- Generated on Fri Feb 25 09:00:49 2022 by
243
+ Generated on Sat Mar 12 11:56:35 2022 by
244
244
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
245
245
  0.9.27 (ruby-3.0.1).
246
246
  </div>
@@ -225,7 +225,7 @@ has content</p>
225
225
  </div>
226
226
 
227
227
  <div id="footer">
228
- Generated on Fri Feb 25 09:00:49 2022 by
228
+ Generated on Sat Mar 12 11:56:35 2022 by
229
229
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
230
230
  0.9.27 (ruby-3.0.1).
231
231
  </div>
data/docs/doc/_index.html CHANGED
@@ -589,7 +589,7 @@
589
589
  </div>
590
590
 
591
591
  <div id="footer">
592
- Generated on Fri Feb 25 09:00:49 2022 by
592
+ Generated on Sat Mar 12 11:56:35 2022 by
593
593
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
594
594
  0.9.27 (ruby-3.0.1).
595
595
  </div>
@@ -67,7 +67,7 @@ you&#39;ve done.</strong></p>
67
67
 
68
68
  <!--README-->
69
69
 
70
- <p>The current version of <code>doing</code> is &lt;!--VER--&gt;2.1.35&lt;!--END VER--&gt;.</p>
70
+ <p>The current version of <code>doing</code> is &lt;!--VER--&gt;2.1.36&lt;!--END VER--&gt;.</p>
71
71
 
72
72
  <p>Find all of the documentation in the <a href="https://github.com/ttscoff/doing/wiki">doing wiki</a>.</p>
73
73
 
@@ -149,7 +149,7 @@ with changes. Please target the <code>develop</code> branch with pull requests.<
149
149
  </div></div>
150
150
 
151
151
  <div id="footer">
152
- Generated on Fri Feb 25 09:00:49 2022 by
152
+ Generated on Sat Mar 12 11:56:35 2022 by
153
153
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
154
154
  0.9.27 (ruby-3.0.1).
155
155
  </div>
data/docs/doc/index.html CHANGED
@@ -67,7 +67,7 @@ you&#39;ve done.</strong></p>
67
67
 
68
68
  <!--README-->
69
69
 
70
- <p>The current version of <code>doing</code> is &lt;!--VER--&gt;2.1.35&lt;!--END VER--&gt;.</p>
70
+ <p>The current version of <code>doing</code> is &lt;!--VER--&gt;2.1.36&lt;!--END VER--&gt;.</p>
71
71
 
72
72
  <p>Find all of the documentation in the <a href="https://github.com/ttscoff/doing/wiki">doing wiki</a>.</p>
73
73
 
@@ -149,7 +149,7 @@ with changes. Please target the <code>develop</code> branch with pull requests.<
149
149
  </div></div>
150
150
 
151
151
  <div id="footer">
152
- Generated on Fri Feb 25 09:00:49 2022 by
152
+ Generated on Sat Mar 12 11:56:35 2022 by
153
153
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
154
154
  0.9.27 (ruby-3.0.1).
155
155
  </div>
@@ -206,7 +206,7 @@
206
206
  </div>
207
207
 
208
208
  <div id="footer">
209
- Generated on Fri Feb 25 09:00:49 2022 by
209
+ Generated on Sat Mar 12 11:56:35 2022 by
210
210
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
211
211
  0.9.27 (ruby-3.0.1).
212
212
  </div>
data/doing.rdoc CHANGED
@@ -5,7 +5,7 @@ record of what you've been doing, complete with tag-based time tracking. The
5
5
  command line tool allows you to add entries, annotate with tags and notes, and
6
6
  view your entries with myriad options, with a focus on a "natural" language syntax.
7
7
 
8
- v2.1.36
8
+ v2.1.37
9
9
 
10
10
  === Global Options
11
11
  === --config_file arg
@@ -43,8 +43,8 @@ module Doing
43
43
  Doing.logger.debug('Parser:', %(date/time string "#{self}" interpreted as #{res} (#{secs_ago} seconds ago)))
44
44
  else
45
45
  date_string = dup
46
- date_string = 'today' if date_string.match(REGEX_DAY) && now.strftime('%a') =~ /^#{Regexp.last_match(1)}/i
47
- date_string = "#{options[:context].to_s} #{date_string}" if date_string =~ REGEX_TIME && options[:context]
46
+ date_string = 'today' if date_string.match(Types::REGEX_DAY) && now.strftime('%a') =~ /^#{Regexp.last_match(1)}/i
47
+ date_string = "#{options[:context].to_s} #{date_string}" if date_string =~ Types::REGEX_TIME && options[:context]
48
48
 
49
49
  res = Chronic.parse(date_string, {
50
50
  guess: options.fetch(:guess, :begin),
@@ -176,7 +176,7 @@ module Doing
176
176
  ## "mon 3pm to mon 5pm".split_date_range
177
177
  ##
178
178
  def split_date_range
179
- time_rx = /^(\d{1,2}+(:\d{1,2}+)?( *(am|pm))?|midnight|noon)$/
179
+ time_rx = /^(\d{1,2}(:\d{1,2})?( *(am|pm))?|midnight|noon)$/
180
180
  range_rx = / (to|through|thru|(?:un)?til|-+) /
181
181
 
182
182
  date_string = dup
@@ -187,12 +187,13 @@ module Doing
187
187
  inclusive = true
188
188
 
189
189
  dates = date_string.split(range_rx)
190
+
190
191
  if dates[0].strip =~ time_rx && dates[-1].strip =~ time_rx
191
192
  start = dates[0].strip
192
193
  finish = dates[-1].strip
193
194
  else
194
195
  start = dates[0].chronify(guess: :begin, future: false)
195
- finish = dates[-1].chronify(guess: inclusive ? :end : :begin, future: false)
196
+ finish = dates[-1].chronify(guess: inclusive ? :end : :begin, future: true)
196
197
  end
197
198
 
198
199
  raise Errors::InvalidTimeExpression, 'Unrecognized date string' if start.nil? || finish.nil?
data/lib/doing/prompt.rb CHANGED
@@ -62,7 +62,9 @@ module Doing
62
62
  prompt_text << boldgreen(prompt.sub(/:?$/, ':'))
63
63
  prompt_text << yellow(' Enter a blank line (')
64
64
  prompt_text << boldwhite('return twice')
65
- prompt_text << yellow(') to end editing')
65
+ prompt_text << yellow(') to end editing and save, ')
66
+ prompt_text << boldwhite('CTRL-C')
67
+ prompt_text << yellow(' to cancel')
66
68
  puts prompt_text.join('')
67
69
 
68
70
  res = []
data/lib/doing/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Doing
2
- VERSION = '2.1.36'
2
+ VERSION = '2.1.37'
3
3
  end
data/lib/doing.rb CHANGED
@@ -15,6 +15,7 @@ require 'haml'
15
15
  require 'json'
16
16
  require 'logger'
17
17
  require 'safe_yaml/load'
18
+ require 'fcntl'
18
19
 
19
20
  require 'chronic'
20
21
  require 'tty-link'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.36
4
+ version: 2.1.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-25 00:00:00.000000000 Z
11
+ date: 2022-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-markup