doing 2.1.14 → 2.1.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/.irbrc +1 -0
  3. data/.yardoc/checksums +11 -9
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/CHANGELOG.md +18 -0
  7. data/Gemfile.lock +3 -2
  8. data/README.md +56 -19
  9. data/bin/doing +4 -3
  10. data/docs/doc/Array.html +117 -3
  11. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  12. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  13. data/docs/doc/BooleanTermParser/Query.html +1 -1
  14. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  15. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  16. data/docs/doc/BooleanTermParser.html +1 -1
  17. data/docs/doc/Doing/Color.html +1 -1
  18. data/docs/doc/Doing/Completion.html +1 -1
  19. data/docs/doc/Doing/Configuration.html +5 -2
  20. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  21. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  22. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  23. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  24. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  25. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  26. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  27. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  28. data/docs/doc/Doing/Errors.html +1 -1
  29. data/docs/doc/Doing/Hooks.html +1 -1
  30. data/docs/doc/Doing/Item.html +106 -2
  31. data/docs/doc/Doing/Items.html +2 -2
  32. data/docs/doc/Doing/LogAdapter.html +1 -1
  33. data/docs/doc/Doing/Note.html +2 -2
  34. data/docs/doc/Doing/Pager.html +1 -1
  35. data/docs/doc/Doing/Plugins.html +1 -1
  36. data/docs/doc/Doing/Prompt.html +1 -1
  37. data/docs/doc/Doing/Section.html +1 -1
  38. data/docs/doc/Doing/TemplateString.html +2 -2
  39. data/docs/doc/Doing/Util/Backup.html +1 -1
  40. data/docs/doc/Doing/Util.html +1 -1
  41. data/docs/doc/Doing/WWID.html +35 -65
  42. data/docs/doc/Doing.html +3 -3
  43. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  44. data/docs/doc/GLI/Commands.html +1 -1
  45. data/docs/doc/GLI.html +1 -1
  46. data/docs/doc/Hash.html +1 -1
  47. data/docs/doc/Numeric.html +279 -0
  48. data/docs/doc/PhraseParser/Operator.html +1 -1
  49. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  50. data/docs/doc/PhraseParser/Query.html +1 -1
  51. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  52. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  53. data/docs/doc/PhraseParser/TermClause.html +1 -1
  54. data/docs/doc/PhraseParser.html +1 -1
  55. data/docs/doc/Status.html +1 -1
  56. data/docs/doc/String.html +767 -115
  57. data/docs/doc/Symbol.html +1 -1
  58. data/docs/doc/Time.html +1 -1
  59. data/docs/doc/_index.html +14 -9
  60. data/docs/doc/class_list.html +1 -1
  61. data/docs/doc/file.README.html +41 -15
  62. data/docs/doc/index.html +41 -15
  63. data/docs/doc/method_list.html +357 -293
  64. data/docs/doc/top-level-namespace.html +2 -2
  65. data/docs/index.md +56 -19
  66. data/doing.gemspec +1 -0
  67. data/doing.rdoc +3 -3
  68. data/example_plugin.rb +2 -4
  69. data/lib/completion/_doing.zsh +3 -3
  70. data/lib/completion/doing.bash +4 -4
  71. data/lib/completion/doing.fish +2 -2
  72. data/lib/doing/array_chronify.rb +57 -0
  73. data/lib/doing/configuration.rb +4 -1
  74. data/lib/doing/item.rb +32 -0
  75. data/lib/doing/log_adapter.rb +1 -1
  76. data/lib/doing/numeric_chronify.rb +40 -0
  77. data/lib/doing/plugins/export/dayone_export.rb +1 -1
  78. data/lib/doing/plugins/export/json_export.rb +2 -2
  79. data/lib/doing/plugins/export/template_export.rb +47 -90
  80. data/lib/doing/string.rb +97 -33
  81. data/lib/doing/string_chronify.rb +83 -13
  82. data/lib/doing/time.rb +4 -4
  83. data/lib/doing/util_backup.rb +1 -1
  84. data/lib/doing/version.rb +1 -1
  85. data/lib/doing/wwid.rb +58 -83
  86. data/lib/doing.rb +30 -27
  87. data/lib/examples/plugins/say_export.rb +1 -4
  88. metadata +26 -2
data/lib/doing.rb CHANGED
@@ -9,43 +9,46 @@ require 'csv'
9
9
  require 'tempfile'
10
10
  require 'zlib'
11
11
  require 'base64'
12
+ require 'plist'
12
13
 
13
14
  require 'chronic'
14
15
  require 'tty-link'
15
16
  require 'tty-which'
16
17
  require 'tty-markdown'
17
18
  require 'tty-reader'
18
- require 'plist'
19
- # require 'amatch'
19
+ require 'tty-screen'
20
20
  require 'haml'
21
21
  require 'json'
22
22
  require 'logger'
23
23
  require 'safe_yaml/load'
24
- require 'doing/hash'
25
- require 'doing/colors'
26
- require 'doing/template_string'
27
- require 'doing/string'
28
- require 'doing/string_chronify'
29
- require 'doing/time'
30
- require 'doing/array'
31
- require 'doing/symbol'
32
- require 'doing/util'
33
- require 'doing/util_backup'
34
- require 'doing/configuration'
35
- require 'doing/section'
36
- require 'doing/items'
37
- require 'doing/note'
38
- require 'doing/item'
39
- require 'doing/wwid'
40
- require 'doing/log_adapter'
41
- require 'doing/prompt'
42
- require 'doing/errors'
43
- require 'doing/hooks'
44
- require 'doing/plugin_manager'
45
- require 'doing/pager'
46
- require 'doing/completion'
47
- require 'doing/boolean_term_parser'
48
- require 'doing/phrase_parser'
24
+
25
+ require_relative 'doing/hash'
26
+ require_relative 'doing/colors'
27
+ require_relative 'doing/template_string'
28
+ require_relative 'doing/string'
29
+ require_relative 'doing/time'
30
+ require_relative 'doing/array'
31
+ require_relative 'doing/symbol'
32
+ require_relative 'doing/util'
33
+ require_relative 'doing/util_backup'
34
+ require_relative 'doing/configuration'
35
+ require_relative 'doing/section'
36
+ require_relative 'doing/items'
37
+ require_relative 'doing/note'
38
+ require_relative 'doing/item'
39
+ require_relative 'doing/wwid'
40
+ require_relative 'doing/log_adapter'
41
+ require_relative 'doing/prompt'
42
+ require_relative 'doing/errors'
43
+ require_relative 'doing/hooks'
44
+ require_relative 'doing/plugin_manager'
45
+ require_relative 'doing/pager'
46
+ require_relative 'doing/completion'
47
+ require_relative 'doing/boolean_term_parser'
48
+ require_relative 'doing/phrase_parser'
49
+ require_relative 'doing/array_chronify'
50
+ require_relative 'doing/numeric_chronify'
51
+ require_relative 'doing/string_chronify'
49
52
  # require 'doing/markdown_document_listener'
50
53
 
51
54
  # Main doing module
@@ -149,11 +149,8 @@ module Doing
149
149
  finished_at = i.end_date
150
150
  took += finished_at.strftime('%A %B %e at %I:%M%p')
151
151
 
152
- d, h, m = wwid.format_time(interval)
153
152
  took += ' and it took'
154
- took += " #{d.to_i} days" if d.to_i.positive?
155
- took += " #{h.to_i} hours" if h.to_i.positive?
156
- took += " #{m.to_i} minutes" if m.to_i.positive?
153
+ took += interval.time_string(format: :natural)
157
154
  end
158
155
  end
159
156
 
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.14
4
+ version: 2.1.15
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-01-15 00:00:00.000000000 Z
11
+ date: 2022-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: safe_yaml
@@ -366,6 +366,26 @@ dependencies:
366
366
  - - ">="
367
367
  - !ruby/object:Gem::Version
368
368
  version: 0.9.0
369
+ - !ruby/object:Gem::Dependency
370
+ name: tty-screen
371
+ requirement: !ruby/object:Gem::Requirement
372
+ requirements:
373
+ - - "~>"
374
+ - !ruby/object:Gem::Version
375
+ version: '0.8'
376
+ - - ">="
377
+ - !ruby/object:Gem::Version
378
+ version: 0.8.1
379
+ type: :runtime
380
+ prerelease: false
381
+ version_requirements: !ruby/object:Gem::Requirement
382
+ requirements:
383
+ - - "~>"
384
+ - !ruby/object:Gem::Version
385
+ version: '0.8'
386
+ - - ">="
387
+ - !ruby/object:Gem::Version
388
+ version: 0.8.1
369
389
  - !ruby/object:Gem::Dependency
370
390
  name: parslet
371
391
  requirement: !ruby/object:Gem::Requirement
@@ -416,6 +436,7 @@ extensions: []
416
436
  extra_rdoc_files:
417
437
  - README.md
418
438
  files:
439
+ - ".irbrc"
419
440
  - ".yardoc/checksums"
420
441
  - ".yardoc/complete"
421
442
  - ".yardoc/object_types"
@@ -477,6 +498,7 @@ files:
477
498
  - docs/doc/GLI/Commands.html
478
499
  - docs/doc/GLI/Commands/MarkdownDocumentListener.html
479
500
  - docs/doc/Hash.html
501
+ - docs/doc/Numeric.html
480
502
  - docs/doc/PhraseParser.html
481
503
  - docs/doc/PhraseParser/Operator.html
482
504
  - docs/doc/PhraseParser/PhraseClause.html
@@ -515,6 +537,7 @@ files:
515
537
  - lib/completion/doing.fish
516
538
  - lib/doing.rb
517
539
  - lib/doing/array.rb
540
+ - lib/doing/array_chronify.rb
518
541
  - lib/doing/boolean_term_parser.rb
519
542
  - lib/doing/cli_status.rb
520
543
  - lib/doing/colors.rb
@@ -532,6 +555,7 @@ files:
532
555
  - lib/doing/log_adapter.rb
533
556
  - lib/doing/markdown_document_listener.rb
534
557
  - lib/doing/note.rb
558
+ - lib/doing/numeric_chronify.rb
535
559
  - lib/doing/pager.rb
536
560
  - lib/doing/phrase_parser.rb
537
561
  - lib/doing/plugin_manager.rb