dsu 2.4.3 → 3.0.0.alpha.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +12 -0
  3. data/CHANGELOG.md +181 -204
  4. data/Gemfile.lock +13 -13
  5. data/README.md +7 -8
  6. data/Rakefile +6 -0
  7. data/current_project.bak +4 -0
  8. data/lib/dsu/cli.rb +24 -6
  9. data/lib/dsu/crud/json_file.rb +3 -0
  10. data/lib/dsu/migration/version.rb +1 -1
  11. data/lib/dsu/models/color_theme.rb +7 -58
  12. data/lib/dsu/models/configuration.rb +18 -3
  13. data/lib/dsu/models/entry_group.rb +0 -7
  14. data/lib/dsu/models/migration_version.rb +0 -1
  15. data/lib/dsu/models/project.rb +295 -0
  16. data/lib/dsu/presenters/base_presenter_ex.rb +1 -12
  17. data/lib/dsu/presenters/export/all_presenter.rb +14 -19
  18. data/lib/dsu/presenters/export/dates_presenter.rb +17 -20
  19. data/lib/dsu/presenters/import/all_presenter.rb +20 -25
  20. data/lib/dsu/presenters/import/dates_presenter.rb +25 -27
  21. data/lib/dsu/presenters/import/import_entry.rb +22 -0
  22. data/lib/dsu/presenters/import/import_file.rb +9 -1
  23. data/lib/dsu/presenters/project/create_presenter.rb +44 -0
  24. data/lib/dsu/presenters/project/delete_by_number_presenter.rb +54 -0
  25. data/lib/dsu/presenters/project/delete_presenter.rb +53 -0
  26. data/lib/dsu/presenters/project/list_presenter.rb +24 -0
  27. data/lib/dsu/presenters/project/rename_by_number_presenter.rb +63 -0
  28. data/lib/dsu/presenters/project/rename_presenter.rb +57 -0
  29. data/lib/dsu/presenters/project/use_by_number_presenter.rb +53 -0
  30. data/lib/dsu/presenters/project/use_presenter.rb +52 -0
  31. data/lib/dsu/services/entry_group/exporter_service.rb +22 -5
  32. data/lib/dsu/services/entry_group/importer_service.rb +41 -8
  33. data/lib/dsu/services/project/hydrator_service.rb +40 -0
  34. data/lib/dsu/services/project/rename_service.rb +70 -0
  35. data/lib/dsu/subcommands/export.rb +4 -2
  36. data/lib/dsu/subcommands/import.rb +7 -3
  37. data/lib/dsu/subcommands/project.rb +149 -0
  38. data/lib/dsu/support/ask.rb +10 -3
  39. data/lib/dsu/support/color_themable.rb +1 -1
  40. data/lib/dsu/support/command_hookable.rb +7 -2
  41. data/lib/dsu/support/descriptable.rb +5 -21
  42. data/lib/dsu/support/fileable.rb +39 -1
  43. data/lib/dsu/support/project_file_system.rb +121 -0
  44. data/lib/dsu/support/short_string.rb +24 -0
  45. data/lib/dsu/support/time_comparable.rb +2 -0
  46. data/lib/dsu/support/transform_project_name.rb +24 -0
  47. data/lib/dsu/validators/project_name_validator.rb +58 -0
  48. data/lib/dsu/version.rb +1 -1
  49. data/lib/dsu/views/base_list_view.rb +41 -0
  50. data/lib/dsu/views/export.rb +60 -6
  51. data/lib/dsu/views/import.rb +83 -7
  52. data/lib/dsu/views/import_dates.rb +17 -0
  53. data/lib/dsu/views/project/create.rb +87 -0
  54. data/lib/dsu/views/project/delete.rb +96 -0
  55. data/lib/dsu/views/project/delete_by_number.rb +19 -0
  56. data/lib/dsu/views/project/list.rb +115 -0
  57. data/lib/dsu/views/project/rename.rb +98 -0
  58. data/lib/dsu/views/project/rename_by_number.rb +21 -0
  59. data/lib/dsu/views/project/use.rb +97 -0
  60. data/lib/dsu/views/project/use_by_number.rb +19 -0
  61. data/lib/dsu.rb +2 -10
  62. data/lib/locales/en/active_record.yml +9 -0
  63. data/lib/locales/en/commands.yml +9 -3
  64. data/lib/locales/en/miscellaneous.yml +4 -0
  65. data/lib/locales/en/services.yml +4 -0
  66. data/lib/locales/en/subcommands.yml +247 -15
  67. data/project.bak +0 -0
  68. metadata +34 -9
  69. data/lib/dsu/presenters/export/messages.rb +0 -32
  70. data/lib/dsu/presenters/export/nothing_to_export.rb +0 -13
  71. data/lib/dsu/presenters/export/service_callable.rb +0 -20
  72. data/lib/dsu/presenters/import/messages.rb +0 -42
  73. data/lib/dsu/presenters/import/service_callable.rb +0 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c8163f812eaded6f88a8fd25e501ebca51e820f7d93b06ab349a9fb4facecde
4
- data.tar.gz: e18ed74fa803102a3cc957d0b9ce420831ed4054d23d431338af2681a012d236
3
+ metadata.gz: 2588c231eb86067d69a619e6d0abb2d4bf2bcaef6c5b98fe7d6a33f34ff49241
4
+ data.tar.gz: 5cf24d7762067a3d57aa9219ac0e176e5520c5a18a71e0af0b9dad31f670d040
5
5
  SHA512:
6
- metadata.gz: b69dce6d25a7bba32473a8cfbe1c82130ffd19f37a34b8a2c1514f9397add35611dbd8d08da642b03f2eb0c5eab42a2f0b35d20335ed0f9c3f98f19ceeaef9be
7
- data.tar.gz: 353119cd18d19d9d4f77afcf437a35f1ca262aa9da5cdc91d0477a7d7d373490bac75a2d91d21ebd7dca76930bb3fbde53e4e8fa53693e4364239c8942020cd9
6
+ metadata.gz: edf0a827764efa759ec4194badd79fcf9b2734ec9fa4d6d96f90ddcce12b29d9c33e436c1ea7914249f609eae354640c8693ce0d0c5e14a9d8d1d5329126575f
7
+ data.tar.gz: 19f9864924cfa053385e72da1ff7dda211a6dac1c8f14798bbbc10e39e420581a35e760fae11124fd45913d317cc5a2f3f74334a4c23856fb5e35d289d5e6aaa
data/.rubocop.yml CHANGED
@@ -190,3 +190,15 @@ Style/StringMethods:
190
190
  # Checks for use of parentheses around ternary conditions.
191
191
  Style/TernaryParentheses:
192
192
  EnforcedStyle: require_parentheses_when_complex
193
+
194
+ RSpec/NotToNot:
195
+ EnforcedStyle: to_not
196
+ SupportedStyles:
197
+ - to_not
198
+ - not_to
199
+
200
+ RSpec/MultipleExpectations:
201
+ Enabled: false
202
+
203
+ RSpec/MultipleMemoizedHelpers:
204
+ Max: 6
data/CHANGELOG.md CHANGED
@@ -1,323 +1,300 @@
1
- ## [2.4.3] 2024-01-07
1
+ # Changelog
2
2
 
3
- Changes
3
+ All notable changes to this project will be documented in this file.
4
4
 
5
- - Code refactors, nothing discernable to the end user.
5
+ ## [3.0.0] - 2024-??-??
6
6
 
7
- Bug fixes
7
+ ### Enhancements
8
+ [x] Added `dsu project` command to manage DSU projects. See `dsu help project` or the [dsu wiki](https://github.com/gangelo/dsu/wiki) for more information.
9
+ [x] The `dsu add` command how allows you to add entries using mnemonics and relative date mnemonics (RDMs) in addition to absolute dates. For example, `dsu add -d -7 "My entry"` will add an entry one week in the past from the current day. See `dsu help add` for more information.
8
10
 
9
- - Fixed bug that failed to display the correct editor if the editor session failed to open. For example, if the editor session failed to open and the EDITOR environment variable was used, the editor in the configuration file would be displayed instead of the EDITOR environment variable value.
11
+ ### Changes
12
+ [x] Update ruby gems.
13
+ [x] Change `dsu export` file name for exports. When exporting all DSU entry groups for a project, the file name will be:
10
14
 
11
- ## [2.4.2] 2024-01-06
15
+ "dsu-export-<transformed project name>-<timestamp>-all-entry-groups-<from date>-thru-<to date>.csv"
12
16
 
13
- Changes
17
+ When exporting DSU entry groups for a project between two given dates, the file name will be:
14
18
 
15
- - Correct gemspec to allow ruby ['>= 3.0.1', '< 4.0'].
19
+ "dsu-export-<transformed project name>-<timestamp>-entry-groups-<from date>-thru-<to date>.csv"
16
20
 
17
- ## [2.4.1] 2024-01-05
21
+ - Where <transformed project name> = is the project name transformed to a format appropriate to be part of a file name.
22
+ - Where <timestamp> = is the current timestamp in the format: YYYYMMDDHHMMSS
23
+ - Where <from date> = is the from date in the format: YYYY-MM-DD
24
+ - Where <to date> = is the to date in the format: YYYY-MM-DD
18
25
 
19
- Changes
26
+ When exporting all DSU entry groups for a project, the <from date> and <to date> will represent the earliest and most recent entry group dates for the project, respectfully. For example:
20
27
 
21
- - Move gem version to footer.
22
- - Update ruby gems.
28
+ ```
29
+ # Where current date is 2024-01-29, and the earliest entry group date is 2023-08-11 and the most recent entry group date is 2024-01-27.
30
+ $ dsu x a
31
+ ```
23
32
 
24
- ## [2.4.0] 2024-01-01
33
+ dsu-export-default-20240129130013-all-entry-groups-2023-08-11-thru-2024-01-27.csv
25
34
 
26
- Enhancements
35
+ When exporting DSU entry groups between a to and from date for a project, the <from date> and <to date> will represent the from and to dates entered by the user on the command line, respectfully. For example:
27
36
 
28
- - Add `dsu import` command to import DSU entries from a comma-delimited csv file. See `dsu help import` for more information.
29
- - Update README.md to reflect new `dsu import` command.
37
+ ```
38
+ # Where current date is 2024-01-29, and the from date entered on the command line is2023-08-11 and the from date entered on the command line is 2024-01-27.
39
+ dsu x dd -f n -t -257
40
+ ```
30
41
 
31
- Changes
42
+ dsu-export-default-20240129125946-entry-groups-2023-05-17-thru-2024-01-29.csv
32
43
 
33
- - Update ruby gems.
44
+ ### Bug Fixes
34
45
 
35
- ## [2.3.2] 2023-12-30
36
46
 
37
- Changes
47
+ ## [2.4.4] - 2024-01-28
48
+ ### Changes
49
+ [x] Update ruby gems.
38
50
 
39
- - Display a "Nothing to export" message if no entries are found, rather than prompting the user "export 0 entry groups" when using the `dsu export` command.
40
- - Add specs for Export::AllPresenter and Export::DatesPresenter
51
+ ## [2.4.3] - 2024-01-07
52
+ ### Changes
53
+ [x] Code refactors, nothing discernable to the end user.
41
54
 
42
- ## [2.3.1] 2023-12-25
55
+ ### Bug Fixes
56
+ [x] Fixed bug displaying incorrect editor if the editor session fails to open.
43
57
 
44
- Changes
58
+ ## [2.4.2] - 2024-01-06
59
+ ### Changes
60
+ [x] Correct gemspec to allow ruby ['>= 3.0.1', '< 4.0'].
45
61
 
46
- - Update gemspec spec.post_install_message to reflect new `dsu export` command.
62
+ ## [2.4.1] - 2024-01-05
63
+ ### Changes
64
+ [x] Move gem version to footer.
65
+ [x] Update ruby gems.
47
66
 
48
- ## [2.3.0] 2023-12-25
67
+ ## [2.4.0] - 2024-01-01
68
+ ### Enhancements
69
+ [x] Add `dsu import` command to import DSU entries from a comma-delimited csv file. See `dsu help import` for more information.
70
+ [x] Update README.md to reflect new `dsu import` command.
49
71
 
50
- Enhancements
72
+ ### Changes
73
+ [x] Update ruby gems.
51
74
 
52
- - Added `dsu export` command to export all DSU entries or DSU entries between two given dates. Entries are written to a comma-delimited csv file located in your OS temp folder. For more information see `dsu help export` or the README.md file.
53
-
54
- Changes
75
+ ## [2.3.2] 2023-12-30
76
+ ### Changes
77
+ [x] Display a "Nothing to export" message if no entries are found, rather than prompting the user "export 0 entry groups" when using the `dsu export` command.
78
+ [x] Add specs for Export::AllPresenter and Export::DatesPresenter
55
79
 
56
- - Updated README.md to reflect new `dsu export` command.
57
- - Fix misspelling of "cancelable" to "cancellable" in the codebase.
58
- - Update ruby gems.
80
+ ## [2.3.1] 2023-12-25
81
+ ### Changes
82
+ [x] Update gemspec spec.post_install_message to reflect new `dsu export` command.
59
83
 
60
- ## [2.2.2] 2023-12-23
84
+ ## [2.3.0] 2023-12-25
61
85
 
62
- Changes
86
+ ### Enhancements
87
+ [x] Added `dsu export` command to export all DSU entries or DSU entries between two given dates. Entries are written to a comma-delimited csv file located in your OS temp folder. For more information see `dsu help export` or the README.md file.
63
88
 
64
- - README.md updates.
89
+ ### Changes
90
+ [x] Updated README.md to reflect new `dsu export` command.
91
+ [x] Fix misspelling of "cancelable" to "cancellable" in the codebase.
92
+ [x] Update ruby gems.
65
93
 
66
- Bug fix
94
+ ## [2.2.2] 2023-12-23
95
+ ### Changes
96
+ [x] README.md updates.
67
97
 
68
- - Fix `dsu config` shortcut command mapping bug that caused `dsu c` to display `dsu delete` command help instead of `dsu config` command help.
98
+ ### Bug fix
99
+ [x] Fix `dsu config` shortcut command mapping bug that caused `dsu c` to display `dsu delete` command help instead of `dsu config` command help.
69
100
 
70
101
  ## [2.2.1] 2023-12-23
71
-
72
- Changes
73
-
74
- - Add specs for `dsu browse` command.
75
- - Code refactors, nothing discernable to the end user.
102
+ ### Changes
103
+ [x] Add specs for `dsu browse` command.
104
+ [x] Code refactors, nothing discernable to the end user.
76
105
 
77
106
  ## [2.2.0] 2023-12-23
78
-
79
107
  Stable release.
80
108
 
81
109
  ## [2.2.0.rc.2] 2023-12-23
110
+ ### Enhancements
111
+ [x] Added "christmas" theme, see `dsu theme list` or `dsu theme show christmas` for more information.
82
112
 
83
- Enhancements
84
-
85
- - Added "christmas" theme, see `dsu theme list` or `dsu theme show christmas` for more information.
86
-
87
- Changes
88
-
89
- - Refactors Dsu::VERSION_REGEX to include rc releases (e.g. 2.2.0.rc.1, 2.2.0.rc.2, etc.).
113
+ ### Changes
114
+ [x] Refactors Dsu::VERSION_REGEX to include rc releases (e.g. 2.2.0.rc.1, 2.2.0.rc.2, etc.).
90
115
 
91
116
  ## [2.2.0.rc.1] 2023-12-23
117
+ ### Enhancements
118
+ [x] Added `dsu browse` command to interactively page through DSU entries.
119
+ [x] Added "light" theme for terminals with light backgrounds, see `dsu theme list` or `dsu theme show light` for more information.
92
120
 
93
- Enhancements
94
-
95
- - Added `dsu browse` command to interactively page through DSU entries.
96
- - Added "light" theme for terminals with light backgrounds, see `dsu theme list` or `dsu theme show light` for more information.
97
-
98
- Changes
99
-
100
- - Refactors to use activesupport Time#in_time_zone, including tests.
101
- - Various code refactors to support the aforementioned change.
121
+ ### Changes
122
+ [x] Refactors to use activesupport Time#in_time_zone, including tests.
123
+ [x] Various code refactors to support the aforementioned change.
102
124
 
103
125
  ## [2.1.4] 2023-12-19
126
+ ### Changes
127
+ [x] Minor code refactors.
104
128
 
105
- Changes
106
-
107
- - Minor code refactors.
108
-
109
- Bug fixes
110
-
111
- - Fix bug in relative date mnemonic (RDMs) regex matcher that incorrectly matched dates whose separater happened to be a "-" (e.g. 2023-12-31). The old regex (/[+-]\d+/) incorrectly interpreted this as an RDM. This bug would cause the `dsu list dates` command (for example) to create erroneous, relative dates.
129
+ ### Bug fixes
130
+ [x] Fix bug in relative date mnemonic (RDMs) regex matcher that incorrectly matched dates whose separater happened to be a "-" (e.g. 2023-12-31). The old regex (/[+-]\d+/) incorrectly interpreted this as an RDM. This bug would cause the `dsu list dates` command (for example) to create erroneous, relative dates.
112
131
 
113
132
  ## [2.1.3] 2023-12-17
114
-
115
- Bug fixes
116
-
117
- - Fix bug that did not recognize the `include_all` configuration option when using the `dsu list dates` command. The `include_all` configuration option is now recognized and used properly when using the `dsu list dates` command. See `dsu help list dates` for more information.
133
+ ### Bug fixes
134
+ [x] Fix bug that did not recognize the `include_all` configuration option when using the `dsu list dates` command. The `include_all` configuration option is now recognized and used properly when using the `dsu list dates` command. See `dsu help list dates` for more information.
118
135
 
119
136
  ## [2.1.2] 2023-12-17
137
+ ### Changes
138
+ [x] WIP, continued I18n integration. See [2.1.0] for more information.
139
+ [x] Removed shortcut mappings for all commands (see `dsu help`) to remove dash ("-") preceeding command shortcuts. For example, `dsu -a` (i.e. shortcut for `dsu add`) is now `dsu a`, `dsu -c` (i.e. shortcut for `dsu config`) is now `dsu c`, etc. This was done to avoid confusion as this format is typically used for options, not shortcut commands. The only exception is `dsu version` which will accept shortcuts `dsu v` and `dsu -v`, as `-v` is generally used to display version information.
140
+ [x] Various code refactors.
141
+ [x] Massive updates to README.md.
120
142
 
121
- Changes
122
-
123
- - WIP, continued I18n integration. See [2.1.0] for more information.
124
- - Removed shortcut mappings for all commands (see `dsu help`) to remove dash ("-") preceeding command shortcuts. For example, `dsu -a` (i.e. shortcut for `dsu add`) is now `dsu a`, `dsu -c` (i.e. shortcut for `dsu config`) is now `dsu c`, etc. This was done to avoid confusion as this format is typically used for options, not shortcut commands. The only exception is `dsu version` which will accept shortcuts `dsu v` and `dsu -v`, as `-v` is generally used to display version information.
125
- - Various code refactors.
126
- - Massive updates to README.md.
127
-
128
- Bug fixes
129
-
130
- - Fix bug that did not apply the current theme to `dsu help add` help.
143
+ ### Bug fixes
144
+ [x] Fix bug that did not apply the current theme to `dsu help add` help.
131
145
 
132
146
  ## [2.1.1] 2023-12-17
133
-
134
- Bug fixes
135
-
136
- - Fix bug that did not included I18n locale files in yanked version 2.1.0.
147
+ ### Bug fixes
148
+ [x] Fix bug that did not included I18n locale files in yanked version 2.1.0.
137
149
 
138
150
  ## [2.1.0] 2023-12-16
151
+ ### Enhancements
152
+ [x] Added `dsu delete` command to incorporate color themes. See `dsu help delete` for more information.
139
153
 
140
- Enhancements
141
-
142
- - Added `dsu delete` command to incorporate color themes. See `dsu help delete` for more information.
143
-
144
- Bug fixes
145
-
146
- - Fix bug that failed to show "(nothing to display for <day>, <date> <local time designator> through <day>, <date> <local time designator>)" for `dsu list dates` command when no entries existed for the entry groups associated with the given dates.
154
+ ### Bug fixes
155
+ [x] Fix bug that failed to show "(nothing to display for <day>, <date> <local time designator> through <day>, <date> <local time designator>)" for `dsu list dates` command when no entries existed for the entry groups associated with the given dates.
147
156
 
148
- Miscellaneous
149
-
150
- - WIP, begin I18n support/integration.
151
- - Update ruby gems.
152
- - Updated README.md to reflect new `dsu delete` command.
153
- - Fix rubocop violations.
157
+ ### Miscellaneous
158
+ [x] WIP, begin I18n support/integration.
159
+ [x] Update ruby gems.
160
+ [x] Updated README.md to reflect new `dsu delete` command.
161
+ [x] Fix rubocop violations.
154
162
 
155
163
  ## [2.0.8] 2023-12-02
156
-
157
- - Update ruby gems.
164
+ ### Changes
165
+ [x] Update ruby gems.
158
166
 
159
167
  ## [2.0.7] 2023-11-24
160
-
161
- - Update ruby gems.
162
- - Remove stale/unnecessary code.
168
+ ### Changes
169
+ [x] Update ruby gems.
170
+ [x] Remove stale/unnecessary code.
163
171
 
164
172
  ## [2.0.6] 2023-10-30
165
-
166
- - Update ruby gems.
173
+ ### Changes
174
+ [x] Update ruby gems.
167
175
 
168
176
  ## [2.0.5] 2023-10-30
169
-
170
- - Update ruby gems.
177
+ ### Changes
178
+ [x] Update ruby gems.
171
179
 
172
180
  ## [2.0.4] 2023-08-28
173
-
174
- - Update ruby gems.
181
+ ### Changes
182
+ [x] Update ruby gems.
175
183
 
176
184
  ## [2.0.3] 2023-08-17
177
-
178
- - Bump activesupport from 7.0.5 to 7.0.7
179
- - Bump simplecov from 0.21.2 to 0.22.0
185
+ ### Changes
186
+ [x] Bump activesupport from 7.0.5 to 7.0.7
187
+ [x] Bump simplecov from 0.21.2 to 0.22.0
180
188
 
181
189
  ## [2.0.2] 2023-08-17
182
-
183
- - Bumps activemodel from 7.0.5 to 7.0.7.
184
- - Update colorize requirement from ~> 0.8.1 to >= 0.8.1, < 1.2.0
185
- - Bump rubocop-rspec from 2.22.0 to 2.23.2
186
- - Bump rubocop-performance from 1.18.0 to 1.19.0
187
- - Bump rubocop from 1.52.0 to 1.56.0
188
-
189
- Changes
190
-
191
- - Fix rubocop violations
190
+ ### Changes
191
+ [x] Bumps activemodel from 7.0.5 to 7.0.7.
192
+ [x] Update colorize requirement from ~> 0.8.1 to >= 0.8.1, < 1.2.0
193
+ [x] Bump rubocop-rspec from 2.22.0 to 2.23.2
194
+ [x] Bump rubocop-performance from 1.18.0 to 1.19.0
195
+ [x] Bump rubocop from 1.52.0 to 1.56.0
196
+ [x] Fix rubocop violations
192
197
 
193
198
  ## [2.0.1] 2023-08-16
194
-
195
- Changes
196
-
197
- - Bump to official release.
198
- - None (see below).
199
+ ### Changes
200
+ [x] Bump to official release.
201
+ [x] None (see below).
199
202
 
200
203
  ## [2.0.0] 2023-08-16 (yanked)
201
204
 
202
205
  ## [2.0.0.alpha.1] 2023-08-16
206
+ ### Changes
207
+ [x] Major refactors to the `dsu` codebase.
208
+ [x] Added `dsu theme` command to incorporate color themes. See `dsu help theme` for more information.
209
+ [x] Added `dsu info` command to display details about the current dsu release. See `dsu help info` for more information.
210
+ [x] Added "migrations", which is really a method of backup whereby user data is backed up to the dsu folder under `backup/<migration version>`. Backups will occur whenever a breaking change is made to any of the dsu models (ColorTheme, Configuration, EntryGroup or MigrationVersion). In this way, users can create their own scripts to migrate their associated model `.json`` files to the latest model version, and move them back into the appropriate dsu folder structure so data can be retained.
211
+ [x] Changes to command help to be more uniform.
203
212
 
204
- Changes
205
-
206
- - Major refactors to the `dsu` codebase.
207
- - Added `dsu theme` command to incorporate color themes. See `dsu help theme` for more information.
208
- - Added `dsu info` command to display details about the current dsu release. See `dsu help info` for more information.
209
- - Added "migrations", which is really a method of backup whereby user data is backed up to the dsu folder under `backup/<migration version>`. Backups will occur whenever a breaking change is made to any of the dsu models (ColorTheme, Configuration, EntryGroup or MigrationVersion). In this way, users can create their own scripts to migrate their associated model `.json`` files to the latest model version, and move them back into the appropriate dsu folder structure so data can be retained.
210
- - Changes to command help to be more uniform.
211
-
212
- Bug fixes
213
-
214
- - Various bug fixes.
213
+ ### Bug fixes
214
+ [x] Various bug fixes.
215
215
 
216
216
  ## [2.0.0.alpha.0] 2023-06-26 (yanked)
217
217
 
218
218
  ## [1.2.1] 2023-06-02
219
+ ### Bug fixes
219
220
 
220
- Bug fixes
221
-
222
- - Fixed a bug that raises an error `NoMethodError` for `entry_group_file_exists?` if the `carry_over_entries_to_today` configuration option is set to true, and attempting to edit today's dsu entries.
221
+ [x] Fixed a bug that raises an error `NoMethodError` for `entry_group_file_exists?` if the `carry_over_entries_to_today` configuration option is set to true, and attempting to edit today's dsu entries.
223
222
 
224
223
  ## [1.2.0] 2023-05-26
225
-
226
- Changes
227
-
228
- - Various refactors.
229
- - Bring test coverage to >= 85%.
224
+ ### Changes
225
+ [x] Various refactors.
226
+ [x] Bring test coverage to >= 85%.
230
227
 
231
228
  ## [1.1.2] 2023-05-26
232
-
233
- Changes
234
-
235
- - Various refactors.
236
- - Add more test coverage.
229
+ ### Changes
230
+ [x] Various refactors.
231
+ [x] Add more test coverage.
237
232
 
238
233
  ## [1.1.1] 2023-05-23
239
-
240
234
  See previous alpha releases for changes.
241
235
 
242
236
  ## [1.1.1.alpha.2] 2023-05-23
237
+ ### Changes
238
+ [x] For convenience, the `dsu list date` command now takes a MNEMONIC in addition to a DATE. See `dsu list help date` for more information.
243
239
 
244
- Changes
245
-
246
- - For convenience, the `dsu list date` command now takes a MNEMONIC in addition to a DATE. See `dsu list help date` for more information.
247
-
248
- Bug fixes
249
-
250
- - Fix a bug that did not display `dsu list dates SUBCOMMAND` date list properly when the `--from` option was a date mnemonic and the `--to` optoin was a relative time mnemonic (e.g. `dsu list dates -f today -t +1`). In this case, DSU dates `Time.now` and `Time.now.tomorrow` should be displayed; instead, the bug would consider the `--to` option as relative to `Time.now`, so only 1 DSU date (`Time.now` would be returned).
240
+ ### Bug fixes
241
+ [x] Fix a bug that did not display `dsu list dates SUBCOMMAND` date list properly when the `--from` option was a date mnemonic and the `--to` optoin was a relative time mnemonic (e.g. `dsu list dates -f today -t +1`). In this case, DSU dates `Time.now` and `Time.now.tomorrow` should be displayed; instead, the bug would consider the `--to` option as relative to `Time.now`, so only 1 DSU date (`Time.now` would be returned).
251
242
 
252
243
  ## [1.1.0.alpha.1] 2023-05-23
244
+ ### Changes
253
245
 
254
- Changes
255
-
256
- - Added new configuration option `carry_over_entries_to_today` (`true|false`, default: `false`); if true, when editing DSU entries **for the first time** on any given day (e.g. `dsu edit today`), DSU entries from the previous day will be copied to the editing session. If there are no DSU entries from the previous day, `dsu` will search backwards up to 7 days to find a DSU date that has entries to copy. If after searching back 7 days, no DSU entries are found, the editor session will simply start with no previous DSU entries.
257
- - Added new configuration option `include_all` (`true|false`, default: `false`); if true, when using dsu commands that list date ranges (e.g. `dsu list dates`), the displayed list will include dates that have no dsu entries. If false, the displayed list will only include dates that have dsu entries. For all other `dsu list` commands, if true, this option will behave in the aforementioned manner. If false, the displayed list will unconditionally display the first and last dates regardless of whether or not the DSU date has entries or not; all other dates will not be displayed if the DSU date has no entries.
258
- - Changed the look of the editor template when editing entry group entries.
246
+ [x] Added new configuration option `carry_over_entries_to_today` (`true|false`, default: `false`); if true, when editing DSU entries **for the first time** on any given day (e.g. `dsu edit today`), DSU entries from the previous day will be copied to the editing session. If there are no DSU entries from the previous day, `dsu` will search backwards up to 7 days to find a DSU date that has entries to copy. If after searching back 7 days, no DSU entries are found, the editor session will simply start with no previous DSU entries.
247
+ [x] Added new configuration option `include_all` (`true|false`, default: `false`); if true, when using dsu commands that list date ranges (e.g. `dsu list dates`), the displayed list will include dates that have no dsu entries. If false, the displayed list will only include dates that have dsu entries. For all other `dsu list` commands, if true, this option will behave in the aforementioned manner. If false, the displayed list will unconditionally display the first and last dates regardless of whether or not the DSU date has entries or not; all other dates will not be displayed if the DSU date has no entries.
248
+ [x] Changed the look of the editor template when editing entry group entries.
259
249
 
260
250
  ## [1.0.0] 2023-05-18
251
+ ### First official release
252
+ [x] NOTE: If you have been using the alpha version of `dsu`, you will need to delete the `entries` folder (e.g. `/Users/<whoami>/dsu/entries` on a nix os) as the old entries .json files are incompatible with this official release.
261
253
 
262
- First official release.
263
-
264
- - NOTE: If you have been using the alpha version of `dsu`, you will need to delete the `entries` folder (e.g. `/Users/<whoami>/dsu/entries` on a nix os) as the old entries .json files are incompatible with this official release.
265
-
266
- Changes from the alpha version
267
-
268
- - When editing an entry group, editor commands are no longer necessary. Simply add, remove or change entries as needed. See the README.md for more information.
269
- - When editing an entry group and saving the results, take note of the folowing behavior:
254
+ ### Changes from the alpha version
255
+ [x] When editing an entry group, editor commands are no longer necessary. Simply add, remove or change entries as needed. See the README.md for more information.
256
+ [x] When editing an entry group and saving the results, take note of the folowing behavior:
270
257
  - Entering duplicate entries are not allowed, only one entry with a given description is allowed per entry group.
271
258
  - Entering entries whose descriptions are < 2 or > 256 characters will fail validation and will not be saved.
272
259
  - When editing and encountering any of the aforementioned, the errors will be displayed to the console after the editor file is saved.
273
- - Sha's are no longer being used, as I've not found a good use (currently) to use them. I may add them back in the future if I find a good use for them (tracking entries across entry groups, etc.).
274
- - When adding an entry (`dsu add OPTION`), it used to be that after the entry was added, the entry group for the date being edited would be displayed, as well as "yesterday's" date. This is no longer the case; now, only the entry group for the date being edited is displayed.
260
+ [x] Sha's are no longer being used, as I've not found a good use (currently) to use them. I may add them back in the future if I find a good use for them (tracking entries across entry groups, etc.).
261
+ [x] When adding an entry (`dsu add OPTION`), it used to be that after the entry was added, the entry group for the date being edited would be displayed, as well as "yesterday's" date. This is no longer the case; now, only the entry group for the date being edited is displayed.
275
262
 
276
263
  ## [0.1.0.alpha.5] 2023-05-12
277
-
278
- Changes
279
-
280
- - `dsu edit SUBCOMMAND` will now allow editing of an entry group for a date that does not yet exist. This will allow you to add entries in the editor using `+|a|add DESCRIPTION`. Be sure to follow the instructions in the editor when editing entry group entries.
281
- - `dsu edit SUBCOMMAND` will gracefully display an error if the entry sha (Entry#uuid) or entry discription (Entry#description) are not unique. In this case, the entry will not be added to the entry group.
264
+ ### Changes
265
+ [x] `dsu edit SUBCOMMAND` will now allow editing of an entry group for a date that does not yet exist. This will allow you to add entries in the editor using `+|a|add DESCRIPTION`. Be sure to follow the instructions in the editor when editing entry group entries.
266
+ [x] `dsu edit SUBCOMMAND` will gracefully display an error if the entry sha (Entry#uuid) or entry discription (Entry#description) are not unique. In this case, the entry will not be added to the entry group.
282
267
  NOTE: Not all edge cases are being handled currently by `dsu edit SUBCOMMAND`.
283
- - `dsu add OPTION` will raise an error if the entry discription (Entry#description) are not unique. This will be handled gracefully in a future release.
268
+ [x] `dsu add OPTION` will raise an error if the entry discription (Entry#description) are not unique. This will be handled gracefully in a future release.
284
269
 
285
270
  ## [0.1.0.alpha.4] 2023-05-09
286
-
287
- Changes
288
-
289
- - Gemfile gemspec description changes.
271
+ ### Changes
272
+ [x] Gemfile gemspec description changes.
290
273
 
291
274
  ## [0.1.0.alpha.3] 2023-05-09
275
+ ### Changes
276
+ [x] Entry groups are now editable using the `dsu edit SUBCOMMAND` command. See the README.md or `dsu help edit` for more information.
277
+ [x] Added `editor` configuration option to specify the editor to use when editing an entry group. This configuration option is used if the $EDITOR environment variable is not set.
292
278
 
293
- Changes
294
-
295
- - Entry groups are now editable using the `dsu edit SUBCOMMAND` command. See the README.md or `dsu help edit` for more information.
296
- - Added `editor` configuration option to specify the editor to use when editing an entry group. This configuration option is used if the $EDITOR environment variable is not set.
297
-
298
- Bug fixes
299
-
300
- - Fix bug that failed to load default configuration values properly when provided (surfaced in specs).
279
+ ### Bug fixes
280
+ [x] Fix bug that failed to load default configuration values properly when provided (surfaced in specs).
301
281
 
302
282
  ## [0.1.0.alpha.2] 2023-05-08
303
-
304
283
  ATTENTION: After installing this pre-release, run `dsu config info` and take note of the `entries_folder` config option value (e.g. something like '/Users/<whoami>/dsu/entries' on a nix os). You'll need to delete the entry group files therein ( \<YYYY\>\-\<MM\>\-\<DD\>.json e.g. 2023-05-07.json) to avoid errors when running this version of `dsu`.
305
284
 
306
285
  WIP (not fully implemented yet)
307
286
 
308
- - Added `dsu edit` command to edit an existing entry.
309
-
310
- Changes
311
-
312
- - Remove Entry#long_description and make Entry#description longer (to 256 bytes max).
313
- - Added `dsu` short-cut commands|options `a|-a`, `c|-c`, `e|-e` and `l|-l` for `add`, `config`, `edit` and `list` commands respectively. For example, can now do `dsu a` or `dsu -a` instead of `dsu add`.
314
- - Added `dsu list` short-cut subcommand|options `d|-d`, `n|-n`, `t|-t` and `y|-y` for `date DATE`, `today`, `tomorrow` and `yesterday` subcommands respectively. For example, can now do `dsu n` or `dsu -n` instead of `dsu today` to list your DSU entries for "today".
315
- - `dsu list` commands now lists all DSU entries from the date being requested (SUBCOMMAND i.e. `today`, `tomorrow`, `yesterday` or `date`), back to and including the previous Friday IF the date being being requested falls on a Monday or weekend. This is so that the DSU entries for the weekend and previous Friday can be shared at DSU if you hold a DSU on the weekend (if you're insane enough to work and have DSU on the weekend) or on a Monday if you happened to work on the weekend as well.
316
- - `dsu config info` now displays the default configuration being used if no configuration file is being used.
287
+ [x] Added `dsu edit` command to edit an existing entry.
317
288
 
318
- Bug fixes
289
+ ### Changes
290
+ [x] Remove Entry#long_description and make Entry#description longer (to 256 bytes max).
291
+ [x] Added `dsu` short-cut commands|options `a|-a`, `c|-c`, `e|-e` and `l|-l` for `add`, `config`, `edit` and `list` commands respectively. For example, can now do `dsu a` or `dsu -a` instead of `dsu add`.
292
+ [x] Added `dsu list` short-cut subcommand|options `d|-d`, `n|-n`, `t|-t` and `y|-y` for `date DATE`, `today`, `tomorrow` and `yesterday` subcommands respectively. For example, can now do `dsu n` or `dsu -n` instead of `dsu today` to list your DSU entries for "today".
293
+ [x] `dsu list` commands now lists all DSU entries from the date being requested (SUBCOMMAND i.e. `today`, `tomorrow`, `yesterday` or `date`), back to and including the previous Friday IF the date being being requested falls on a Monday or weekend. This is so that the DSU entries for the weekend and previous Friday can be shared at DSU if you hold a DSU on the weekend (if you're insane enough to work and have DSU on the weekend) or on a Monday if you happened to work on the weekend as well.
294
+ [x] `dsu config info` now displays the default configuration being used if no configuration file is being used.
319
295
 
320
- - Fix bug that fails to load/use configuration file options when a config file exists.
296
+ ### Bug fixes
297
+ [x] Fix bug that fails to load/use configuration file options when a config file exists.
321
298
 
322
299
  ## [0.1.0.alpha.1] 2023-05-06
323
300
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dsu (2.4.3)
4
+ dsu (3.0.0.alpha.0)
5
5
  activemodel (>= 7.0.8, < 8.0)
6
6
  activesupport (>= 7.0.8, < 8.0)
7
7
  colorize (>= 1.1, < 2.0)
@@ -12,9 +12,9 @@ PATH
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activemodel (7.1.2)
16
- activesupport (= 7.1.2)
17
- activesupport (7.1.2)
15
+ activemodel (7.1.3)
16
+ activesupport (= 7.1.3)
17
+ activesupport (7.1.3)
18
18
  base64
19
19
  bigdecimal
20
20
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -26,11 +26,11 @@ GEM
26
26
  tzinfo (~> 2.0)
27
27
  ast (2.4.2)
28
28
  base64 (0.2.0)
29
- bigdecimal (3.1.5)
29
+ bigdecimal (3.1.6)
30
30
  byebug (11.1.3)
31
31
  coderay (1.1.3)
32
32
  colorize (1.1.0)
33
- concurrent-ruby (1.2.2)
33
+ concurrent-ruby (1.2.3)
34
34
  connection_pool (2.4.1)
35
35
  diff-lcs (1.5.0)
36
36
  docile (1.4.0)
@@ -72,11 +72,11 @@ GEM
72
72
  json (2.7.1)
73
73
  language_server-protocol (3.17.0.3)
74
74
  method_source (1.0.0)
75
- minitest (5.20.0)
75
+ minitest (5.21.2)
76
76
  mutex_m (0.2.0)
77
77
  os (1.1.4)
78
78
  parallel (1.24.0)
79
- parser (3.2.2.4)
79
+ parser (3.3.0.5)
80
80
  ast (~> 2.4.1)
81
81
  racc
82
82
  pry (0.14.2)
@@ -88,9 +88,9 @@ GEM
88
88
  racc (1.7.3)
89
89
  rainbow (3.1.1)
90
90
  rake (13.1.0)
91
- reek (6.2.0)
91
+ reek (6.3.0)
92
92
  dry-schema (~> 1.13.0)
93
- parser (~> 3.2.0)
93
+ parser (~> 3.3.0)
94
94
  rainbow (>= 2.0, < 4.0)
95
95
  rexml (~> 3.1)
96
96
  regexp_parser (2.9.0)
@@ -108,11 +108,11 @@ GEM
108
108
  diff-lcs (>= 1.2.0, < 2.0)
109
109
  rspec-support (~> 3.12.0)
110
110
  rspec-support (3.12.1)
111
- rubocop (1.59.0)
111
+ rubocop (1.60.2)
112
112
  json (~> 2.3)
113
113
  language_server-protocol (>= 3.17.0)
114
114
  parallel (~> 1.10)
115
- parser (>= 3.2.2.4)
115
+ parser (>= 3.3.0.2)
116
116
  rainbow (>= 2.2.2, < 4.0)
117
117
  regexp_parser (>= 1.8, < 3.0)
118
118
  rexml (>= 3.2.5, < 4.0)
@@ -141,7 +141,7 @@ GEM
141
141
  simplecov-html (0.12.3)
142
142
  simplecov_json_formatter (0.1.4)
143
143
  thor (1.3.0)
144
- thor_nested_subcommand (1.0.6)
144
+ thor_nested_subcommand (1.0.7)
145
145
  tzinfo (2.0.6)
146
146
  concurrent-ruby (~> 1.0)
147
147
  unicode-display_width (2.5.0)