doing 2.1.9 → 2.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +11 -11
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/CHANGELOG.md +37 -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 +1 -1
  11. data/README.md +1 -1
  12. data/Rakefile +51 -6
  13. data/bin/doing +2157 -1945
  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 +116 -1
  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 +1 -1
  41. data/docs/doc/Doing/Section.html +1 -1
  42. data/docs/doc/Doing/TemplateString.html +2 -2
  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 +226 -8
  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 +97 -1
  60. data/docs/doc/Symbol.html +36 -2
  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 +315 -235
  66. data/docs/doc/top-level-namespace.html +1 -1
  67. data/docs/index.md +1 -1
  68. data/doing.rdoc +210 -41
  69. data/generate_completions.sh +1 -3
  70. data/lib/completion/_doing.zsh +24 -20
  71. data/lib/completion/doing.bash +41 -30
  72. data/lib/completion/doing.fish +25 -2
  73. data/lib/doing/completion/bash_completion.rb +2 -2
  74. data/lib/doing/completion/fish_completion.rb +2 -2
  75. data/lib/doing/completion/zsh_completion.rb +2 -2
  76. data/lib/doing/completion.rb +12 -2
  77. data/lib/doing/configuration.rb +18 -8
  78. data/lib/doing/hooks.rb +10 -5
  79. data/lib/doing/item.rb +119 -0
  80. data/lib/doing/items.rb +16 -1
  81. data/lib/doing/pager.rb +2 -20
  82. data/lib/doing/plugins/import/calendar_import.rb +5 -0
  83. data/lib/doing/plugins/import/doing_import.rb +2 -0
  84. data/lib/doing/plugins/import/timing_import.rb +5 -0
  85. data/lib/doing/string.rb +20 -0
  86. data/lib/doing/symbol.rb +4 -0
  87. data/lib/doing/util_backup.rb +16 -5
  88. data/lib/doing/version.rb +1 -1
  89. data/lib/doing/wwid.rb +182 -85
  90. data/lib/doing.rb +1 -0
  91. data/lib/examples/plugins/hooks.rb +31 -0
  92. data/scripts/generate_bash_completions.rb +2 -2
  93. data/scripts/sort_commands.rb +59 -0
  94. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ef8ca83bf71cc460ba444020eb7713d3d710f2a6b3f284956afa5a9d17cb64a0
4
- data.tar.gz: 7247f654e36f62e93eea8ab826247aab3286bb73ecbe5a92a8c773369fbf42c9
3
+ metadata.gz: c12d0846431cd0468f217f3e1e9b80bcb9a86038fbee7ff057c1db8ad6c56bb3
4
+ data.tar.gz: a144f25b2798825ad042d690e21c1a798b83e06e49480c92be7acea752d37e48
5
5
  SHA512:
6
- metadata.gz: e7aeef235781813d3e36eb1e314222fe79ad9f1c63ca42535efed295cd2b382677260882731d2024821ebc75a2f624eb26bf1f2a7c005f5bc3245bbc0a96ae56
7
- data.tar.gz: 15067b35aedabc0f6c06e02227275d94437c363feb26e8a74d4b1c870b4b05e4d12272e3882811e795e5c3190ec1a543e1b5192bc4ea0956c905960e3cd9ec2f
6
+ metadata.gz: 66f76cd0588f4dca848c94313051bcb39bc776c4679b8bd9a648887dd764dcc3232d45e18bb260edb7500e3c398aef8a02216a11ce5a593b8822f89267c92214
7
+ data.tar.gz: bc852708998d6e670fe72c882f2e254f64bbec487cd56b659e75220bdd5a5c75b5495d1a9b4a734d56825a00563b1b3052bdcd2c4a93761479a2bbe9a2eb397d
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 54cea2275eaa19a9285e358c51f8630a558730ee
3
3
  lib/doing/note.rb bbadd9e34e6dc43a2af1110a5107f46c39d2547f
4
4
  lib/doing/time.rb 4411af636082d3abf6f6402a7d6c9038d96a9ead
5
5
  lib/doing/util.rb 33ad79455893213a0f2993edec0e158526657f09
6
- lib/doing/wwid.rb 63ea9d0c80ba50f0f6dae638045c79201a6fdc88
6
+ lib/doing/wwid.rb a6e14548e14219d46a6fdc1c9c9accb5f4277654
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
13
  lib/doing/prompt.rb a78b6f4488fe58b5653ce541a88d24559661459c
14
- lib/doing/string.rb 8f6d1f8ba765bedf72f1af23be3617ce03aebb03
15
- lib/doing/symbol.rb f18605aac49be688c9641de9564e48055a0f3757
14
+ lib/doing/string.rb 7cbe3e0bd136c52f7b12d4d6133afe20fe204be2
15
+ lib/doing/symbol.rb 309799458a1bc715c2707307c9a62ab26086275e
16
16
  lib/doing/section.rb 206e119cf818f1e76798753e611180fe77bc299a
17
- lib/doing/version.rb 30fb64a0ff19a48f951bce912a318c9fcedbee59
17
+ lib/doing/version.rb d2b8ae34e7fd7354adae5386fe3ed84c88e5dc88
18
18
  lib/doing/cli_status.rb dbedd454c4cbbd0fed9ef30120f6ec85d18b9356
19
- lib/doing/completion.rb 3b291eb38e651ea993d04db592a5e743057626e6
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,40 @@
1
+ ### 2.1.13
2
+
3
+ #### NEW
4
+
5
+ - --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)
6
+ - `doing tag` now accepts a `--value` flag to define a value for a single tag, e.g. @tag(value)
7
+
8
+ #### FIXED
9
+
10
+ - `doing last --editor` errors
11
+
12
+ ### 2.1.12
13
+
14
+ #### NEW
15
+
16
+ - 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.
17
+ - Synonym triggers allow `*` and `?` wildcards
18
+ - Add `--delete` flag for `doing last` to delete last entry
19
+ - --delete and --editor flags for `doing search`, batch edit and delete
20
+ - Example hook to add new entries containing a certain tag to Day One
21
+ - New hooks: pre_entry_add, post_entry_added, post_entry_updated, post_entry_removed, pre_export
22
+
23
+ #### IMPROVED
24
+
25
+ - If you need to use a colon in an autotag transform pattern, you can split with double colon, e.g. pattern::replacement
26
+ - Arrays defined in local configurations merge with main config instead of overwriting
27
+
28
+ #### FIXED
29
+
30
+ - `doing tags --interactive` wasn't showing menu
31
+
32
+ ### 2.1.10
33
+
34
+ #### NEW
35
+
36
+ - --age (oldest|newest) option for view command
37
+
1
38
  ### 2.1.9
2
39
 
3
40
  #### IMPROVED
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.9)
4
+ doing (2.1.13)
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)
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.8<!--END VER-->.
9
+ The current version of `doing` is <!--VER-->2.1.12<!--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]
51
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
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|
@@ -73,7 +107,18 @@ end
73
107
 
74
108
  desc 'Development version check'
75
109
  task :ver do
76
- system 'grep VERSION lib/doing/version.rb'
110
+ gver = `git ver`
111
+ cver = IO.read(File.join(File.dirname(__FILE__), 'CHANGELOG.md')).match(/^#+ (\d+\.\d+\.\d+(\w+)?)/)[1]
112
+ res = `grep VERSION lib/doing/version.rb`
113
+ version = res.match(/VERSION *= *['"](\d+\.\d+\.\d+(\w+)?)/)[1]
114
+ puts "git tag: #{gver}"
115
+ puts "version.rb: #{version}"
116
+ puts "changelog: #{cver}"
117
+ end
118
+
119
+ desc 'Changelog version check'
120
+ task :cver do
121
+ puts IO.read(File.join(File.dirname(__FILE__), 'CHANGELOG.md')).match(/^#+ (\d+\.\d+\.\d+(\w+)?)/)[1]
77
122
  end
78
123
 
79
124
  desc 'Bump incremental version number'