From 00601a6788493115579dd1711d79b0d1c97297e2 Mon Sep 17 00:00:00 2001 From: Brett Terpstra Date: Sun, 12 Jan 2025 12:04:58 -0600 Subject: [PATCH] Fix compatibility with Ruby 3.4 @fixed Ruby 3.4 compatibility --- Gemfile | 3 ++ Gemfile.lock | 39 ++++++++++++++++++- README.md | 2 +- docs/doc/Array.html | 2 +- docs/doc/BooleanTermParser.html | 2 +- docs/doc/BooleanTermParser/Clause.html | 2 +- docs/doc/BooleanTermParser/Operator.html | 2 +- docs/doc/BooleanTermParser/Query.html | 2 +- docs/doc/BooleanTermParser/QueryParser.html | 2 +- .../BooleanTermParser/QueryTransformer.html | 2 +- docs/doc/Doing.html | 2 +- docs/doc/Doing/ArrayCleanup.html | 2 +- docs/doc/Doing/ArrayNestedHash.html | 2 +- docs/doc/Doing/ArrayTags.html | 2 +- docs/doc/Doing/ByDayExport.html | 2 +- docs/doc/Doing/CSVExport.html | 2 +- docs/doc/Doing/CalendarImport.html | 2 +- docs/doc/Doing/Change.html | 2 +- docs/doc/Doing/Changes.html | 2 +- docs/doc/Doing/ChronifyArray.html | 2 +- docs/doc/Doing/ChronifyNumeric.html | 2 +- docs/doc/Doing/ChronifyString.html | 2 +- docs/doc/Doing/Color.html | 2 +- docs/doc/Doing/Completion.html | 2 +- .../doc/Doing/Completion/BashCompletions.html | 2 +- docs/doc/Doing/Completion/FigCompletions.html | 2 +- .../doc/Doing/Completion/FishCompletions.html | 2 +- docs/doc/Doing/Completion/StringUtils.html | 2 +- docs/doc/Doing/Completion/ZshCompletions.html | 2 +- docs/doc/Doing/Configuration.html | 2 +- docs/doc/Doing/DayOneRenderer.html | 2 +- docs/doc/Doing/DayoneExport.html | 2 +- docs/doc/Doing/DoingExport.html | 2 +- docs/doc/Doing/DoingImport.html | 2 +- docs/doc/Doing/Entry.html | 2 +- docs/doc/Doing/Errors.html | 2 +- docs/doc/Doing/Errors/DoingNoTraceError.html | 2 +- docs/doc/Doing/Errors/DoingRuntimeError.html | 2 +- docs/doc/Doing/Errors/DoingStandardError.html | 2 +- docs/doc/Doing/Errors/EmptyInput.html | 2 +- docs/doc/Doing/Errors/HistoryLimitError.html | 2 +- docs/doc/Doing/Errors/InvalidPlugin.html | 2 +- docs/doc/Doing/Errors/MissingBackupFile.html | 2 +- docs/doc/Doing/Errors/NoResults.html | 2 +- docs/doc/Doing/Errors/PluginException.html | 2 +- docs/doc/Doing/Errors/UserCancelled.html | 2 +- docs/doc/Doing/Errors/WrongCommand.html | 2 +- docs/doc/Doing/HTMLExport.html | 2 +- docs/doc/Doing/Hooks.html | 2 +- docs/doc/Doing/Item.html | 2 +- docs/doc/Doing/ItemDates.html | 2 +- docs/doc/Doing/ItemQuery.html | 2 +- docs/doc/Doing/ItemState.html | 2 +- docs/doc/Doing/ItemTags.html | 2 +- docs/doc/Doing/Items.html | 2 +- docs/doc/Doing/JSONExport.html | 2 +- docs/doc/Doing/JSONImport.html | 2 +- docs/doc/Doing/Logger.html | 2 +- docs/doc/Doing/MarkdownExport.html | 2 +- docs/doc/Doing/Note.html | 2 +- docs/doc/Doing/Pager.html | 2 +- docs/doc/Doing/Plugins.html | 2 +- docs/doc/Doing/Prompt.html | 2 +- docs/doc/Doing/PromptChoose.html | 2 +- docs/doc/Doing/PromptFZF.html | 2 +- docs/doc/Doing/PromptInput.html | 2 +- docs/doc/Doing/PromptSTD.html | 2 +- docs/doc/Doing/PromptYN.html | 2 +- docs/doc/Doing/Section.html | 2 +- docs/doc/Doing/StringHighlight.html | 2 +- docs/doc/Doing/StringNormalize.html | 2 +- docs/doc/Doing/StringQuery.html | 2 +- docs/doc/Doing/StringTags.html | 2 +- docs/doc/Doing/StringTransform.html | 2 +- docs/doc/Doing/StringTruncate.html | 2 +- docs/doc/Doing/StringURL.html | 2 +- docs/doc/Doing/SymbolNormalize.html | 2 +- docs/doc/Doing/TaskPaperExport.html | 2 +- docs/doc/Doing/TemplateExport.html | 2 +- docs/doc/Doing/TemplateString.html | 2 +- docs/doc/Doing/TimingImport.html | 2 +- docs/doc/Doing/Types.html | 2 +- docs/doc/Doing/Util.html | 2 +- docs/doc/Doing/Util/Backup.html | 2 +- docs/doc/Doing/Version.html | 2 +- docs/doc/Doing/WWID.html | 2 +- docs/doc/FalseClass.html | 2 +- docs/doc/GLI.html | 2 +- docs/doc/GLI/Commands.html | 2 +- docs/doc/GLI/Commands/Help.html | 2 +- .../Commands/MarkdownDocumentListener.html | 2 +- docs/doc/Hash.html | 2 +- docs/doc/Numeric.html | 2 +- docs/doc/Object.html | 2 +- docs/doc/PhraseParser.html | 2 +- docs/doc/PhraseParser/Operator.html | 2 +- docs/doc/PhraseParser/PhraseClause.html | 2 +- docs/doc/PhraseParser/Query.html | 2 +- docs/doc/PhraseParser/QueryParser.html | 2 +- docs/doc/PhraseParser/QueryTransformer.html | 2 +- docs/doc/PhraseParser/TermClause.html | 2 +- docs/doc/Status.html | 2 +- docs/doc/String.html | 2 +- docs/doc/Symbol.html | 2 +- docs/doc/Time.html | 2 +- docs/doc/TrueClass.html | 2 +- docs/doc/_index.html | 2 +- docs/doc/file.README.html | 2 +- docs/doc/index.html | 2 +- docs/doc/top-level-namespace.html | 2 +- doing.gemspec | 9 ++++- lib/doing/phrase_parser.rb | 32 +++++---------- lib/doing/version.rb | 2 +- test/test.doingrc | 1 + 114 files changed, 167 insertions(+), 135 deletions(-) diff --git a/Gemfile b/Gemfile index 817f62a8..85493de1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,5 @@ source 'http://rubygems.org' + +gem 'rubocop' + gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 8f1aea71..2bf9844b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,13 +1,18 @@ PATH remote: . specs: - doing (2.1.87) + doing (2.1.88) + base64 (~> 0.2) chronic (~> 0.10, >= 0.10.2) + csv (~> 3.3) deep_merge (~> 1.2, >= 1.2.1) gli (~> 2.20, >= 2.20.1) haml (~> 5.0.0, >= 5.0.0) + logger (~> 1.4, >= 1.4.2) + ostruct (~> 0.6) parslet (~> 2.0, >= 2.0.0) plist (~> 3.6, >= 3.6.0) + reline (~> 0.6) safe_yaml (~> 1.0) tty-link (~> 0.1, >= 0.1.1) tty-markdown (~> 0.7, >= 0.7.0) @@ -19,28 +24,57 @@ PATH GEM remote: http://rubygems.org/ specs: + ast (2.4.2) + base64 (0.2.0) chronic (0.10.2) + csv (3.3.2) deep_merge (1.2.2) github-markup (4.0.2) gli (2.22.0) haml (5.0.4) temple (>= 0.8.0) tilt + io-console (0.8.0) + json (2.9.1) kramdown (2.5.1) rexml (>= 3.3.9) + language_server-protocol (3.17.0.3) + logger (1.6.4) + ostruct (0.6.1) parallel (1.24.0) parallel_tests (3.13.0) parallel + parser (3.3.6.0) + ast (~> 2.4.1) + racc parslet (2.0.0) pastel (0.8.0) tty-color (~> 0.5) plist (3.7.1) power_assert (2.0.3) + racc (1.8.1) + rainbow (3.1.1) rake (13.0.6) rdoc (6.3.4.1) redcarpet (3.6.0) + regexp_parser (2.9.3) + reline (0.6.0) + io-console (~> 0.5) rexml (3.3.9) rouge (4.5.1) + rubocop (1.69.2) + json (~> 2.3) + language_server-protocol (>= 3.17.0) + parallel (~> 1.10) + parser (>= 3.3.0.2) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.36.2, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.37.0) + parser (>= 3.3.1.0) + ruby-progressbar (1.13.0) safe_yaml (1.0.5) strings (0.2.1) strings-ansi (~> 0.2) @@ -89,9 +123,10 @@ DEPENDENCIES rake (~> 13.0, >= 13.0.1) rdoc (~> 6.3.1) redcarpet (~> 3.5, >= 3.5.1) + rubocop test-unit (~> 3.4.4) tty-spinner (~> 0.9, >= 0.9.3) yard (~> 0.9, >= 0.9.36) BUNDLED WITH - 2.2.17 + 2.5.23 diff --git a/README.md b/README.md index 9412a76d..2a95809e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ _If you're one of the rare people like me who find this useful, feel free to -The current version of `doing` is 2.1.86. +The current version of `doing` is 2.1.87. Find all of the documentation in the [doing wiki][wiki]. diff --git a/docs/doc/Array.html b/docs/doc/Array.html index f2112dff..5d751f19 100644 --- a/docs/doc/Array.html +++ b/docs/doc/Array.html @@ -350,7 +350,7 @@

diff --git a/docs/doc/BooleanTermParser.html b/docs/doc/BooleanTermParser.html index 97af0505..c14272b5 100644 --- a/docs/doc/BooleanTermParser.html +++ b/docs/doc/BooleanTermParser.html @@ -105,7 +105,7 @@

Defined Under Namespace

diff --git a/docs/doc/BooleanTermParser/Clause.html b/docs/doc/BooleanTermParser/Clause.html index 7e0d95da..1ad2e043 100644 --- a/docs/doc/BooleanTermParser/Clause.html +++ b/docs/doc/BooleanTermParser/Clause.html @@ -283,7 +283,7 @@

diff --git a/docs/doc/BooleanTermParser/Operator.html b/docs/doc/BooleanTermParser/Operator.html index 4d222223..58d05b3f 100644 --- a/docs/doc/BooleanTermParser/Operator.html +++ b/docs/doc/BooleanTermParser/Operator.html @@ -162,7 +162,7 @@

diff --git a/docs/doc/BooleanTermParser/Query.html b/docs/doc/BooleanTermParser/Query.html index bd1ae553..7fe48bd7 100644 --- a/docs/doc/BooleanTermParser/Query.html +++ b/docs/doc/BooleanTermParser/Query.html @@ -407,7 +407,7 @@

diff --git a/docs/doc/BooleanTermParser/QueryParser.html b/docs/doc/BooleanTermParser/QueryParser.html index f56411bb..d16d5571 100644 --- a/docs/doc/BooleanTermParser/QueryParser.html +++ b/docs/doc/BooleanTermParser/QueryParser.html @@ -125,7 +125,7 @@

Overview

diff --git a/docs/doc/BooleanTermParser/QueryTransformer.html b/docs/doc/BooleanTermParser/QueryTransformer.html index a5afefef..6801dd08 100644 --- a/docs/doc/BooleanTermParser/QueryTransformer.html +++ b/docs/doc/BooleanTermParser/QueryTransformer.html @@ -114,7 +114,7 @@ diff --git a/docs/doc/Doing.html b/docs/doc/Doing.html index f341b05f..15734bf0 100644 --- a/docs/doc/Doing.html +++ b/docs/doc/Doing.html @@ -138,7 +138,7 @@

diff --git a/docs/doc/Doing/ArrayCleanup.html b/docs/doc/Doing/ArrayCleanup.html index bb3127e0..07d489ab 100644 --- a/docs/doc/Doing/ArrayCleanup.html +++ b/docs/doc/Doing/ArrayCleanup.html @@ -306,7 +306,7 @@

diff --git a/docs/doc/Doing/ArrayNestedHash.html b/docs/doc/Doing/ArrayNestedHash.html index 0ce26fc4..e6b8ddc2 100644 --- a/docs/doc/Doing/ArrayNestedHash.html +++ b/docs/doc/Doing/ArrayNestedHash.html @@ -188,7 +188,7 @@

diff --git a/docs/doc/Doing/ArrayTags.html b/docs/doc/Doing/ArrayTags.html index e72de0b2..819362e1 100644 --- a/docs/doc/Doing/ArrayTags.html +++ b/docs/doc/Doing/ArrayTags.html @@ -414,7 +414,7 @@

Convert an array of strings wit

diff --git a/docs/doc/Doing/ByDayExport.html b/docs/doc/Doing/ByDayExport.html index 8558bc26..7595b75c 100644 --- a/docs/doc/Doing/ByDayExport.html +++ b/docs/doc/Doing/ByDayExport.html @@ -196,7 +196,7 @@

diff --git a/docs/doc/Doing/CSVExport.html b/docs/doc/Doing/CSVExport.html index 2cb888c0..766b4392 100644 --- a/docs/doc/Doing/CSVExport.html +++ b/docs/doc/Doing/CSVExport.html @@ -256,7 +256,7 @@

diff --git a/docs/doc/Doing/CalendarImport.html b/docs/doc/Doing/CalendarImport.html index 79a6a5fc..c7f15e31 100644 --- a/docs/doc/Doing/CalendarImport.html +++ b/docs/doc/Doing/CalendarImport.html @@ -222,7 +222,7 @@

diff --git a/docs/doc/Doing/Change.html b/docs/doc/Doing/Change.html index 6494a0d9..ed5776a3 100644 --- a/docs/doc/Doing/Change.html +++ b/docs/doc/Doing/Change.html @@ -678,7 +678,7 @@

diff --git a/docs/doc/Doing/Changes.html b/docs/doc/Doing/Changes.html index a9618290..22f5c851 100644 --- a/docs/doc/Doing/Changes.html +++ b/docs/doc/Doing/Changes.html @@ -458,7 +458,7 @@

diff --git a/docs/doc/Doing/ChronifyArray.html b/docs/doc/Doing/ChronifyArray.html index b1fcec26..3e3d65d1 100644 --- a/docs/doc/Doing/ChronifyArray.html +++ b/docs/doc/Doing/ChronifyArray.html @@ -337,7 +337,7 @@

diff --git a/docs/doc/Doing/ChronifyNumeric.html b/docs/doc/Doing/ChronifyNumeric.html index 683b5635..a23311e6 100644 --- a/docs/doc/Doing/ChronifyNumeric.html +++ b/docs/doc/Doing/ChronifyNumeric.html @@ -261,7 +261,7 @@

diff --git a/docs/doc/Doing/ChronifyString.html b/docs/doc/Doing/ChronifyString.html index 13eb182a..9db0220b 100644 --- a/docs/doc/Doing/ChronifyString.html +++ b/docs/doc/Doing/ChronifyString.html @@ -672,7 +672,7 @@

diff --git a/docs/doc/Doing/Color.html b/docs/doc/Doing/Color.html index 175fbd21..1d632edc 100644 --- a/docs/doc/Doing/Color.html +++ b/docs/doc/Doing/Color.html @@ -687,7 +687,7 @@

diff --git a/docs/doc/Doing/Completion.html b/docs/doc/Doing/Completion.html index 37bd2dc8..d3bb4f27 100644 --- a/docs/doc/Doing/Completion.html +++ b/docs/doc/Doing/Completion.html @@ -540,7 +540,7 @@

diff --git a/docs/doc/Doing/Completion/BashCompletions.html b/docs/doc/Doing/Completion/BashCompletions.html index 40b9053f..50d35e8d 100644 --- a/docs/doc/Doing/Completion/BashCompletions.html +++ b/docs/doc/Doing/Completion/BashCompletions.html @@ -435,7 +435,7 @@

diff --git a/docs/doc/Doing/Completion/FigCompletions.html b/docs/doc/Doing/Completion/FigCompletions.html index 36bf171f..59f69b96 100644 --- a/docs/doc/Doing/Completion/FigCompletions.html +++ b/docs/doc/Doing/Completion/FigCompletions.html @@ -435,7 +435,7 @@

- Generated on Sat Dec 14 15:35:49 2024 by + Generated on Sat Dec 14 15:35:59 2024 by yard 0.9.37 (ruby-3.3.0). diff --git a/docs/doc/Doing/Completion/FishCompletions.html b/docs/doc/Doing/Completion/FishCompletions.html index 183e1d2d..b73d329c 100644 --- a/docs/doc/Doing/Completion/FishCompletions.html +++ b/docs/doc/Doing/Completion/FishCompletions.html @@ -435,7 +435,7 @@

- Generated on Sat Dec 14 15:35:49 2024 by + Generated on Sat Dec 14 15:35:59 2024 by yard 0.9.37 (ruby-3.3.0). diff --git a/docs/doc/Doing/Completion/StringUtils.html b/docs/doc/Doing/Completion/StringUtils.html index d1ac665b..d9c16aee 100644 --- a/docs/doc/Doing/Completion/StringUtils.html +++ b/docs/doc/Doing/Completion/StringUtils.html @@ -277,7 +277,7 @@

diff --git a/docs/doc/Doing/Completion/ZshCompletions.html b/docs/doc/Doing/Completion/ZshCompletions.html index 058634c3..547fd1b8 100644 --- a/docs/doc/Doing/Completion/ZshCompletions.html +++ b/docs/doc/Doing/Completion/ZshCompletions.html @@ -435,7 +435,7 @@

- Generated on Sat Dec 14 15:35:49 2024 by + Generated on Sat Dec 14 15:35:59 2024 by yard 0.9.37 (ruby-3.3.0). diff --git a/docs/doc/Doing/Configuration.html b/docs/doc/Doing/Configuration.html index 8a426f60..60c076ec 100644 --- a/docs/doc/Doing/Configuration.html +++ b/docs/doc/Doing/Configuration.html @@ -1228,7 +1228,7 @@

diff --git a/docs/doc/Doing/DayOneRenderer.html b/docs/doc/Doing/DayOneRenderer.html index b13d3f36..2d4c6f47 100644 --- a/docs/doc/Doing/DayOneRenderer.html +++ b/docs/doc/Doing/DayOneRenderer.html @@ -373,7 +373,7 @@

diff --git a/docs/doc/Doing/DayoneExport.html b/docs/doc/Doing/DayoneExport.html index c52c3802..c5937857 100644 --- a/docs/doc/Doing/DayoneExport.html +++ b/docs/doc/Doing/DayoneExport.html @@ -280,7 +280,7 @@

diff --git a/docs/doc/Doing/DoingExport.html b/docs/doc/Doing/DoingExport.html index e4a1bf44..b15f064f 100644 --- a/docs/doc/Doing/DoingExport.html +++ b/docs/doc/Doing/DoingExport.html @@ -196,7 +196,7 @@

diff --git a/docs/doc/Doing/DoingImport.html b/docs/doc/Doing/DoingImport.html index faf5d7f7..f912e2f8 100644 --- a/docs/doc/Doing/DoingImport.html +++ b/docs/doc/Doing/DoingImport.html @@ -381,7 +381,7 @@

diff --git a/docs/doc/Doing/Entry.html b/docs/doc/Doing/Entry.html index 18044662..aa0d29a9 100644 --- a/docs/doc/Doing/Entry.html +++ b/docs/doc/Doing/Entry.html @@ -476,7 +476,7 @@

diff --git a/docs/doc/Doing/Errors.html b/docs/doc/Doing/Errors.html index a413ac54..3a4b8329 100644 --- a/docs/doc/Doing/Errors.html +++ b/docs/doc/Doing/Errors.html @@ -181,7 +181,7 @@

diff --git a/docs/doc/Doing/Errors/DoingNoTraceError.html b/docs/doc/Doing/Errors/DoingNoTraceError.html index 6f7c75f0..676a3339 100644 --- a/docs/doc/Doing/Errors/DoingNoTraceError.html +++ b/docs/doc/Doing/Errors/DoingNoTraceError.html @@ -180,7 +180,7 @@

diff --git a/docs/doc/Doing/Errors/DoingRuntimeError.html b/docs/doc/Doing/Errors/DoingRuntimeError.html index 45814224..444f742e 100644 --- a/docs/doc/Doing/Errors/DoingRuntimeError.html +++ b/docs/doc/Doing/Errors/DoingRuntimeError.html @@ -180,7 +180,7 @@

diff --git a/docs/doc/Doing/Errors/DoingStandardError.html b/docs/doc/Doing/Errors/DoingStandardError.html index 7ec7096c..af5c000f 100644 --- a/docs/doc/Doing/Errors/DoingStandardError.html +++ b/docs/doc/Doing/Errors/DoingStandardError.html @@ -176,7 +176,7 @@

diff --git a/docs/doc/Doing/Errors/EmptyInput.html b/docs/doc/Doing/Errors/EmptyInput.html index b0a00ac3..560e9f22 100644 --- a/docs/doc/Doing/Errors/EmptyInput.html +++ b/docs/doc/Doing/Errors/EmptyInput.html @@ -184,7 +184,7 @@

diff --git a/docs/doc/Doing/Errors/HistoryLimitError.html b/docs/doc/Doing/Errors/HistoryLimitError.html index db4f23ea..eaa97938 100644 --- a/docs/doc/Doing/Errors/HistoryLimitError.html +++ b/docs/doc/Doing/Errors/HistoryLimitError.html @@ -184,7 +184,7 @@

diff --git a/docs/doc/Doing/Errors/InvalidPlugin.html b/docs/doc/Doing/Errors/InvalidPlugin.html index d466f0ab..8c447d3b 100644 --- a/docs/doc/Doing/Errors/InvalidPlugin.html +++ b/docs/doc/Doing/Errors/InvalidPlugin.html @@ -184,7 +184,7 @@

diff --git a/docs/doc/Doing/Errors/MissingBackupFile.html b/docs/doc/Doing/Errors/MissingBackupFile.html index e0b39f5f..2e777335 100644 --- a/docs/doc/Doing/Errors/MissingBackupFile.html +++ b/docs/doc/Doing/Errors/MissingBackupFile.html @@ -184,7 +184,7 @@

diff --git a/docs/doc/Doing/Errors/NoResults.html b/docs/doc/Doing/Errors/NoResults.html index 4715f5d7..cc47514b 100644 --- a/docs/doc/Doing/Errors/NoResults.html +++ b/docs/doc/Doing/Errors/NoResults.html @@ -184,7 +184,7 @@

diff --git a/docs/doc/Doing/Errors/PluginException.html b/docs/doc/Doing/Errors/PluginException.html index d3f2b880..e59061f8 100644 --- a/docs/doc/Doing/Errors/PluginException.html +++ b/docs/doc/Doing/Errors/PluginException.html @@ -238,7 +238,7 @@

diff --git a/docs/doc/Doing/Errors/UserCancelled.html b/docs/doc/Doing/Errors/UserCancelled.html index 93ee73eb..8c4afcd7 100644 --- a/docs/doc/Doing/Errors/UserCancelled.html +++ b/docs/doc/Doing/Errors/UserCancelled.html @@ -184,7 +184,7 @@

diff --git a/docs/doc/Doing/Errors/WrongCommand.html b/docs/doc/Doing/Errors/WrongCommand.html index 17c3bca8..82b58ef5 100644 --- a/docs/doc/Doing/Errors/WrongCommand.html +++ b/docs/doc/Doing/Errors/WrongCommand.html @@ -184,7 +184,7 @@

diff --git a/docs/doc/Doing/HTMLExport.html b/docs/doc/Doing/HTMLExport.html index 149af94c..d0256f2c 100644 --- a/docs/doc/Doing/HTMLExport.html +++ b/docs/doc/Doing/HTMLExport.html @@ -246,7 +246,7 @@

diff --git a/docs/doc/Doing/Hooks.html b/docs/doc/Doing/Hooks.html index 4aa696ca..9a1aadcd 100644 --- a/docs/doc/Doing/Hooks.html +++ b/docs/doc/Doing/Hooks.html @@ -354,7 +354,7 @@

diff --git a/docs/doc/Doing/Item.html b/docs/doc/Doing/Item.html index 56ecdbc1..ee624da2 100644 --- a/docs/doc/Doing/Item.html +++ b/docs/doc/Doing/Item.html @@ -991,7 +991,7 @@

diff --git a/docs/doc/Doing/ItemDates.html b/docs/doc/Doing/ItemDates.html index 9cf23430..fa0ea8fd 100644 --- a/docs/doc/Doing/ItemDates.html +++ b/docs/doc/Doing/ItemDates.html @@ -554,7 +554,7 @@

diff --git a/docs/doc/Doing/ItemQuery.html b/docs/doc/Doing/ItemQuery.html index 2c7db544..e887c58a 100644 --- a/docs/doc/Doing/ItemQuery.html +++ b/docs/doc/Doing/ItemQuery.html @@ -685,7 +685,7 @@

diff --git a/docs/doc/Doing/ItemState.html b/docs/doc/Doing/ItemState.html index ce7cf90c..c41ce801 100644 --- a/docs/doc/Doing/ItemState.html +++ b/docs/doc/Doing/ItemState.html @@ -377,7 +377,7 @@

diff --git a/docs/doc/Doing/ItemTags.html b/docs/doc/Doing/ItemTags.html index 59721b60..207251cc 100644 --- a/docs/doc/Doing/ItemTags.html +++ b/docs/doc/Doing/ItemTags.html @@ -488,7 +488,7 @@

diff --git a/docs/doc/Doing/Items.html b/docs/doc/Doing/Items.html index 1c4339ba..9e2fb36d 100644 --- a/docs/doc/Doing/Items.html +++ b/docs/doc/Doing/Items.html @@ -1792,7 +1792,7 @@

diff --git a/docs/doc/Doing/JSONExport.html b/docs/doc/Doing/JSONExport.html index 88513ba3..0b42fcca 100644 --- a/docs/doc/Doing/JSONExport.html +++ b/docs/doc/Doing/JSONExport.html @@ -212,7 +212,7 @@

diff --git a/docs/doc/Doing/JSONImport.html b/docs/doc/Doing/JSONImport.html index 83a3617d..52ec01e1 100644 --- a/docs/doc/Doing/JSONImport.html +++ b/docs/doc/Doing/JSONImport.html @@ -285,7 +285,7 @@

diff --git a/docs/doc/Doing/Logger.html b/docs/doc/Doing/Logger.html index b3065bdf..aa848fcd 100644 --- a/docs/doc/Doing/Logger.html +++ b/docs/doc/Doing/Logger.html @@ -1797,7 +1797,7 @@

diff --git a/docs/doc/Doing/MarkdownExport.html b/docs/doc/Doing/MarkdownExport.html index 5869d6bd..696aa70e 100644 --- a/docs/doc/Doing/MarkdownExport.html +++ b/docs/doc/Doing/MarkdownExport.html @@ -256,7 +256,7 @@

diff --git a/docs/doc/Doing/Note.html b/docs/doc/Doing/Note.html index 64a0381f..c58b42e5 100644 --- a/docs/doc/Doing/Note.html +++ b/docs/doc/Doing/Note.html @@ -747,7 +747,7 @@

diff --git a/docs/doc/Doing/Pager.html b/docs/doc/Doing/Pager.html index d4e6afc3..4e181d9f 100644 --- a/docs/doc/Doing/Pager.html +++ b/docs/doc/Doing/Pager.html @@ -296,7 +296,7 @@

diff --git a/docs/doc/Doing/Plugins.html b/docs/doc/Doing/Plugins.html index 001a039f..d4c644e4 100644 --- a/docs/doc/Doing/Plugins.html +++ b/docs/doc/Doing/Plugins.html @@ -1340,7 +1340,7 @@

diff --git a/docs/doc/Doing/Prompt.html b/docs/doc/Doing/Prompt.html index 895fdc06..7167cd15 100644 --- a/docs/doc/Doing/Prompt.html +++ b/docs/doc/Doing/Prompt.html @@ -326,7 +326,7 @@

diff --git a/docs/doc/Doing/PromptChoose.html b/docs/doc/Doing/PromptChoose.html index 627e3f43..6e088360 100644 --- a/docs/doc/Doing/PromptChoose.html +++ b/docs/doc/Doing/PromptChoose.html @@ -474,7 +474,7 @@

diff --git a/docs/doc/Doing/PromptFZF.html b/docs/doc/Doing/PromptFZF.html index d59c4e9f..e85ec072 100644 --- a/docs/doc/Doing/PromptFZF.html +++ b/docs/doc/Doing/PromptFZF.html @@ -381,7 +381,7 @@

diff --git a/docs/doc/Doing/PromptInput.html b/docs/doc/Doing/PromptInput.html index a1935c6c..f292999b 100644 --- a/docs/doc/Doing/PromptInput.html +++ b/docs/doc/Doing/PromptInput.html @@ -562,7 +562,7 @@

diff --git a/docs/doc/Doing/PromptSTD.html b/docs/doc/Doing/PromptSTD.html index 34132ba4..deae75a4 100644 --- a/docs/doc/Doing/PromptSTD.html +++ b/docs/doc/Doing/PromptSTD.html @@ -283,7 +283,7 @@

diff --git a/docs/doc/Doing/PromptYN.html b/docs/doc/Doing/PromptYN.html index 380c5bfb..31b38457 100644 --- a/docs/doc/Doing/PromptYN.html +++ b/docs/doc/Doing/PromptYN.html @@ -227,7 +227,7 @@

diff --git a/docs/doc/Doing/Section.html b/docs/doc/Doing/Section.html index 30277018..43f86c80 100644 --- a/docs/doc/Doing/Section.html +++ b/docs/doc/Doing/Section.html @@ -400,7 +400,7 @@

diff --git a/docs/doc/Doing/StringHighlight.html b/docs/doc/Doing/StringHighlight.html index aef9b86a..02c71c43 100644 --- a/docs/doc/Doing/StringHighlight.html +++ b/docs/doc/Doing/StringHighlight.html @@ -523,7 +523,7 @@

diff --git a/docs/doc/Doing/StringNormalize.html b/docs/doc/Doing/StringNormalize.html index 6fa01b26..cc1c8430 100644 --- a/docs/doc/Doing/StringNormalize.html +++ b/docs/doc/Doing/StringNormalize.html @@ -1036,7 +1036,7 @@

diff --git a/docs/doc/Doing/StringQuery.html b/docs/doc/Doing/StringQuery.html index b20983b2..f358f8c5 100644 --- a/docs/doc/Doing/StringQuery.html +++ b/docs/doc/Doing/StringQuery.html @@ -771,7 +771,7 @@

diff --git a/docs/doc/Doing/StringTags.html b/docs/doc/Doing/StringTags.html index 12a5ae0b..2e36767f 100644 --- a/docs/doc/Doing/StringTags.html +++ b/docs/doc/Doing/StringTags.html @@ -874,7 +874,7 @@

diff --git a/docs/doc/Doing/StringTransform.html b/docs/doc/Doing/StringTransform.html index 356ec89f..276739bf 100644 --- a/docs/doc/Doing/StringTransform.html +++ b/docs/doc/Doing/StringTransform.html @@ -589,7 +589,7 @@

diff --git a/docs/doc/Doing/StringTruncate.html b/docs/doc/Doing/StringTruncate.html index 28bba39c..5080a408 100644 --- a/docs/doc/Doing/StringTruncate.html +++ b/docs/doc/Doing/StringTruncate.html @@ -438,7 +438,7 @@

diff --git a/docs/doc/Doing/StringURL.html b/docs/doc/Doing/StringURL.html index 638baa41..da851faf 100644 --- a/docs/doc/Doing/StringURL.html +++ b/docs/doc/Doing/StringURL.html @@ -399,7 +399,7 @@

diff --git a/docs/doc/Doing/SymbolNormalize.html b/docs/doc/Doing/SymbolNormalize.html index a93fb6e9..a0ad4a7c 100644 --- a/docs/doc/Doing/SymbolNormalize.html +++ b/docs/doc/Doing/SymbolNormalize.html @@ -331,7 +331,7 @@

diff --git a/docs/doc/Doing/TaskPaperExport.html b/docs/doc/Doing/TaskPaperExport.html index 31dd8183..f163f7cf 100644 --- a/docs/doc/Doing/TaskPaperExport.html +++ b/docs/doc/Doing/TaskPaperExport.html @@ -212,7 +212,7 @@

diff --git a/docs/doc/Doing/TemplateExport.html b/docs/doc/Doing/TemplateExport.html index dd3c62c5..0be7cabf 100644 --- a/docs/doc/Doing/TemplateExport.html +++ b/docs/doc/Doing/TemplateExport.html @@ -239,7 +239,7 @@

diff --git a/docs/doc/Doing/TemplateString.html b/docs/doc/Doing/TemplateString.html index ff251c37..6fe8cf1e 100644 --- a/docs/doc/Doing/TemplateString.html +++ b/docs/doc/Doing/TemplateString.html @@ -802,7 +802,7 @@

diff --git a/docs/doc/Doing/TimingImport.html b/docs/doc/Doing/TimingImport.html index 0c1fc332..bda3bd25 100644 --- a/docs/doc/Doing/TimingImport.html +++ b/docs/doc/Doing/TimingImport.html @@ -275,7 +275,7 @@

diff --git a/docs/doc/Doing/Types.html b/docs/doc/Doing/Types.html index d7f8441a..2a2d450e 100644 --- a/docs/doc/Doing/Types.html +++ b/docs/doc/Doing/Types.html @@ -241,7 +241,7 @@

diff --git a/docs/doc/Doing/Util.html b/docs/doc/Doing/Util.html index 0481ecc5..5846195b 100644 --- a/docs/doc/Doing/Util.html +++ b/docs/doc/Doing/Util.html @@ -982,7 +982,7 @@

diff --git a/docs/doc/Doing/Util/Backup.html b/docs/doc/Doing/Util/Backup.html index e7e8f8de..f53f74c2 100644 --- a/docs/doc/Doing/Util/Backup.html +++ b/docs/doc/Doing/Util/Backup.html @@ -684,7 +684,7 @@

diff --git a/docs/doc/Doing/Version.html b/docs/doc/Doing/Version.html index 08f7c43b..f4f52ed4 100644 --- a/docs/doc/Doing/Version.html +++ b/docs/doc/Doing/Version.html @@ -513,7 +513,7 @@

diff --git a/docs/doc/Doing/WWID.html b/docs/doc/Doing/WWID.html index a3054c14..4ee6e899 100644 --- a/docs/doc/Doing/WWID.html +++ b/docs/doc/Doing/WWID.html @@ -5155,7 +5155,7 @@

diff --git a/docs/doc/FalseClass.html b/docs/doc/FalseClass.html index beb85c17..1a59fb03 100644 --- a/docs/doc/FalseClass.html +++ b/docs/doc/FalseClass.html @@ -235,7 +235,7 @@

diff --git a/docs/doc/GLI.html b/docs/doc/GLI.html index 656e2275..39a68271 100644 --- a/docs/doc/GLI.html +++ b/docs/doc/GLI.html @@ -107,7 +107,7 @@

Defined Under Namespace

diff --git a/docs/doc/GLI/Commands.html b/docs/doc/GLI/Commands.html index 22f16e20..d65d8fe0 100644 --- a/docs/doc/GLI/Commands.html +++ b/docs/doc/GLI/Commands.html @@ -107,7 +107,7 @@

Defined Under Namespace

diff --git a/docs/doc/GLI/Commands/Help.html b/docs/doc/GLI/Commands/Help.html index cacfa1a1..679f84c9 100644 --- a/docs/doc/GLI/Commands/Help.html +++ b/docs/doc/GLI/Commands/Help.html @@ -175,7 +175,7 @@

diff --git a/docs/doc/GLI/Commands/MarkdownDocumentListener.html b/docs/doc/GLI/Commands/MarkdownDocumentListener.html index 3de62842..675e1f7c 100644 --- a/docs/doc/GLI/Commands/MarkdownDocumentListener.html +++ b/docs/doc/GLI/Commands/MarkdownDocumentListener.html @@ -753,7 +753,7 @@

diff --git a/docs/doc/Hash.html b/docs/doc/Hash.html index b59e9c52..a18f01db 100644 --- a/docs/doc/Hash.html +++ b/docs/doc/Hash.html @@ -1000,7 +1000,7 @@

diff --git a/docs/doc/Numeric.html b/docs/doc/Numeric.html index ab454b5a..d9e36778 100644 --- a/docs/doc/Numeric.html +++ b/docs/doc/Numeric.html @@ -214,7 +214,7 @@

diff --git a/docs/doc/Object.html b/docs/doc/Object.html index 3a1fe6e0..b9bee2f6 100644 --- a/docs/doc/Object.html +++ b/docs/doc/Object.html @@ -193,7 +193,7 @@

diff --git a/docs/doc/PhraseParser.html b/docs/doc/PhraseParser.html index 9996dd7a..3f5d4467 100644 --- a/docs/doc/PhraseParser.html +++ b/docs/doc/PhraseParser.html @@ -105,7 +105,7 @@

Defined Under Namespace

diff --git a/docs/doc/PhraseParser/Operator.html b/docs/doc/PhraseParser/Operator.html index 7a703ca1..d53e8787 100644 --- a/docs/doc/PhraseParser/Operator.html +++ b/docs/doc/PhraseParser/Operator.html @@ -162,7 +162,7 @@

diff --git a/docs/doc/PhraseParser/PhraseClause.html b/docs/doc/PhraseParser/PhraseClause.html index 187c82fd..b076661b 100644 --- a/docs/doc/PhraseParser/PhraseClause.html +++ b/docs/doc/PhraseParser/PhraseClause.html @@ -293,7 +293,7 @@

diff --git a/docs/doc/PhraseParser/Query.html b/docs/doc/PhraseParser/Query.html index b76782fa..95eee28d 100644 --- a/docs/doc/PhraseParser/Query.html +++ b/docs/doc/PhraseParser/Query.html @@ -485,7 +485,7 @@

diff --git a/docs/doc/PhraseParser/QueryParser.html b/docs/doc/PhraseParser/QueryParser.html index 686f1f7e..a44b0fb3 100644 --- a/docs/doc/PhraseParser/QueryParser.html +++ b/docs/doc/PhraseParser/QueryParser.html @@ -126,7 +126,7 @@

Overview

diff --git a/docs/doc/PhraseParser/QueryTransformer.html b/docs/doc/PhraseParser/QueryTransformer.html index 29da8b44..65f800c3 100644 --- a/docs/doc/PhraseParser/QueryTransformer.html +++ b/docs/doc/PhraseParser/QueryTransformer.html @@ -114,7 +114,7 @@ diff --git a/docs/doc/PhraseParser/TermClause.html b/docs/doc/PhraseParser/TermClause.html index 90487f62..b96481eb 100644 --- a/docs/doc/PhraseParser/TermClause.html +++ b/docs/doc/PhraseParser/TermClause.html @@ -283,7 +283,7 @@

diff --git a/docs/doc/Status.html b/docs/doc/Status.html index 7f7a4967..a66e15ec 100644 --- a/docs/doc/Status.html +++ b/docs/doc/Status.html @@ -316,7 +316,7 @@

diff --git a/docs/doc/String.html b/docs/doc/String.html index 4d1ac476..66f6323b 100644 --- a/docs/doc/String.html +++ b/docs/doc/String.html @@ -679,7 +679,7 @@

diff --git a/docs/doc/Symbol.html b/docs/doc/Symbol.html index 82764c7e..e7fb4793 100644 --- a/docs/doc/Symbol.html +++ b/docs/doc/Symbol.html @@ -127,7 +127,7 @@

Methods included from - Generated on Sat Dec 14 15:35:49 2024 by + Generated on Sat Dec 14 15:35:59 2024 by yard 0.9.37 (ruby-3.3.0). diff --git a/docs/doc/Time.html b/docs/doc/Time.html index c911a405..eb237063 100644 --- a/docs/doc/Time.html +++ b/docs/doc/Time.html @@ -411,7 +411,7 @@

diff --git a/docs/doc/TrueClass.html b/docs/doc/TrueClass.html index 2db883ce..4580b28c 100644 --- a/docs/doc/TrueClass.html +++ b/docs/doc/TrueClass.html @@ -235,7 +235,7 @@

diff --git a/docs/doc/_index.html b/docs/doc/_index.html index 68e26f2e..aed290c1 100644 --- a/docs/doc/_index.html +++ b/docs/doc/_index.html @@ -961,7 +961,7 @@

Namespace Listing A-Z

diff --git a/docs/doc/file.README.html b/docs/doc/file.README.html index d04032e0..25822876 100644 --- a/docs/doc/file.README.html +++ b/docs/doc/file.README.html @@ -153,7 +153,7 @@

Changelog

diff --git a/docs/doc/index.html b/docs/doc/index.html index 7a080135..4776cc79 100644 --- a/docs/doc/index.html +++ b/docs/doc/index.html @@ -153,7 +153,7 @@

Changelog

diff --git a/docs/doc/top-level-namespace.html b/docs/doc/top-level-namespace.html index 9f3d803e..4436a0f6 100644 --- a/docs/doc/top-level-namespace.html +++ b/docs/doc/top-level-namespace.html @@ -216,7 +216,7 @@

diff --git a/doing.gemspec b/doing.gemspec index f21d95f3..70f0fc38 100644 --- a/doing.gemspec +++ b/doing.gemspec @@ -1,6 +1,6 @@ # Ensure we require the local version and not one we might have installed already -require './lib/doing/version.rb' -spec = Gem::Specification.new do |s| +require './lib/doing/version' +Gem::Specification.new do |s| s.name = 'doing' s.version = Doing::VERSION s.author = 'Brett Terpstra' @@ -28,12 +28,17 @@ spec = Gem::Specification.new do |s| s.add_development_dependency('test-unit', '~> 3.4.4') s.add_development_dependency('tty-spinner', '~> 0.9', '>= 0.9.3') s.add_development_dependency('yard', '~> 0.9', '>= 0.9.36') + s.add_runtime_dependency('base64', '~> 0.2') s.add_runtime_dependency('chronic', '~> 0.10', '>= 0.10.2') + s.add_runtime_dependency('csv', '~> 3.3') s.add_runtime_dependency('deep_merge', '~> 1.2', '>= 1.2.1') s.add_runtime_dependency('gli', '~> 2.20', '>= 2.20.1') s.add_runtime_dependency('haml', '~>5.0.0', '>= 5.0.0') + s.add_runtime_dependency('logger', '~> 1.4', '>= 1.4.2') + s.add_runtime_dependency('ostruct', '~> 0.6') s.add_runtime_dependency('parslet', '~> 2.0', '>= 2.0.0') s.add_runtime_dependency('plist', '~> 3.6', '>= 3.6.0') + s.add_runtime_dependency('reline', '~> 0.6') s.add_runtime_dependency('safe_yaml', '~> 1.0') s.add_runtime_dependency('tty-link', '~> 0.1', '>= 0.1.1') s.add_runtime_dependency('tty-markdown', '~> 0.7', '>= 0.7.0') diff --git a/lib/doing/phrase_parser.rb b/lib/doing/phrase_parser.rb index 3cdd54c8..aaaf5730 100644 --- a/lib/doing/phrase_parser.rb +++ b/lib/doing/phrase_parser.rb @@ -7,6 +7,8 @@ module PhraseParser # terms. This is done creating multiple types of clauses instead of just one. # A phrase clause generates an Elasticsearch match_phrase query. class QueryParser < Parslet::Parser + CLAUSE_TYPES = %i[should must must_not].freeze + rule(:term) { match('[^\s"]').repeat(1).as(:term) } rule(:quote) { str('"') } rule(:operator) { (str('+') | str('-')).as(:operator) } @@ -19,8 +21,9 @@ class QueryParser < Parslet::Parser root(:query) end + # Transforms the parsed query into a Query object class QueryTransformer < Parslet::Transform - rule(:clause => subtree(:clause)) do + rule(clause: subtree(:clause)) do if clause[:term] TermClause.new(clause[:operator]&.to_s, clause[:term].to_s) elsif clause[:phrase] @@ -33,6 +36,7 @@ class QueryTransformer < Parslet::Transform rule(query: sequence(:clauses)) { Query.new(clauses) } end + # Represents an operator class Operator def self.symbol(str) case str @@ -48,6 +52,7 @@ def self.symbol(str) end end + # Represents a term clause class TermClause attr_accessor :operator, :term @@ -57,7 +62,7 @@ def initialize(operator, term) end end - # Phrase + # Represents a phrase clause class PhraseClause attr_accessor :operator, :phrase @@ -79,27 +84,10 @@ def initialize(clauses) end def to_elasticsearch - query = {} - - if should_clauses.any? - query[:should] = should_clauses.map do |clause| - clause_to_query(clause) - end - end - - if must_clauses.any? - query[:must] = must_clauses.map do |clause| - clause_to_query(clause) - end + CLAUSE_TYPES.each_with_object({}) do |type, query| + clauses = instance_variable_get("@#{type}_clauses") + query[type] = clauses.map { |clause| clause_to_query(clause) } if clauses&.any? end - - if must_not_clauses.any? - query[:must_not] = must_not_clauses.map do |clause| - clause_to_query(clause) - end - end - - query end def clause_to_query(clause) diff --git a/lib/doing/version.rb b/lib/doing/version.rb index e3823bb7..b7941e14 100644 --- a/lib/doing/version.rb +++ b/lib/doing/version.rb @@ -1,3 +1,3 @@ module Doing - VERSION = '2.1.87' + VERSION = '2.1.88' end diff --git a/test/test.doingrc b/test/test.doingrc index b6cb3cd5..8b59f005 100644 --- a/test/test.doingrc +++ b/test/test.doingrc @@ -128,3 +128,4 @@ search: highlight: false interaction: confirm_longer_than: 5h +doing_file_sort: asc