doing 2.1.25 → 2.1.29

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.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +15 -20
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +322 -108
  6. data/Dockerfile +5 -5
  7. data/Dockerfile-2.6 +5 -5
  8. data/Dockerfile-2.7 +5 -4
  9. data/Dockerfile-3.0 +5 -4
  10. data/Gemfile.lock +1 -1
  11. data/README.md +1 -1
  12. data/Rakefile +2 -3
  13. data/bin/commands/add_section.rb +15 -0
  14. data/bin/commands/again.rb +57 -0
  15. data/bin/commands/archive.rb +55 -0
  16. data/bin/commands/cancel.rb +60 -0
  17. data/bin/commands/changes.rb +83 -0
  18. data/bin/commands/choose.rb +9 -0
  19. data/bin/commands/colors.rb +21 -0
  20. data/bin/commands/commands.rb +89 -0
  21. data/bin/commands/commands_accepting.rb +76 -0
  22. data/bin/commands/completion.rb +27 -0
  23. data/bin/commands/config.rb +245 -0
  24. data/bin/commands/done.rb +235 -0
  25. data/bin/commands/finish.rb +126 -0
  26. data/bin/commands/flag.rb +90 -0
  27. data/bin/commands/grep.rb +108 -0
  28. data/bin/commands/import.rb +71 -0
  29. data/bin/commands/install_fzf.rb +17 -0
  30. data/bin/commands/last.rb +81 -0
  31. data/bin/commands/meanwhile.rb +76 -0
  32. data/bin/commands/note.rb +91 -0
  33. data/bin/commands/now.rb +145 -0
  34. data/bin/commands/on.rb +65 -0
  35. data/bin/commands/open.rb +53 -0
  36. data/bin/commands/plugins.rb +23 -0
  37. data/bin/commands/recent.rb +77 -0
  38. data/bin/commands/redo.rb +26 -0
  39. data/bin/commands/reset.rb +73 -0
  40. data/bin/commands/rotate.rb +42 -0
  41. data/bin/commands/sections.rb +11 -0
  42. data/bin/commands/select.rb +105 -0
  43. data/bin/commands/show.rb +185 -0
  44. data/bin/commands/since.rb +63 -0
  45. data/bin/commands/tag.rb +149 -0
  46. data/bin/commands/tag_dir.rb +29 -0
  47. data/bin/commands/tags.rb +66 -0
  48. data/bin/commands/template.rb +61 -0
  49. data/bin/commands/today.rb +64 -0
  50. data/bin/commands/undo.rb +49 -0
  51. data/bin/commands/view.rb +201 -0
  52. data/bin/commands/views.rb +11 -0
  53. data/bin/commands/yesterday.rb +72 -0
  54. data/bin/doing +241 -3706
  55. data/docs/doc/Array.html +3 -502
  56. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  57. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  58. data/docs/doc/BooleanTermParser/Query.html +1 -1
  59. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  60. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  61. data/docs/doc/BooleanTermParser.html +1 -1
  62. data/docs/doc/Doing/Color.html +62 -56
  63. data/docs/doc/Doing/Completion.html +1 -1
  64. data/docs/doc/Doing/Configuration.html +36 -1
  65. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  66. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  67. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  68. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  69. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  70. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  71. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  72. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  73. data/docs/doc/Doing/Errors.html +1 -1
  74. data/docs/doc/Doing/Hooks.html +1 -1
  75. data/docs/doc/Doing/Item.html +1 -1
  76. data/docs/doc/Doing/Items.html +2 -2
  77. data/docs/doc/Doing/LogAdapter.html +1 -1
  78. data/docs/doc/Doing/Note.html +2 -2
  79. data/docs/doc/Doing/Pager.html +1 -1
  80. data/docs/doc/Doing/Plugins.html +1 -1
  81. data/docs/doc/Doing/Prompt.html +46 -1
  82. data/docs/doc/Doing/Section.html +1 -1
  83. data/docs/doc/Doing/TemplateString.html +2 -2
  84. data/docs/doc/Doing/Types.html +41 -1
  85. data/docs/doc/Doing/Util/Backup.html +1 -1
  86. data/docs/doc/Doing/Util.html +1 -1
  87. data/docs/doc/Doing/WWID.html +10 -10
  88. data/docs/doc/Doing.html +3 -3
  89. data/docs/doc/FalseClass.html +235 -0
  90. data/docs/doc/GLI/Commands/Help.html +1 -1
  91. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +1 -1
  92. data/docs/doc/GLI/Commands.html +1 -1
  93. data/docs/doc/GLI.html +1 -1
  94. data/docs/doc/Hash.html +1 -1
  95. data/docs/doc/Numeric.html +1 -1
  96. data/docs/doc/Object.html +203 -0
  97. data/docs/doc/PhraseParser/Operator.html +1 -1
  98. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  99. data/docs/doc/PhraseParser/Query.html +1 -1
  100. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  101. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  102. data/docs/doc/PhraseParser/TermClause.html +1 -1
  103. data/docs/doc/PhraseParser.html +1 -1
  104. data/docs/doc/Status.html +1 -1
  105. data/docs/doc/String.html +287 -3155
  106. data/docs/doc/Symbol.html +40 -6
  107. data/docs/doc/Time.html +1 -1
  108. data/docs/doc/TrueClass.html +235 -0
  109. data/docs/doc/_index.html +5 -10
  110. data/docs/doc/class_list.html +1 -1
  111. data/docs/doc/file.README.html +2 -2
  112. data/docs/doc/index.html +2 -2
  113. data/docs/doc/method_list.html +289 -681
  114. data/docs/doc/top-level-namespace.html +2 -2
  115. data/doing.rdoc +306 -205
  116. data/lib/completion/_doing.zsh +35 -35
  117. data/lib/completion/doing.bash +30 -30
  118. data/lib/completion/doing.fish +88 -78
  119. data/lib/doing/array/array.rb +4 -0
  120. data/lib/doing/array/nested_hash.rb +17 -0
  121. data/lib/doing/{array.rb → array/tags.rb} +7 -25
  122. data/lib/doing/changelog/change.rb +26 -11
  123. data/lib/doing/changelog/changes.rb +31 -4
  124. data/lib/doing/{array_chronify.rb → chronify/array.rb} +0 -0
  125. data/lib/doing/chronify/chronify.rb +5 -0
  126. data/lib/doing/{numeric_chronify.rb → chronify/numeric.rb} +0 -0
  127. data/lib/doing/{string_chronify.rb → chronify/string.rb} +0 -0
  128. data/lib/doing/colors.rb +115 -54
  129. data/lib/doing/configuration.rb +5 -0
  130. data/lib/doing/good.rb +8 -0
  131. data/lib/doing/help_monkey_patch.rb +6 -5
  132. data/lib/doing/item.rb +5 -5
  133. data/lib/doing/items.rb +2 -2
  134. data/lib/doing/log_adapter.rb +35 -2
  135. data/lib/doing/normalize.rb +188 -0
  136. data/lib/doing/pager.rb +1 -0
  137. data/lib/doing/plugins/export/dayone_export.rb +1 -1
  138. data/lib/doing/plugins/export/html_export.rb +1 -1
  139. data/lib/doing/plugins/export/json_export.rb +1 -1
  140. data/lib/doing/plugins/export/markdown_export.rb +1 -1
  141. data/lib/doing/plugins/export/template_export.rb +3 -1
  142. data/lib/doing/prompt.rb +9 -3
  143. data/lib/doing/string/highlight.rb +95 -0
  144. data/lib/doing/string/query.rb +129 -0
  145. data/lib/doing/string/string.rb +12 -0
  146. data/lib/doing/string/tags.rb +164 -0
  147. data/lib/doing/string/transform.rb +168 -0
  148. data/lib/doing/string/truncate.rb +75 -0
  149. data/lib/doing/string/url.rb +82 -0
  150. data/lib/doing/template_string.rb +0 -22
  151. data/lib/doing/types.rb +8 -0
  152. data/lib/doing/util.rb +13 -9
  153. data/lib/doing/version.rb +1 -1
  154. data/lib/doing/wwid.rb +53 -35
  155. data/lib/doing.rb +4 -6
  156. data/lib/examples/commands/wiki.rb +6 -7
  157. data/lib/examples/plugins/wiki_export/wiki_export.rb +1 -1
  158. data/lib/helpers/threaded_tests.rb +39 -20
  159. data/scripts/deploy.rb +107 -0
  160. data/scripts/runtests.sh +4 -0
  161. metadata +63 -8
  162. data/lib/doing/string.rb +0 -765
  163. data/lib/doing/symbol.rb +0 -28
data/scripts/deploy.rb ADDED
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'tty-spinner'
4
+ require 'tty-cursor'
5
+ require 'pastel'
6
+ require 'fileutils'
7
+
8
+ pastel = Pastel.new
9
+ format = "[#{pastel.yellow(':spinner')}] " + pastel.white("Release Gem")
10
+ spinners = TTY::Spinner::Multi.new(format, format: :dots, success_mark: pastel.green('✔'), error_mark: pastel.red('✖'))
11
+ sp_v = spinners.register "[#{pastel.cyan(':spinner')}] :msg"
12
+ sp_t = spinners.register "[#{pastel.cyan(':spinner')}] Run tests :msg"
13
+ sp_c = spinners.register "[#{pastel.cyan(':spinner')}] Generate completions"
14
+ sp_d = spinners.register "[#{pastel.cyan(':spinner')}] Generate docs"
15
+ sp_w = spinners.register "[#{pastel.cyan(':spinner')}] Update wiki :msg"
16
+ spinners.auto_spin
17
+
18
+ $version = nil
19
+ sp_v.update(msg: 'Get version')
20
+ sp_t.update(msg: '')
21
+ sp_w.update(msg: '')
22
+ sp_v.run do |spinner|
23
+ spinner.update(msg: 'Getting version')
24
+ versions = `rake ver`.strip
25
+ version = versions.match(/version\.rb: ([\d.]+(\w+\d*)?)/)[1]
26
+ changelog_version = versions.match(/changelog: ([\d.]+(\w+\d*)?)/)[1]
27
+ git_version = versions.match(/git tag: ([\d.]+(\w+\d*)?)/)[1]
28
+
29
+ if git_version == version
30
+ spinner.update(msg: "Error: Git version (#{git_version}) is the same as version.rb (#{version})")
31
+ spinner.error
32
+ spinners.stop
33
+ Process.exit
34
+ end
35
+
36
+ unless version == changelog_version
37
+ spinner.update(msg: "Error: version.rb (#{version}) and Changelog (#{changelog_version}) do not match")
38
+ spinner.error
39
+ spinners.stop
40
+ Process.exit
41
+ end
42
+
43
+ $version = version
44
+
45
+ spinner.update(msg: "Version #{version}")
46
+ spinner.success
47
+ end
48
+
49
+
50
+ sp_t.run do |spinner|
51
+ spinner.update(msg: '')
52
+ start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
53
+ unless system('rake parallel:test &> results.log')
54
+ spinner.update(msg: '- Unit tests failed')
55
+ spinner.error
56
+ spinners.stop
57
+ Process.exit
58
+ end
59
+
60
+ finish = Process.clock_gettime(Process::CLOCK_MONOTONIC)
61
+ spinner.update(msg: "- passed in #{(finish - start).round(4)} seconds")
62
+ spinner.success
63
+ end
64
+
65
+ sp_c.auto_spin
66
+ `./generate_completions.sh &> results.log`
67
+ sp_c.success
68
+
69
+ sp_d.auto_spin
70
+ `bundle exec bin/doing _doc &> results.log`
71
+ `./rdoc_to_mmd.rb > /Users/ttscoff/Sites/dev/bt/source/doing_all_commands.md`
72
+ `rake yard &> results.log`
73
+ sp_d.success
74
+
75
+
76
+ sp_w.run do |spinner|
77
+ spinner.update(msg: '- Updating All Commands')
78
+ `./rdoc_to_mmd.rb > /Users/ttscoff/Desktop/Code/doing.wiki/commands.source`
79
+ prev_dir = Dir.pwd
80
+ Dir.chdir('/Users/ttscoff/Desktop/Code/doing.wiki/')
81
+ `./reformat_commands.rb &> results.log`
82
+ spinner.update(msg: '- Committing and Pushing')
83
+ `git commit -a -m "#{$version} update" &> results.log`
84
+ `git pull &> results.log`
85
+ `FORCE_PUSH=true git push &> results.log`
86
+ spinner.update(msg: '- Tagging Release')
87
+ `git release create -m "v#{$version}" $version &> results.log`
88
+ spinner.update(msg: '- Done')
89
+ Dir.chdir(prev_dir)
90
+ sp_w.success
91
+ end
92
+
93
+ sp_r = spinners.register "[:spinner] Releasing gem :msg"
94
+
95
+ sp_r.run do |spinner|
96
+ spinner.update(msg: '- Preparing git release')
97
+ `git commit -a -m "#{$version} release prep" &> results.log`
98
+ `git pull &> results.log`
99
+ `FORCE_PUSH=true git push &> results.log`
100
+ spinner.update(msg: '- Running releasegem script')
101
+ `/Users/ttscoff/scripts/releasegem &> results.log`
102
+ spinner.update(msg: '- Bumping gem version')
103
+ `rake bump[patch] &> results.log`
104
+ sp_r.success
105
+ end
106
+
107
+ FileUtils.rm('results.log')
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ bundle install
4
+ rake test
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.25
4
+ version: 2.1.29
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-23 00:00:00.000000000 Z
11
+ date: 2022-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: safe_yaml
@@ -456,6 +456,47 @@ files:
456
456
  - README.md
457
457
  - Rakefile
458
458
  - _config.yml
459
+ - bin/commands/add_section.rb
460
+ - bin/commands/again.rb
461
+ - bin/commands/archive.rb
462
+ - bin/commands/cancel.rb
463
+ - bin/commands/changes.rb
464
+ - bin/commands/choose.rb
465
+ - bin/commands/colors.rb
466
+ - bin/commands/commands.rb
467
+ - bin/commands/commands_accepting.rb
468
+ - bin/commands/completion.rb
469
+ - bin/commands/config.rb
470
+ - bin/commands/done.rb
471
+ - bin/commands/finish.rb
472
+ - bin/commands/flag.rb
473
+ - bin/commands/grep.rb
474
+ - bin/commands/import.rb
475
+ - bin/commands/install_fzf.rb
476
+ - bin/commands/last.rb
477
+ - bin/commands/meanwhile.rb
478
+ - bin/commands/note.rb
479
+ - bin/commands/now.rb
480
+ - bin/commands/on.rb
481
+ - bin/commands/open.rb
482
+ - bin/commands/plugins.rb
483
+ - bin/commands/recent.rb
484
+ - bin/commands/redo.rb
485
+ - bin/commands/reset.rb
486
+ - bin/commands/rotate.rb
487
+ - bin/commands/sections.rb
488
+ - bin/commands/select.rb
489
+ - bin/commands/show.rb
490
+ - bin/commands/since.rb
491
+ - bin/commands/tag.rb
492
+ - bin/commands/tag_dir.rb
493
+ - bin/commands/tags.rb
494
+ - bin/commands/template.rb
495
+ - bin/commands/today.rb
496
+ - bin/commands/undo.rb
497
+ - bin/commands/view.rb
498
+ - bin/commands/views.rb
499
+ - bin/commands/yesterday.rb
459
500
  - bin/doing
460
501
  - docs/_config.yml
461
502
  - docs/doc/Array.html
@@ -495,12 +536,14 @@ files:
495
536
  - docs/doc/Doing/Util/Backup.html
496
537
  - docs/doc/Doing/WWID.html
497
538
  - docs/doc/Doing/WWIDFile.html
539
+ - docs/doc/FalseClass.html
498
540
  - docs/doc/GLI.html
499
541
  - docs/doc/GLI/Commands.html
500
542
  - docs/doc/GLI/Commands/Help.html
501
543
  - docs/doc/GLI/Commands/MarkdownDocumentListener.html
502
544
  - docs/doc/Hash.html
503
545
  - docs/doc/Numeric.html
546
+ - docs/doc/Object.html
504
547
  - docs/doc/PhraseParser.html
505
548
  - docs/doc/PhraseParser/Operator.html
506
549
  - docs/doc/PhraseParser/PhraseClause.html
@@ -512,6 +555,7 @@ files:
512
555
  - docs/doc/String.html
513
556
  - docs/doc/Symbol.html
514
557
  - docs/doc/Time.html
558
+ - docs/doc/TrueClass.html
515
559
  - docs/doc/_index.html
516
560
  - docs/doc/class_list.html
517
561
  - docs/doc/css/common.css
@@ -538,14 +582,19 @@ files:
538
582
  - lib/completion/doing.bash
539
583
  - lib/completion/doing.fish
540
584
  - lib/doing.rb
541
- - lib/doing/array.rb
542
- - lib/doing/array_chronify.rb
585
+ - lib/doing/array/array.rb
586
+ - lib/doing/array/nested_hash.rb
587
+ - lib/doing/array/tags.rb
543
588
  - lib/doing/boolean_term_parser.rb
544
589
  - lib/doing/changelog.rb
545
590
  - lib/doing/changelog/change.rb
546
591
  - lib/doing/changelog/changes.rb
547
592
  - lib/doing/changelog/entry.rb
548
593
  - lib/doing/changelog/version.rb
594
+ - lib/doing/chronify/array.rb
595
+ - lib/doing/chronify/chronify.rb
596
+ - lib/doing/chronify/numeric.rb
597
+ - lib/doing/chronify/string.rb
549
598
  - lib/doing/cli_status.rb
550
599
  - lib/doing/colors.rb
551
600
  - lib/doing/completion.rb
@@ -563,8 +612,8 @@ files:
563
612
  - lib/doing/items.rb
564
613
  - lib/doing/log_adapter.rb
565
614
  - lib/doing/markdown_document_listener.rb
615
+ - lib/doing/normalize.rb
566
616
  - lib/doing/note.rb
567
- - lib/doing/numeric_chronify.rb
568
617
  - lib/doing/pager.rb
569
618
  - lib/doing/phrase_parser.rb
570
619
  - lib/doing/plugin_manager.rb
@@ -581,9 +630,13 @@ files:
581
630
  - lib/doing/plugins/import/timing_import.rb
582
631
  - lib/doing/prompt.rb
583
632
  - lib/doing/section.rb
584
- - lib/doing/string.rb
585
- - lib/doing/string_chronify.rb
586
- - lib/doing/symbol.rb
633
+ - lib/doing/string/highlight.rb
634
+ - lib/doing/string/query.rb
635
+ - lib/doing/string/string.rb
636
+ - lib/doing/string/tags.rb
637
+ - lib/doing/string/transform.rb
638
+ - lib/doing/string/truncate.rb
639
+ - lib/doing/string/url.rb
587
640
  - lib/doing/template_string.rb
588
641
  - lib/doing/time.rb
589
642
  - lib/doing/types.rb
@@ -700,9 +753,11 @@ files:
700
753
  - package-lock.json
701
754
  - rdoc_to_mmd.rb
702
755
  - rdocfixer.rb
756
+ - scripts/deploy.rb
703
757
  - scripts/generate_bash_completions.rb
704
758
  - scripts/generate_fish_completions.rb
705
759
  - scripts/generate_zsh_completions.rb
760
+ - scripts/runtests.sh
706
761
  - scripts/sort_commands.rb
707
762
  - yard_templates/default/method_details/setup.rb
708
763
  homepage: http://brettterpstra.com/project/doing/