doing 2.1.10 → 2.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +10 -10
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +45 -0
  6. data/Dockerfile +9 -0
  7. data/Dockerfile-2.6 +9 -0
  8. data/Dockerfile-2.7 +8 -0
  9. data/Dockerfile-3.0 +8 -0
  10. data/Gemfile.lock +7 -1
  11. data/README.md +1 -1
  12. data/Rakefile +39 -5
  13. data/bin/doing +2219 -1954
  14. data/docs/doc/Array.html +1 -1
  15. data/docs/doc/BooleanTermParser/Clause.html +1 -1
  16. data/docs/doc/BooleanTermParser/Operator.html +1 -1
  17. data/docs/doc/BooleanTermParser/Query.html +1 -1
  18. data/docs/doc/BooleanTermParser/QueryParser.html +1 -1
  19. data/docs/doc/BooleanTermParser/QueryTransformer.html +1 -1
  20. data/docs/doc/BooleanTermParser.html +1 -1
  21. data/docs/doc/Doing/Color.html +1 -1
  22. data/docs/doc/Doing/Completion.html +1 -1
  23. data/docs/doc/Doing/Configuration.html +3 -3
  24. data/docs/doc/Doing/Errors/DoingNoTraceError.html +1 -1
  25. data/docs/doc/Doing/Errors/DoingRuntimeError.html +1 -1
  26. data/docs/doc/Doing/Errors/DoingStandardError.html +1 -1
  27. data/docs/doc/Doing/Errors/EmptyInput.html +1 -1
  28. data/docs/doc/Doing/Errors/NoResults.html +1 -1
  29. data/docs/doc/Doing/Errors/PluginException.html +1 -1
  30. data/docs/doc/Doing/Errors/UserCancelled.html +1 -1
  31. data/docs/doc/Doing/Errors/WrongCommand.html +1 -1
  32. data/docs/doc/Doing/Errors.html +1 -1
  33. data/docs/doc/Doing/Hooks.html +1 -1
  34. data/docs/doc/Doing/Item.html +232 -13
  35. data/docs/doc/Doing/Items.html +65 -1
  36. data/docs/doc/Doing/LogAdapter.html +1 -1
  37. data/docs/doc/Doing/Note.html +1 -1
  38. data/docs/doc/Doing/Pager.html +1 -1
  39. data/docs/doc/Doing/Plugins.html +1 -1
  40. data/docs/doc/Doing/Prompt.html +35 -1
  41. data/docs/doc/Doing/Section.html +1 -1
  42. data/docs/doc/Doing/TemplateString.html +1 -1
  43. data/docs/doc/Doing/Util/Backup.html +84 -1
  44. data/docs/doc/Doing/Util.html +1 -1
  45. data/docs/doc/Doing/WWID.html +180 -5
  46. data/docs/doc/Doing.html +2 -2
  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/PhraseParser/Operator.html +1 -1
  52. data/docs/doc/PhraseParser/PhraseClause.html +1 -1
  53. data/docs/doc/PhraseParser/Query.html +1 -1
  54. data/docs/doc/PhraseParser/QueryParser.html +1 -1
  55. data/docs/doc/PhraseParser/QueryTransformer.html +1 -1
  56. data/docs/doc/PhraseParser/TermClause.html +1 -1
  57. data/docs/doc/PhraseParser.html +1 -1
  58. data/docs/doc/Status.html +1 -1
  59. data/docs/doc/String.html +1 -1
  60. data/docs/doc/Symbol.html +1 -1
  61. data/docs/doc/Time.html +1 -1
  62. data/docs/doc/_index.html +1 -1
  63. data/docs/doc/file.README.html +2 -2
  64. data/docs/doc/index.html +2 -2
  65. data/docs/doc/method_list.html +231 -167
  66. data/docs/doc/top-level-namespace.html +1 -1
  67. data/docs/index.md +1 -1
  68. data/doing.gemspec +1 -0
  69. data/doing.rdoc +242 -43
  70. data/lib/completion/_doing.zsh +31 -27
  71. data/lib/completion/doing.bash +50 -39
  72. data/lib/completion/doing.fish +33 -4
  73. data/lib/doing/configuration.rb +18 -8
  74. data/lib/doing/hooks.rb +10 -5
  75. data/lib/doing/item.rb +144 -0
  76. data/lib/doing/items.rb +16 -1
  77. data/lib/doing/pager.rb +2 -20
  78. data/lib/doing/plugins/import/calendar_import.rb +18 -1
  79. data/lib/doing/plugins/import/doing_import.rb +14 -1
  80. data/lib/doing/plugins/import/timing_import.rb +18 -1
  81. data/lib/doing/prompt.rb +13 -1
  82. data/lib/doing/time.rb +2 -2
  83. data/lib/doing/util_backup.rb +16 -5
  84. data/lib/doing/version.rb +1 -1
  85. data/lib/doing/wwid.rb +176 -75
  86. data/lib/doing.rb +2 -0
  87. data/lib/examples/plugins/hooks.rb +31 -0
  88. data/scripts/sort_commands.rb +59 -0
  89. metadata +27 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c60c7dbce3b8c11e37f56b4072c1685a87df9f8c77e937cc17dbb3672001939
4
- data.tar.gz: 66a9906024cc16f65159207d608c741a83300c95dd99a3fae6ac3c50d0848aa9
3
+ metadata.gz: 83151006df40e5509447d601aad17f68c0652923cd4444759568bdc510f809d8
4
+ data.tar.gz: 66cbfb07d1038a5ffa327911039d55aab88695f831735a7f78969ad1f216e3b7
5
5
  SHA512:
6
- metadata.gz: 389ec0da4647c43291f2611111e0ccafd4e50855d3e9772ea67a3c564b858d509aece9d302b194789a27f400991e9eb91829dae26ad628b4acbb22def1578c8b
7
- data.tar.gz: cfb58baff7b8485dfaee0d68e81566e6ab72871275edb597d49cab9645b08ff8bcfd1bd028fcbc9911ceaec6ef4e92b0e50532499e5ecd3fb30a389f49da4e13
6
+ metadata.gz: 59bc1165eeab6e6e8e838e81afb226d978878c813627239b909b89a989a20e9318af5ec43d06b90558ad0ed7f4b6f0061f9ed5a96840e1d8a2e2cae5eb471045
7
+ data.tar.gz: 651ded056737cfab0e8ccae8885f8972fbf1a166315fc0b1952911d4884cd3ed8791f8dedaa3400f94c60c199d229bc409223c1426ed35ef3af55906cb8a3925
data/.yardoc/checksums CHANGED
@@ -1,25 +1,25 @@
1
1
  lib/doing/hash.rb c2960de9603dcf90be85ce423d9430de27f4f893
2
- lib/doing/item.rb fcf106fb43a1a979d5213c8ac47161d9f6d8635f
2
+ lib/doing/item.rb be85c6274e7bb07f4dfd00f9d4fe3b93ee3d816c
3
3
  lib/doing/note.rb bbadd9e34e6dc43a2af1110a5107f46c39d2547f
4
- lib/doing/time.rb 4411af636082d3abf6f6402a7d6c9038d96a9ead
4
+ lib/doing/time.rb 6e79c48949e48b8896b18b1856f179d04fd936f9
5
5
  lib/doing/util.rb 33ad79455893213a0f2993edec0e158526657f09
6
- lib/doing/wwid.rb bca76421c6d5f85fd6ff19063a79189b2accf255
6
+ lib/doing/wwid.rb 5f3cedc2d4ac8761e869db9d9cc63e0ecfca9681
7
7
  lib/doing/array.rb a17004c4811d239932254f9ed94a6eb10456c8e8
8
- lib/doing/hooks.rb 00feacdbf24dc67951c49ca8c1ca9a568441920e
9
- lib/doing/items.rb 0860a0ac7269f59de994ae900c980e49359dc8d5
10
- lib/doing/pager.rb 230c10dea5e9c68b5709a0f4cb088c76970965e4
8
+ lib/doing/hooks.rb acf6e0615ccf1949f84915c979297845242c1205
9
+ lib/doing/items.rb 8cda7caaef10645893267262f5eee681e35046ce
10
+ lib/doing/pager.rb b58e478b0cb8d400ddb97988ba741e3a127b53c3
11
11
  lib/doing/colors.rb 9a628d48c821313c502deedc5b61a046a2bf79ef
12
12
  lib/doing/errors.rb af07e482a5389924edc2337749c81cda501098f0
13
- lib/doing/prompt.rb a78b6f4488fe58b5653ce541a88d24559661459c
13
+ lib/doing/prompt.rb 075dc22031e0f1cd5b2a8dd4cb6e6c3b3dfd2c36
14
14
  lib/doing/string.rb 7cbe3e0bd136c52f7b12d4d6133afe20fe204be2
15
15
  lib/doing/symbol.rb 309799458a1bc715c2707307c9a62ab26086275e
16
16
  lib/doing/section.rb 206e119cf818f1e76798753e611180fe77bc299a
17
- lib/doing/version.rb 08de25ee059d2e8eae4b3e1b3dac66e0d48461e6
17
+ lib/doing/version.rb 9a591fb642591742cb202b30af1f46f206220021
18
18
  lib/doing/cli_status.rb dbedd454c4cbbd0fed9ef30120f6ec85d18b9356
19
19
  lib/doing/completion.rb c658e7dc7898fb022a21b2bd77bedb958ca3b067
20
20
  lib/doing/log_adapter.rb 6cf0c9a405d17449643e54d35a04897b1da44eaf
21
- lib/doing/util_backup.rb 4441a22bdc81e7bba2eb259c522ef819d1b99616
22
- lib/doing/configuration.rb a9aad93aac92f4c5edcde3440654d9e836238364
21
+ lib/doing/util_backup.rb c1bda6ee3acc9a5f649df47590e67ff8b1e90c50
22
+ lib/doing/configuration.rb fc72d4343740a551988a7f56c426a62d51f85e65
23
23
  lib/doing/phrase_parser.rb 8f1789d7cf8326d8cc231b4a21505a93f8de20d2
24
24
  lib/doing/plugin_manager.rb cb16a82c3182ef7008359670ab96ff6b39270ccc
25
25
  lib/doing/string_chronify.rb ccbb08389d2139c7121203f8585864e3026d1526
data/.yardoc/object_types CHANGED
Binary file
Binary file
data/CHANGELOG.md CHANGED
@@ -1,3 +1,48 @@
1
+ ### 2.1.14
2
+
3
+ #### NEW
4
+
5
+ - All commands that accept --note now accept --ask, which requests input via readline after creating the note. Multiple lines are allowed, hit return twice to end editing. Works alongside --note and --editor
6
+
7
+ #### IMPROVED
8
+
9
+ - Implement --search and --from filtering for import plugins
10
+ - UTC format date strings in select menus for consistency (was relative date formatting)
11
+ - Don't populate the fzf search with --search, it's already filtered. Separated --query from --search if you do want to populate the query string in addition to --search filtering
12
+ - When showing relative dates, don't include the year if the date is the previous year but a later month than the current month (less than a year old)
13
+ - When using --editor while adding an entry, include any note specified on the command line or via --ask for further editing
14
+
15
+ ### 2.1.13
16
+
17
+ #### NEW
18
+
19
+ - --val flag for all display commands, allows tag value queries. Tag values are contained in parenthesis after the tag, e.g. @progress(50). Queries look like `--val "done < two weeks ago"`, "project *= oracle" or "progress >= 50". Wildcards allowed in value, comparators can be <, >, <=, >=, ==, *= (contains), ^= (begins with), $= (ends with). Numeric and date comparisons are detected automatically. Text comparisons are case insensitive. --val can be used multiple times in a command and you can use --bool to specify AND, OR, or NOT (default AND)
20
+ - `doing tag` now accepts a `--value` flag to define a value for a single tag, e.g. @tag(value)
21
+
22
+ #### FIXED
23
+
24
+ - `doing last --editor` errors
25
+
26
+ ### 2.1.12
27
+
28
+ #### NEW
29
+
30
+ - Tag_dir command creates/updates .doingrc files in the current directory with default_tags values. Then all entries created within that directory (or subdirs) get tagged with that value.
31
+ - Synonym triggers allow `*` and `?` wildcards
32
+ - Add `--delete` flag for `doing last` to delete last entry
33
+ - --delete and --editor flags for `doing search`, batch edit and delete
34
+ - Example hook to add new entries containing a certain tag to Day One
35
+ - New hooks: pre_entry_add, post_entry_added, post_entry_updated, post_entry_removed, pre_export
36
+
37
+ #### IMPROVED
38
+
39
+ - If you need to use a colon in an autotag transform pattern, you can split with double colon, e.g. pattern::replacement
40
+ - Arrays defined in local configurations merge with main config instead of overwriting
41
+
42
+ #### FIXED
43
+
44
+ - `doing tags --interactive` wasn't showing menu
45
+
1
46
  ### 2.1.10
2
47
 
3
48
  #### NEW
data/Dockerfile ADDED
@@ -0,0 +1,9 @@
1
+ FROM ruby:3.0.1
2
+ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
3
+ RUN mkdir /doing
4
+ WORKDIR /doing
5
+ COPY ./ /doing/
6
+ RUN gem install bundler:2.2.17
7
+ # RUN bundle update --bundler
8
+ RUN bundle install
9
+ CMD ["rake", "parallel:test"]
data/Dockerfile-2.6 ADDED
@@ -0,0 +1,9 @@
1
+ FROM ruby:2.6
2
+ RUN mkdir /doing
3
+ WORKDIR /doing
4
+ COPY ./ /doing/
5
+ RUN gem install bundler:2.2.17
6
+ # RUN bundle update --bundler
7
+ RUN bundle install
8
+ # ENTRYPOINT rake parallel:test
9
+ CMD ["rake", "parallel:test"]
data/Dockerfile-2.7 ADDED
@@ -0,0 +1,8 @@
1
+ FROM ruby:2.7
2
+ RUN mkdir /doing
3
+ WORKDIR /doing
4
+ COPY ./ /doing/
5
+ RUN gem install bundler:2.2.17
6
+ # RUN bundle update --bundler
7
+ RUN bundle install
8
+ CMD ["rake", "parallel:test"]
data/Dockerfile-3.0 ADDED
@@ -0,0 +1,8 @@
1
+ FROM ruby:3.0.0
2
+ RUN mkdir /doing
3
+ WORKDIR /doing
4
+ COPY ./ /doing/
5
+ RUN gem install bundler:2.2.17
6
+ # RUN bundle update --bundler
7
+ RUN bundle install
8
+ CMD ["rake", "parallel:test"]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- doing (2.1.10)
4
+ doing (2.1.14)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  deep_merge (~> 1.2, >= 1.2.1)
7
7
  gli (~> 2.19, >= 2.19.2)
@@ -12,6 +12,7 @@ PATH
12
12
  tty-link (~> 0.1, >= 0.1.1)
13
13
  tty-markdown (~> 0.7, >= 0.7.0)
14
14
  tty-progressbar (~> 0.18, >= 0.18.2)
15
+ tty-reader (~> 0.9, >= 0.9.0)
15
16
  tty-which (~> 0.5, >= 0.5.0)
16
17
 
17
18
  GEM
@@ -131,6 +132,10 @@ GEM
131
132
  tty-cursor (~> 0.7)
132
133
  tty-screen (~> 0.8)
133
134
  unicode-display_width (>= 1.6, < 3.0)
135
+ tty-reader (0.9.0)
136
+ tty-cursor (~> 0.7)
137
+ tty-screen (~> 0.8)
138
+ wisper (~> 2.0)
134
139
  tty-screen (0.8.1)
135
140
  tty-spinner (0.9.3)
136
141
  tty-cursor (~> 0.7)
@@ -139,6 +144,7 @@ GEM
139
144
  concurrent-ruby (~> 1.0)
140
145
  unicode-display_width (2.1.0)
141
146
  unicode_utils (1.4.0)
147
+ wisper (2.0.1)
142
148
  yard (0.9.26)
143
149
  zeitwerk (2.5.1)
144
150
 
data/README.md CHANGED
@@ -6,7 +6,7 @@ _If you're one of the rare people like me who find this useful, feel free to [bu
6
6
 
7
7
  <!--README-->
8
8
 
9
- The current version of `doing` is <!--VER-->2.1.9<!--END VER-->.
9
+ The current version of `doing` is <!--VER-->2.1.13<!--END VER-->.
10
10
 
11
11
  Find all of the documentation in the [doing wiki](https://github.com/ttscoff/doing/wiki).
12
12
 
data/Rakefile CHANGED
@@ -8,6 +8,7 @@ require 'open3'
8
8
  require 'yard'
9
9
  require 'parallel_tests'
10
10
  require 'parallel_tests/tasks'
11
+ require 'tty-spinner'
11
12
 
12
13
  YARD::Rake::YardocTask.new do |t|
13
14
  t.files = ['lib/doing/*.rb']
@@ -38,21 +39,54 @@ end
38
39
  namespace :test do
39
40
 
40
41
  FileList['test/*_test.rb'].each do |rakefile|
41
- test_name = File.basename(rakefile, '.rb').sub(%r{^.*?_(.*?)_.*?$}, '\1')
42
+ test_name = File.basename(rakefile, '.rb').sub(/^.*?_(.*?)_.*?$/, '\1')
42
43
 
43
44
  Rake::TestTask.new(:"#{test_name}") do |t|
44
45
  t.libs << ['test', 'test/helpers']
45
46
  t.pattern = rakefile
46
47
  t.verbose = ENV['VERBOSE'] =~ /(true|1)/i ? true : false
47
48
  end
48
- #Define default task for :test
49
- task :default => test_name
49
+ # Define default task for :test
50
+ task default: test_name
50
51
  end
52
+ end
53
+
54
+ desc 'Run tests in Docker'
55
+ task :dockertest, :version, :login do |_, args|
56
+ args.with_defaults(version: '2.7', login: false)
57
+ case args[:version]
58
+ when /^3/
59
+ img = 'doingtest3'
60
+ file = 'Dockerfile-3.0'
61
+ when /6$/
62
+ img = 'doingtest26'
63
+ file = 'Dockerfile-2.6'
64
+ when /(^2|7$)/
65
+ img = 'doingtest27'
66
+ file = 'Dockerfile-2.7'
67
+ else
68
+ img = 'doingtest'
69
+ file = 'Dockerfile'
70
+ end
71
+
72
+ exec "docker run -it #{img} /bin/bash -l" if args[:login]
73
+
74
+ puts `docker build . --file #{file} -t #{img}`
75
+
76
+ spinner = TTY::Spinner.new('[:spinner] Running tests ...', hide_cursor: true)
77
+
78
+ spinner.auto_spin
79
+ res = `docker run --rm -it #{img}`
80
+ # commit = puts `bash -c "docker commit $(docker ps -a|grep #{img}|awk '{print $1}'|head -n 1) #{img}"`.strip
81
+ spinner.success
82
+ spinner.stop
51
83
 
84
+ puts res
85
+ # puts commit&.empty? ? "Error commiting Docker tag #{img}" : "Committed Docker tag #{img}"
52
86
  end
53
87
 
54
- desc "Run all tests"
55
- task :test => 'test:default'
88
+ desc 'Run all tests'
89
+ task test: 'test:default'
56
90
 
57
91
  desc 'Run one test verbosely'
58
92
  task :test_one, :test do |_, args|