doing 2.1.23 → 2.1.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +17 -21
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +329 -102
  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 +3 -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 +69 -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 -3662
  55. data/docs/doc/Array.html +13 -449
  56. data/docs/doc/BooleanTermParser/Clause.html +5 -5
  57. data/docs/doc/BooleanTermParser/Operator.html +4 -4
  58. data/docs/doc/BooleanTermParser/Query.html +8 -8
  59. data/docs/doc/BooleanTermParser/QueryParser.html +2 -2
  60. data/docs/doc/BooleanTermParser/QueryTransformer.html +2 -2
  61. data/docs/doc/BooleanTermParser.html +1 -1
  62. data/docs/doc/Doing/Color.html +65 -59
  63. data/docs/doc/Doing/Completion.html +2 -2
  64. data/docs/doc/Doing/Configuration.html +49 -16
  65. data/docs/doc/Doing/Errors/DoingNoTraceError.html +2 -2
  66. data/docs/doc/Doing/Errors/DoingRuntimeError.html +2 -2
  67. data/docs/doc/Doing/Errors/DoingStandardError.html +2 -2
  68. data/docs/doc/Doing/Errors/EmptyInput.html +2 -2
  69. data/docs/doc/Doing/Errors/NoResults.html +2 -2
  70. data/docs/doc/Doing/Errors/PluginException.html +3 -3
  71. data/docs/doc/Doing/Errors/UserCancelled.html +2 -2
  72. data/docs/doc/Doing/Errors/WrongCommand.html +2 -2
  73. data/docs/doc/Doing/Errors.html +1 -1
  74. data/docs/doc/Doing/Hooks.html +6 -6
  75. data/docs/doc/Doing/Item.html +50 -16
  76. data/docs/doc/Doing/Items.html +10 -10
  77. data/docs/doc/Doing/LogAdapter.html +24 -24
  78. data/docs/doc/Doing/Note.html +7 -7
  79. data/docs/doc/Doing/Pager.html +4 -4
  80. data/docs/doc/Doing/Plugins.html +7 -7
  81. data/docs/doc/Doing/Prompt.html +59 -14
  82. data/docs/doc/Doing/Section.html +6 -6
  83. data/docs/doc/Doing/TemplateString.html +8 -8
  84. data/docs/doc/Doing/Types.html +46 -1
  85. data/docs/doc/Doing/Util/Backup.html +10 -10
  86. data/docs/doc/Doing/Util.html +15 -15
  87. data/docs/doc/Doing/WWID.html +73 -61
  88. data/docs/doc/Doing.html +3 -3
  89. data/docs/doc/FalseClass.html +235 -0
  90. data/docs/doc/GLI/Commands/Help.html +3 -3
  91. data/docs/doc/GLI/Commands/MarkdownDocumentListener.html +17 -17
  92. data/docs/doc/GLI/Commands.html +1 -1
  93. data/docs/doc/GLI.html +1 -1
  94. data/docs/doc/Hash.html +45 -11
  95. data/docs/doc/Numeric.html +5 -5
  96. data/docs/doc/Object.html +203 -0
  97. data/docs/doc/PhraseParser/Operator.html +4 -4
  98. data/docs/doc/PhraseParser/PhraseClause.html +5 -5
  99. data/docs/doc/PhraseParser/Query.html +10 -10
  100. data/docs/doc/PhraseParser/QueryParser.html +2 -2
  101. data/docs/doc/PhraseParser/QueryTransformer.html +2 -2
  102. data/docs/doc/PhraseParser/TermClause.html +5 -5
  103. data/docs/doc/PhraseParser.html +1 -1
  104. data/docs/doc/Status.html +7 -7
  105. data/docs/doc/String.html +306 -3111
  106. data/docs/doc/Symbol.html +45 -11
  107. data/docs/doc/Time.html +6 -6
  108. data/docs/doc/TrueClass.html +235 -0
  109. data/docs/doc/_index.html +37 -19
  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 +240 -576
  114. data/docs/doc/top-level-namespace.html +2 -2
  115. data/doing.rdoc +289 -169
  116. data/example_plugin.rb +2 -2
  117. data/lib/completion/_doing.zsh +35 -31
  118. data/lib/completion/doing.bash +30 -19
  119. data/lib/completion/doing.fish +81 -67
  120. data/lib/doing/array/array.rb +4 -0
  121. data/lib/doing/array/nested_hash.rb +17 -0
  122. data/lib/doing/{array.rb → array/tags.rb} +7 -25
  123. data/lib/doing/changelog/change.rb +26 -11
  124. data/lib/doing/changelog/changes.rb +14 -4
  125. data/lib/doing/{array_chronify.rb → chronify/array.rb} +0 -0
  126. data/lib/doing/chronify/chronify.rb +5 -0
  127. data/lib/doing/{numeric_chronify.rb → chronify/numeric.rb} +0 -0
  128. data/lib/doing/{string_chronify.rb → chronify/string.rb} +0 -0
  129. data/lib/doing/colors.rb +115 -54
  130. data/lib/doing/completion/fish_completion.rb +2 -1
  131. data/lib/doing/configuration.rb +9 -6
  132. data/lib/doing/good.rb +72 -0
  133. data/lib/doing/hash.rb +4 -0
  134. data/lib/doing/help_monkey_patch.rb +6 -5
  135. data/lib/doing/hooks.rb +3 -3
  136. data/lib/doing/item.rb +19 -15
  137. data/lib/doing/items.rb +2 -2
  138. data/lib/doing/log_adapter.rb +35 -2
  139. data/lib/doing/normalize.rb +188 -0
  140. data/lib/doing/pager.rb +1 -0
  141. data/lib/doing/plugins/export/dayone_export.rb +1 -1
  142. data/lib/doing/plugins/export/html_export.rb +1 -1
  143. data/lib/doing/plugins/export/json_export.rb +1 -1
  144. data/lib/doing/plugins/export/markdown_export.rb +1 -1
  145. data/lib/doing/plugins/export/template_export.rb +3 -1
  146. data/lib/doing/plugins/import/calendar_import.rb +1 -1
  147. data/lib/doing/plugins/import/doing_import.rb +1 -1
  148. data/lib/doing/plugins/import/timing_import.rb +1 -1
  149. data/lib/doing/prompt.rb +9 -3
  150. data/lib/doing/string/highlight.rb +95 -0
  151. data/lib/doing/string/query.rb +129 -0
  152. data/lib/doing/string/string.rb +12 -0
  153. data/lib/doing/string/tags.rb +164 -0
  154. data/lib/doing/string/transform.rb +168 -0
  155. data/lib/doing/string/truncate.rb +75 -0
  156. data/lib/doing/string/url.rb +82 -0
  157. data/lib/doing/template_string.rb +2 -24
  158. data/lib/doing/types.rb +9 -0
  159. data/lib/doing/util.rb +20 -16
  160. data/lib/doing/version.rb +1 -1
  161. data/lib/doing/wwid.rb +91 -51
  162. data/lib/doing.rb +5 -6
  163. data/lib/examples/commands/wiki.rb +6 -7
  164. data/lib/examples/plugins/wiki_export/wiki_export.rb +1 -1
  165. data/lib/helpers/threaded_tests.rb +69 -79
  166. data/lib/helpers/threaded_tests_string.rb +50 -0
  167. data/scripts/deploy.rb +107 -0
  168. data/scripts/runtests.sh +4 -0
  169. metadata +65 -8
  170. data/lib/doing/string.rb +0 -765
  171. data/lib/doing/symbol.rb +0 -28
@@ -2,76 +2,42 @@
2
2
 
3
3
  require 'tty-spinner'
4
4
  require 'tty-progressbar'
5
- require './lib/doing'
6
5
  require 'open3'
7
6
  require 'shellwords'
7
+ require 'fileutils'
8
8
 
9
- class ::String
10
- include Doing::Color
11
-
12
- def highlight_errors
13
- cols = `tput cols`.strip.to_i
14
-
15
- string = dup
16
-
17
- errs = string.scan(/(?<==\n)(?:Failure|Error):.*?(?=\n=+)/m)
18
-
19
- errs.map! do |error|
20
- err = error.dup
21
-
22
- err.gsub!(%r{^(/.*?/)([^/:]+):(\d+):in (.*?)$}) do
23
- m = Regexp.last_match
24
- "#{m[1].white}#{m[2].bold.white}:#{m[3].yellow}:in #{m[4].cyan}"
25
- end
26
- err.gsub!(/(Failure|Error): (.*?)\((.*?)\):\n (.*?)(?=\n)/m) do
27
- m = Regexp.last_match
28
- [
29
- m[1].bold.boldbgred.white,
30
- m[3].bold.boldbgcyan.white,
31
- m[2].bold.boldbgyellow.black,
32
- " #{m[4]} ".bold.boldbgwhite.black.reset
33
- ].join(':'.boldblack.boldbgblack.reset)
34
- end
35
- err.gsub!(/(<.*?>) (was expected to) (.*?)\n( *<.*?>)./m) do
36
- m = Regexp.last_match
37
- "#{m[1].bold.green} #{m[2].white} #{m[3].boldwhite.boldbgred.reset}\n#{m[4].bold.white}"
38
- end
39
- err.gsub!(/(Finished in) ([\d.]+) (seconds)/) do
40
- m = Regexp.last_match
41
- "#{m[1].green} #{m[2].bold.white} #{m[3].green}"
42
- end
43
- err.gsub!(/(\d+) (failures)/) do
44
- m = Regexp.last_match
45
- "#{m[1].bold.red} #{m[2].red}"
46
- end
47
- err.gsub!(/100% passed/) do |m|
48
- m.bold.green
49
- end
50
-
51
- err
52
- end
53
-
54
- errs.join("\n#{('=' * cols).blue}\n")
55
- end
56
- end
9
+ $LOAD_PATH.unshift File.join(__dir__, '..')
10
+ require 'doing'
11
+ require 'helpers/threaded_tests_string'
57
12
 
58
13
  class ThreadedTests
59
14
  include Doing::Color
15
+ include ThreadedTestString
60
16
 
61
17
  def run(pattern: '*', max_threads: 8, max_tests: 0)
62
18
  start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
19
+ @results = File.expand_path('results.log')
63
20
 
64
- max_threads = 1000 if max_threads == 0
21
+ max_threads = 1000 if max_threads.to_i == 0
65
22
 
66
23
  c = Doing::Color
67
24
  c.coloring = true
68
25
 
69
- pattern = "test/doing_*#{pattern}*_test.rb"
26
+ shuffle = false
27
+
28
+ unless pattern =~ /shuffle/i
29
+ pattern = "test/doing_*#{pattern}*_test.rb"
30
+ else
31
+ pattern = "test/doing_*_test.rb"
32
+ shuffle = true
33
+ end
70
34
 
71
35
  tests = Dir.glob(pattern)
72
36
 
73
- if max_tests > 0
74
- tests = tests.slice(0, max_tests - 1)
37
+ tests.shuffle! if shuffle
38
+
39
+ if max_tests.to_i > 0
40
+ tests = tests.slice(0, max_tests.to_i - 1)
75
41
  end
76
42
 
77
43
  puts "#{tests.count} test files".boldcyan
@@ -90,13 +56,21 @@ class ThreadedTests
90
56
  ].join('')
91
57
  progress = TTY::ProgressBar::Multi.new(banner,
92
58
  width: 12,
59
+ clear: true,
93
60
  hide_cursor: true)
94
61
  @children = []
95
62
  tests.each do |t|
96
63
  test_name = File.basename(t, '.rb').sub(/doing_(.*?)_test/, '\1')
97
64
  new_sp = progress.register("[#{':bar'.cyan}] #{test_name.bold.white}:status",
98
- total: 4, width: 1, head: ' ', unknown: ' ', hide_cursor: true, clear: true)
99
- @children.push([test_name, new_sp, nil])
65
+ total: tests.count + 8,
66
+ width: 1,
67
+ head: ' ',
68
+ unknown: ' ',
69
+ hide_cursor: true,
70
+ clear: true)
71
+ status = ': waiting'.dark.yellow.reset
72
+ @children.push([test_name, new_sp, status])
73
+ # new_sp.advance(status: ': waiting'.dark.yellow.reset)
100
74
  end
101
75
 
102
76
  @elapsed = 0.0
@@ -124,46 +98,64 @@ class ThreadedTests
124
98
  finish_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
125
99
 
126
100
  progress.finish
101
+ rescue
102
+ progress.stop
103
+ ensure
104
+ msg = @running_tests.map { |t| t[1].format.uncolor.sub(/^\[:bar\] (.*?):status/, "#{c.bold}#{c.white}\\1#{c.reset}#{t[2]}") }.join("\n")
105
+
106
+ Doing::Prompt.clear_screen(msg)
127
107
 
128
108
  output = []
129
- if @error_out.count.positive?
130
- output << c.boldred("#{@error_out.count} Issues")
131
- else
132
- output << c.green('Success')
133
- end
109
+ output << if @error_out.count.positive?
110
+ c.boldred("#{@error_out.count} Issues")
111
+ else
112
+ c.green('Success')
113
+ end
134
114
  output << c.green("#{@test_total} tests")
135
115
  output << c.cyan("#{@assrt_total} assertions")
136
116
  output << c.yellow("#{(finish_time - start_time).round(3)}s")
137
117
  puts output.join(', ')
138
118
 
139
- puts @error_out.join("\n----\n".boldwhite) if @error_out.count.positive?
140
- rescue
141
- progress.stop
119
+ if @error_out.count.positive?
120
+ res = Doing::Prompt.yn('Display error report?', default_response: false)
121
+ Doing::Pager.paginate = true
122
+ Doing::Pager.page(@error_out.join("\n----\n".boldwhite)) if res
123
+ end
142
124
  end
143
125
  end
144
126
 
145
127
  def run_test(s)
146
-
147
128
  bar = s[1]
148
- bar.advance(status: ": #{'running'.green}")
129
+ s[2] = ": #{'running'.green}"
130
+ bar.advance(status: s[2])
149
131
 
150
132
  if @running_tests.count.positive?
151
- prev_bar = @running_tests[-1][1]
152
- unless prev_bar.complete?
153
- prev_bar.update(head: ' ', unfinished: ' ')
154
- prev_bar.advance(status: ": #{'running'.green}")
133
+ @running_tests.each do |b|
134
+ prev_bar = b[1]
135
+ if prev_bar.complete?
136
+ prev_bar.reset
137
+ prev_bar.advance(status: b[2])
138
+ prev_bar.finish
139
+ else
140
+ prev_bar.update(head: ' ', unfinished: ' ')
141
+ prev_bar.advance(status: b[2])
142
+ end
155
143
  end
156
144
  end
157
145
 
158
146
  @running_tests.push(s)
159
-
160
-
161
147
  out, _err, status = Open3.capture3(ENV, 'rake', "test:#{s[0]}", stdin_data: nil)
162
- unless status.success?
163
- m = out.match(/(?<fail>\d+) failures, (?<err>\d+) errors/)
164
- status = ": #{m['fail'].bold.red} #{'failures'.red}, #{m['err'].bold.red} #{'errors'.red}"
148
+ time = out.match(/^Finished in (?<time>\d+\.\d+) seconds\./)
149
+ count = out.match(/^(?<tests>\d+) tests, (?<assrt>\d+) assertions, (?<fails>\d+) failures, (?<errs>\d+) errors/)
150
+
151
+ unless status.success? && !count['fails'].to_i.positive? && !count['errs'].to_i.positive?
152
+ s[2] = if count
153
+ ": #{count['fails'].bold.red} #{'failures'.red}, #{count['errs'].bold.red} #{'errors'.red}"
154
+ else
155
+ ": #{'Unknown Error'.bold.red}"
156
+ end
165
157
  bar.update(head: '✖'.boldred)
166
- bar.advance(head: '✖'.boldred, status: status)
158
+ bar.advance(head: '✖'.boldred, status: s[2])
167
159
 
168
160
  # errs = out.scan(/(?:Failure|Error): [\w_]+\((?:.*?)\):(?:.*?)(?=\n=======)/m)
169
161
  @error_out.push(out.highlight_errors)
@@ -173,9 +165,7 @@ class ThreadedTests
173
165
  Thread.exit
174
166
  end
175
167
 
176
- time = out.match(/^Finished in (?<time>\d+\.\d+) seconds\./)
177
- count = out.match(/^(?<tests>\d+) tests, (?<assrt>\d+) assertions, (?<fails>\d+) failures, (?<errs>\d+) errors/)
178
- status = [
168
+ s[2] = [
179
169
  ': ',
180
170
  count['tests'].green,
181
171
  '/',
@@ -190,7 +180,7 @@ class ThreadedTests
190
180
  's'
191
181
  ].join('')
192
182
  bar.update(head: '✔'.boldgreen)
193
- bar.advance(head: '✔'.boldgreen, status: status)
183
+ bar.advance(head: '✔'.boldgreen, status: s[2])
194
184
  @test_total += count['tests'].to_i
195
185
  @assrt_total += count['assrt'].to_i
196
186
  @elapsed += time['time'].to_f
@@ -0,0 +1,50 @@
1
+ module ThreadedTestString
2
+ class ::String
3
+ include Doing::Color
4
+
5
+ def highlight_errors
6
+ cols = `tput cols`.strip.to_i
7
+
8
+ string = dup
9
+
10
+ errs = string.scan(/(?<==\n)(?:Failure|Error):.*?(?=\n=+)/m)
11
+
12
+ errs.map! do |error|
13
+ err = error.dup
14
+
15
+ err.gsub!(%r{^(/.*?/)([^/:]+):(\d+):in (.*?)$}) do
16
+ m = Regexp.last_match
17
+ "#{m[1].white}#{m[2].bold.white}:#{m[3].yellow}:in #{m[4].cyan}"
18
+ end
19
+ err.gsub!(/(Failure|Error): (.*?)\((.*?)\):\n (.*?)(?=\n)/m) do
20
+ m = Regexp.last_match
21
+ [
22
+ m[1].bold.boldbgred.white,
23
+ m[3].bold.boldbgcyan.white,
24
+ m[2].bold.boldbgyellow.black,
25
+ " #{m[4]} ".bold.boldbgwhite.black.reset
26
+ ].join(':'.boldblack.boldbgblack.reset)
27
+ end
28
+ err.gsub!(/(<.*?>) (was expected to) (.*?)\n( *<.*?>)./m) do
29
+ m = Regexp.last_match
30
+ "#{m[1].bold.green} #{m[2].white} #{m[3].boldwhite.boldbgred.reset}\n#{m[4].bold.white}"
31
+ end
32
+ err.gsub!(/(Finished in) ([\d.]+) (seconds)/) do
33
+ m = Regexp.last_match
34
+ "#{m[1].green} #{m[2].bold.white} #{m[3].green}"
35
+ end
36
+ err.gsub!(/(\d+) (failures)/) do
37
+ m = Regexp.last_match
38
+ "#{m[1].bold.red} #{m[2].red}"
39
+ end
40
+ err.gsub!(/100% passed/) do |m|
41
+ m.bold.green
42
+ end
43
+
44
+ err
45
+ end
46
+
47
+ errs.join("\n#{('=' * cols).blue}\n")
48
+ end
49
+ end
50
+ end
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.23
4
+ version: 2.1.27
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-22 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
@@ -555,6 +604,7 @@ files:
555
604
  - lib/doing/completion/zsh_completion.rb
556
605
  - lib/doing/configuration.rb
557
606
  - lib/doing/errors.rb
607
+ - lib/doing/good.rb
558
608
  - lib/doing/hash.rb
559
609
  - lib/doing/help_monkey_patch.rb
560
610
  - lib/doing/hooks.rb
@@ -562,8 +612,8 @@ files:
562
612
  - lib/doing/items.rb
563
613
  - lib/doing/log_adapter.rb
564
614
  - lib/doing/markdown_document_listener.rb
615
+ - lib/doing/normalize.rb
565
616
  - lib/doing/note.rb
566
- - lib/doing/numeric_chronify.rb
567
617
  - lib/doing/pager.rb
568
618
  - lib/doing/phrase_parser.rb
569
619
  - lib/doing/plugin_manager.rb
@@ -580,9 +630,13 @@ files:
580
630
  - lib/doing/plugins/import/timing_import.rb
581
631
  - lib/doing/prompt.rb
582
632
  - lib/doing/section.rb
583
- - lib/doing/string.rb
584
- - lib/doing/string_chronify.rb
585
- - 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
586
640
  - lib/doing/template_string.rb
587
641
  - lib/doing/time.rb
588
642
  - lib/doing/types.rb
@@ -687,6 +741,7 @@ files:
687
741
  - lib/helpers/fzf/test/test_go.rb
688
742
  - lib/helpers/fzf/uninstall
689
743
  - lib/helpers/threaded_tests.rb
744
+ - lib/helpers/threaded_tests_string.rb
690
745
  - lib/templates/doing-dayone-entry.erb
691
746
  - lib/templates/doing-dayone.erb
692
747
  - lib/templates/doing-markdown.erb
@@ -698,9 +753,11 @@ files:
698
753
  - package-lock.json
699
754
  - rdoc_to_mmd.rb
700
755
  - rdocfixer.rb
756
+ - scripts/deploy.rb
701
757
  - scripts/generate_bash_completions.rb
702
758
  - scripts/generate_fish_completions.rb
703
759
  - scripts/generate_zsh_completions.rb
760
+ - scripts/runtests.sh
704
761
  - scripts/sort_commands.rb
705
762
  - yard_templates/default/method_details/setup.rb
706
763
  homepage: http://brettterpstra.com/project/doing/