dsu 2.0.7 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/Gemfile.lock +18 -18
- data/README.md +78 -17
- data/lib/core/ruby/color_theme_mode.rb +1 -1
- data/lib/dsu/base_cli.rb +2 -16
- data/lib/dsu/cli.rb +29 -56
- data/lib/dsu/command_services/add_entry_service.rb +1 -1
- data/lib/dsu/env.rb +4 -0
- data/lib/dsu/models/color_theme.rb +2 -2
- data/lib/dsu/models/configuration.rb +3 -1
- data/lib/dsu/models/entry_group.rb +1 -1
- data/lib/dsu/presenters/color_theme_presenter.rb +4 -2
- data/lib/dsu/presenters/color_theme_show_presenter.rb +9 -3
- data/lib/dsu/presenters/configuration_presenter.rb +2 -2
- data/lib/dsu/presenters/entry_group_presenter.rb +2 -2
- data/lib/dsu/services/entry_group/counter_service.rb +32 -0
- data/lib/dsu/services/entry_group/deleter_service.rb +35 -0
- data/lib/dsu/services/entry_group/editor_service.rb +7 -11
- data/lib/dsu/subcommands/config.rb +17 -74
- data/lib/dsu/subcommands/delete.rb +107 -0
- data/lib/dsu/subcommands/edit.rb +16 -30
- data/lib/dsu/subcommands/list.rb +20 -90
- data/lib/dsu/subcommands/theme.rb +50 -79
- data/lib/dsu/support/ask.rb +1 -1
- data/lib/dsu/support/command_hookable.rb +2 -0
- data/lib/dsu/support/command_options/dsu_times.rb +2 -2
- data/lib/dsu/support/command_options/time.rb +1 -0
- data/lib/dsu/support/command_options/time_mneumonics.rb +1 -0
- data/lib/dsu/support/time_formatable.rb +13 -0
- data/lib/dsu/validators/description_validator.rb +2 -0
- data/lib/dsu/validators/entries_validator.rb +1 -0
- data/lib/dsu/version.rb +1 -1
- data/lib/dsu/views/color_theme/show.rb +1 -0
- data/lib/dsu/views/entry_group/edit.rb +2 -1
- data/lib/dsu/views/entry_group/shared/no_entries_to_display.rb +4 -1
- data/lib/dsu/views/shared/model_errors.rb +1 -0
- data/lib/dsu.rb +5 -1
- data/lib/locales/en/active_record.yml +8 -0
- data/lib/locales/en/commands.yml +90 -0
- data/lib/locales/en/miscellaneous.yml +23 -0
- data/lib/locales/en/presenters.yml +19 -0
- data/lib/locales/en/services.yml +10 -0
- data/lib/locales/en/subcommands.yml +348 -0
- metadata +45 -30
- data/exe/dsu_migrate.rb +0 -43
@@ -0,0 +1,348 @@
|
|
1
|
+
# lib/dsu/subcommands
|
2
|
+
en:
|
3
|
+
subcommands:
|
4
|
+
config:
|
5
|
+
delete:
|
6
|
+
desc: delete
|
7
|
+
usage: Deletes the configuration file
|
8
|
+
long_desc: |
|
9
|
+
Deletes the configuration file.
|
10
|
+
|
11
|
+
EXAMPLES:
|
12
|
+
|
13
|
+
dsu config delete
|
14
|
+
|
15
|
+
NOTES
|
16
|
+
|
17
|
+
Deleting the dsu configuration file will simply cause dsu to use the default configuration options (`Dsu::Models::Configuration::DEFAULT_CONFIGURATION`).
|
18
|
+
info:
|
19
|
+
desc: info
|
20
|
+
usage: Displays information about this gem configuration
|
21
|
+
long_desc: |
|
22
|
+
Displays information about this gem configuration.
|
23
|
+
|
24
|
+
EXAMPLES:
|
25
|
+
|
26
|
+
$ dsu config info
|
27
|
+
init:
|
28
|
+
desc: init
|
29
|
+
usage: Creates and initializes a .dsu file in your home folder
|
30
|
+
long_desc: |
|
31
|
+
Creates and initializes a .dsu file in your home folder (%{home_folder}) that may be edited.
|
32
|
+
|
33
|
+
EXAMPLES:
|
34
|
+
|
35
|
+
$ dsu config init
|
36
|
+
|
37
|
+
CONFIGURATION FILE ENTRIES
|
38
|
+
|
39
|
+
The following configuration file options are available:
|
40
|
+
|
41
|
+
version:
|
42
|
+
|
43
|
+
The configuration version - DO NOT ALTER THIS VALUE!
|
44
|
+
|
45
|
+
editor:
|
46
|
+
|
47
|
+
The default editor to use when editing entry groups if the EDITOR environment variable on your system is not set. The default is 'nano'. You'll need to change the default editor on Windows systems.
|
48
|
+
|
49
|
+
Default: "nano" on nix sytems.
|
50
|
+
|
51
|
+
entries_display_order:
|
52
|
+
|
53
|
+
The order by which entries will be displayed, "asc" or "desc" (ascending or descending, respectively).
|
54
|
+
|
55
|
+
Default: "desc"
|
56
|
+
|
57
|
+
carry_over_entries_to_today:
|
58
|
+
|
59
|
+
Applicable to the `dsu edit` command. Valid values are true|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 into the current 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 provide no previous DSU entries.
|
60
|
+
|
61
|
+
Default: false
|
62
|
+
|
63
|
+
include_all:
|
64
|
+
|
65
|
+
Applicable to dsu commands that display DSU date lists (e.g. `dsu list` commands). Valid values are true|false. If true, all DSU dates within the specified range will be displayed, regardless of whether or not a particular date has entries. If false, only DSU dates between the first and last DSU dates that have entries will be displayed.
|
66
|
+
|
67
|
+
Default: false
|
68
|
+
|
69
|
+
theme_name:
|
70
|
+
|
71
|
+
Default: "default"
|
72
|
+
delete:
|
73
|
+
date:
|
74
|
+
desc: date|d DATE|MNEUMONIC
|
75
|
+
usage: Deletes the DSU entries for the given DATE or MNEUMONIC
|
76
|
+
long_desc: |
|
77
|
+
Deletes the DSU entries for the given DATE or MNEUMONIC.
|
78
|
+
|
79
|
+
%{date_option_description}
|
80
|
+
|
81
|
+
%{mneumonic_option_description}
|
82
|
+
dates:
|
83
|
+
desc: dates|dd OPTIONS
|
84
|
+
usage: Deletes the DSU entries for the OPTIONS provided
|
85
|
+
long_desc: |
|
86
|
+
Deletes the DSU entries for the given OPTIONS.
|
87
|
+
|
88
|
+
$ dsu dates OPTIONS
|
89
|
+
|
90
|
+
$ dsu dd OPTIONS
|
91
|
+
|
92
|
+
OPTIONS:
|
93
|
+
|
94
|
+
-f|--from DATE|MNEMONIC: The DATE or MNEUMONIC that represents the start of the range of DSU dates to delete. If a relative mneumonic is used (+/-n, e.g +1, -1, etc.), the date calculated will be relative to the current date (e.g. `<MNEUMONIC>.to_i.days.from_now(Time.now)`).
|
95
|
+
|
96
|
+
-t|--to DATE|MNEMONIC: The DATE or MNEUMONIC that represents the end of the range of DSU dates to delete. If a relative mneumonic is used (+/-n, e.g +1, -1, etc.), the date calculated will be relative to the date that resulting from the `--from` option date calculation.
|
97
|
+
|
98
|
+
%{date_option_description}
|
99
|
+
|
100
|
+
%{mneumonic_option_description}
|
101
|
+
|
102
|
+
EXAMPLES:
|
103
|
+
|
104
|
+
NOTE: All examples can substitute their respective short form options (e.g. `-f`, `-t`, etc. for `--from`, `--to`, etc.).
|
105
|
+
|
106
|
+
The below will delete the DSU entries for the range of dates from 1/1 to 1/4 for the current year:
|
107
|
+
|
108
|
+
$ dsu delete dates --from 1/1 --to +3
|
109
|
+
|
110
|
+
This will delete the DSU entries for the range of dates from 1/2 to 1/5 for the year 2022:
|
111
|
+
|
112
|
+
$ dsu delete dates --from 1/5/2022 --to -3
|
113
|
+
|
114
|
+
This (assuming "today" is 1/10) will delete the DSU entries for the last week 1/10 to 1/3 of the current year:
|
115
|
+
|
116
|
+
$ dsu delete dates --from today --to -7
|
117
|
+
|
118
|
+
This (assuming "today" is 5/23) will delete the DSU entries for the last week 5/16 to 5/22.
|
119
|
+
This example simply illustrates the fact that you can use relative mneumonics for
|
120
|
+
both `--from` and `--to` options; this doesn't mean you should do so...
|
121
|
+
|
122
|
+
While you can use relative mneumonics for both `--from` and `--to` options,
|
123
|
+
there is always a more intuitive way. The below example basically deletes one week of DSU entries back 1 week from yesterday's date:
|
124
|
+
|
125
|
+
$ dsu delete dates --from -7 --to +6
|
126
|
+
|
127
|
+
The above can be accomplished MUCH easier by simply using the `yesterday` mneumonic...
|
128
|
+
|
129
|
+
This (assuming "today" is 5/23) will delete the DSU entries back 1 week from yesterday's date 5/16 to 5/22:
|
130
|
+
|
131
|
+
$ dsu delete dates --from yesterday --to -6
|
132
|
+
today:
|
133
|
+
desc: today|n
|
134
|
+
usage: Deletes the DSU entries for today
|
135
|
+
long_desc: |
|
136
|
+
Deletes the DSU entries for today.
|
137
|
+
|
138
|
+
$ dsu delete today
|
139
|
+
|
140
|
+
$ dsu delete n
|
141
|
+
tomorrow:
|
142
|
+
desc: tomorrow|t
|
143
|
+
usage: Deletes the DSU entries for tomorrow
|
144
|
+
long_desc: |
|
145
|
+
Deletes the DSU entries for tomorrow.
|
146
|
+
|
147
|
+
$ dsu delete tomorrow
|
148
|
+
|
149
|
+
$ dsu delete t
|
150
|
+
yesterday:
|
151
|
+
desc: yesterday|y
|
152
|
+
usage: Deletes the DSU entries for yesterday
|
153
|
+
long_desc: |
|
154
|
+
Deletes the DSU entries for yesterday.
|
155
|
+
|
156
|
+
$ dsu delete yesterday
|
157
|
+
|
158
|
+
$ dsu delete y
|
159
|
+
messages:
|
160
|
+
deleted: Deleted %{count} entry group(s).
|
161
|
+
canceled: Canceled.
|
162
|
+
prompts:
|
163
|
+
are_you_sure: Are you sure you want to delete all the entries for %{dates} (%{count} entry groups)?
|
164
|
+
edit:
|
165
|
+
date:
|
166
|
+
desc: date|d DATE
|
167
|
+
usage: Edits the DSU entries for DATE
|
168
|
+
long_desc: |
|
169
|
+
Edits the DSU entries for DATE.
|
170
|
+
|
171
|
+
%{date_option_description}
|
172
|
+
today:
|
173
|
+
desc: today|n
|
174
|
+
usage: Edits the DSU entries for today
|
175
|
+
long_desc: |
|
176
|
+
Edits the DSU entries for today.
|
177
|
+
tomorrow:
|
178
|
+
desc: tomorrow|t
|
179
|
+
usage: Edits the DSU entries for tomorrow
|
180
|
+
long_desc: |
|
181
|
+
Edits the DSU entries for tomorrow.
|
182
|
+
yesterday:
|
183
|
+
desc: yesterday|y
|
184
|
+
usage: Edits the DSU entries for yesterday
|
185
|
+
long_desc: |
|
186
|
+
Edits the DSU entries for yesterday.
|
187
|
+
list:
|
188
|
+
date:
|
189
|
+
desc: date|d DATE|MNEUMONIC
|
190
|
+
usage: Displays the DSU entries for the given DATE or MNEUMONIC
|
191
|
+
long_desc: |
|
192
|
+
Displays the DSU entries for the given DATE or MNEUMONIC.
|
193
|
+
|
194
|
+
%{date_option_description}
|
195
|
+
|
196
|
+
%{mneumonic_option_description}
|
197
|
+
dates:
|
198
|
+
desc: dates|dd OPTIONS
|
199
|
+
usage: Displays the DSU entries for the OPTIONS provided
|
200
|
+
long_desc: |
|
201
|
+
Displays the DSU entries for the given OPTIONS.
|
202
|
+
|
203
|
+
$ dsu dates OPTIONS
|
204
|
+
|
205
|
+
$ dsu dd OPTIONS
|
206
|
+
|
207
|
+
OPTIONS:
|
208
|
+
|
209
|
+
-a|--include-all true|false: If true, all DSU dates within the specified range will be displayed. If false, DSU dates between the first and last DSU dates that have NO entries will NOT be displayed.. The default is taken from the dsu configuration setting :include_all, see `dsu config info`.
|
210
|
+
|
211
|
+
-f|--from DATE|MNEMONIC: The DATE or MNEUMONIC that represents the start of the range of DSU dates to display. If a relative mneumonic is used (+/-n, e.g +1, -1, etc.), the date calculated will be relative to the current date (e.g. `<MNEUMONIC>.to_i.days.from_now(Time.now)`).
|
212
|
+
|
213
|
+
-t|--to DATE|MNEMONIC: The DATE or MNEUMONIC that represents the end of the range of DSU dates to display. If a relative mneumonic is used (+/-n, e.g +1, -1, etc.), the date calculated will be relative to the date that resulting from the `--from` option date calculation.
|
214
|
+
|
215
|
+
%{date_option_description}
|
216
|
+
|
217
|
+
%{mneumonic_option_description}
|
218
|
+
|
219
|
+
EXAMPLES:
|
220
|
+
|
221
|
+
NOTE: All example results are subject to the `--include-all|-a` option.
|
222
|
+
|
223
|
+
NOTE: All examples can substitute their respective short form options (e.g. `-f`, `-t`, etc. for `--from`, `--to`, etc.).
|
224
|
+
|
225
|
+
The below will display the DSU entries for the range of dates from 1/1 to 1/4 for the current year:
|
226
|
+
|
227
|
+
$ dsu list dates --from 1/1 --to +3
|
228
|
+
|
229
|
+
This will display the DSU entries for the range of dates from 1/2 to 1/5 for the year 2022:
|
230
|
+
|
231
|
+
$ dsu list dates --from 1/5/2022 --to -3
|
232
|
+
|
233
|
+
This (assuming "today" is 1/10) will display the DSU entries for the last week 1/10 to 1/3 of the current year:
|
234
|
+
|
235
|
+
$ dsu list dates --from today --to -7
|
236
|
+
|
237
|
+
This (assuming "today" is 5/23) will display the DSU entries for the last week 5/16 to 5/22.
|
238
|
+
This example simply illustrates the fact that you can use relative mneumonics for
|
239
|
+
both `--from` and `--to` options; this doesn't mean you should do so...
|
240
|
+
|
241
|
+
While you can use relative mneumonics for both `--from` and `--to` options,
|
242
|
+
there is always a more intuitive way. The below example basically lists one week
|
243
|
+
of DSU entries back 1 week from yesterday's date:
|
244
|
+
|
245
|
+
$ dsu list dates --from -7 --to +6
|
246
|
+
|
247
|
+
The above can be accomplished MUCH easier by simply using the `yesterday` mneumonic...
|
248
|
+
|
249
|
+
This (assuming "today" is 5/23) will display the DSU entries back 1 week from yesterday's date 5/16 to 5/22:
|
250
|
+
|
251
|
+
$ dsu list dates --from yesterday --to -6
|
252
|
+
today:
|
253
|
+
desc: today|n
|
254
|
+
usage: Displays the DSU entries for today
|
255
|
+
long_desc: |
|
256
|
+
Displays the DSU entries for today.
|
257
|
+
|
258
|
+
$ dsu list today
|
259
|
+
|
260
|
+
$ dsu list n
|
261
|
+
tomorrow:
|
262
|
+
desc: tomorrow|t
|
263
|
+
usage: Displays the DSU entries for tomorrow
|
264
|
+
long_desc: |
|
265
|
+
Displays the DSU entries for tomorrow.
|
266
|
+
|
267
|
+
$ dsu list tomorrow
|
268
|
+
|
269
|
+
$ dsu list t
|
270
|
+
yesterday:
|
271
|
+
desc: yesterday|y
|
272
|
+
usage: Displays the DSU entries for yesterday
|
273
|
+
long_desc: |
|
274
|
+
Displays the DSU entries for yesterday.
|
275
|
+
|
276
|
+
$ dsu list yesterday
|
277
|
+
|
278
|
+
$ dsu list y
|
279
|
+
theme:
|
280
|
+
create:
|
281
|
+
desc: create THEME_NAME [OPTIONS]
|
282
|
+
usage: Creates a dsu color theme named THEME_NAME
|
283
|
+
long_desc: |
|
284
|
+
Creates a dsu color theme named THEME_NAME in the %{themes_folder} folder.
|
285
|
+
|
286
|
+
$ dsu create THEME_NAME [-d|--description DESCRIPTION]
|
287
|
+
|
288
|
+
OPTIONS:
|
289
|
+
|
290
|
+
-d|--description DESCRIPTION: Creates the dsu color theme with having DESCRIPTION as the color theme description.
|
291
|
+
|
292
|
+
DESCRIPTION
|
293
|
+
|
294
|
+
Must be be between 2 and 256 characters (inclusive) in length.
|
295
|
+
prompts:
|
296
|
+
create_theme: Create color theme "%{theme_name}"?
|
297
|
+
errors:
|
298
|
+
already_exists: Color theme "%{theme_name}" already exists.
|
299
|
+
messages:
|
300
|
+
created: Created color theme "%{theme_name}".
|
301
|
+
canceled: Canceled.
|
302
|
+
delete:
|
303
|
+
desc: delete THEME_NAME
|
304
|
+
usage: Deletes the existing dsu color theme THEME_NAME
|
305
|
+
long_desc: |
|
306
|
+
Deletes the existing dsu color theme THEME_NAME in the %{themes_folder} folder.
|
307
|
+
|
308
|
+
$ dsu theme delete THEME_NAME
|
309
|
+
prompts:
|
310
|
+
delete_theme: Delete color theme "%{theme_name}"?
|
311
|
+
errors:
|
312
|
+
cannot_delete: Color theme "%{theme_name}" cannot be deleted.
|
313
|
+
messages:
|
314
|
+
canceled: Canceled.
|
315
|
+
deleted: Deleted color theme "%{theme_name}".
|
316
|
+
list:
|
317
|
+
desc: list
|
318
|
+
usage: Lists the available dsu color themes.
|
319
|
+
long_desc: |
|
320
|
+
Lists the available dsu color themes in the %{themes_folder} folder.
|
321
|
+
|
322
|
+
$ dsu theme list
|
323
|
+
use:
|
324
|
+
desc: use [THEME_NAME]
|
325
|
+
usage: Sets the dsu color theme to THEME_NAME
|
326
|
+
long_desc: |
|
327
|
+
Sets the dsu color theme to THEME_NAME.
|
328
|
+
|
329
|
+
$ dsu theme use [THEME_NAME]
|
330
|
+
|
331
|
+
NOTES
|
332
|
+
|
333
|
+
If THEME_NAME is not provided, the default theme will be used.
|
334
|
+
|
335
|
+
If THEME_NAME does not exist, you will be given the option to create a new theme.
|
336
|
+
messages:
|
337
|
+
using_color_theme: Using color theme "%{theme_name}".
|
338
|
+
show:
|
339
|
+
desc: show THEME_NAME
|
340
|
+
usage: Displays the dsu color theme THEME_NAME
|
341
|
+
long_desc: |
|
342
|
+
Displays the dsu color theme THEME_NAME.
|
343
|
+
|
344
|
+
$ dsu theme show THEME_NAME
|
345
|
+
generic:
|
346
|
+
color_theme: "%{theme_name} color theme"
|
347
|
+
errors:
|
348
|
+
does_not_exist: Color theme "%{theme_name}" does not exist.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dsu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gene M. Angelo, Jr.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 7.0.8
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: '8.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,27 +29,27 @@ dependencies:
|
|
29
29
|
version: 7.0.8
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: '8.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activemodel
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "~>"
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '7.0'
|
40
37
|
- - ">="
|
41
38
|
- !ruby/object:Gem::Version
|
42
|
-
version: 7.0.
|
39
|
+
version: 7.0.8
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '8.0'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - "~>"
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: '7.0'
|
50
47
|
- - ">="
|
51
48
|
- !ruby/object:Gem::Version
|
52
|
-
version: 7.0.
|
49
|
+
version: 7.0.8
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '8.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: colorize
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: 0.8.1
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.
|
62
|
+
version: '1.0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -69,61 +69,67 @@ dependencies:
|
|
69
69
|
version: 0.8.1
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 1.
|
72
|
+
version: '1.0'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: os
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- - "
|
77
|
+
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '1.1'
|
80
|
-
- - "
|
80
|
+
- - "<"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '2.0'
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '1.1'
|
90
|
-
- - "
|
90
|
+
- - "<"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
92
|
+
version: '2.0'
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: thor
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- - "
|
97
|
+
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '1.2'
|
100
|
-
- - "
|
100
|
+
- - "<"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version:
|
102
|
+
version: '2.0'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '1.2'
|
110
|
-
- - "
|
110
|
+
- - "<"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version:
|
112
|
+
version: '2.0'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: thor_nested_subcommand
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- - "
|
117
|
+
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '1.0'
|
120
|
+
- - "<"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '2.0'
|
120
123
|
type: :runtime
|
121
124
|
prerelease: false
|
122
125
|
version_requirements: !ruby/object:Gem::Requirement
|
123
126
|
requirements:
|
124
|
-
- - "
|
127
|
+
- - ">="
|
125
128
|
- !ruby/object:Gem::Version
|
126
129
|
version: '1.0'
|
130
|
+
- - "<"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '2.0'
|
127
133
|
description: ' dsu is a small, but powerful gem that helps manage your Agile DSU
|
128
134
|
(Daily Stand Up) participation. How? by providing a simple command-line interface
|
129
135
|
(CLI) which allows you to create, read, update, and delete (CRUD) your DSU entries
|
@@ -147,7 +153,6 @@ email:
|
|
147
153
|
- public.gma@gmail.com
|
148
154
|
executables:
|
149
155
|
- dsu
|
150
|
-
- dsu_migrate.rb
|
151
156
|
extensions: []
|
152
157
|
extra_rdoc_files: []
|
153
158
|
files:
|
@@ -166,7 +171,6 @@ files:
|
|
166
171
|
- bin/dsu
|
167
172
|
- bin/setup
|
168
173
|
- exe/dsu
|
169
|
-
- exe/dsu_migrate.rb
|
170
174
|
- lib/core/ruby/color_theme_colors.rb
|
171
175
|
- lib/core/ruby/color_theme_mode.rb
|
172
176
|
- lib/core/ruby/wrap_and_join.rb
|
@@ -193,6 +197,8 @@ files:
|
|
193
197
|
- lib/dsu/services/color_theme/hydrator_service.rb
|
194
198
|
- lib/dsu/services/configuration/hydrator_service.rb
|
195
199
|
- lib/dsu/services/entry/hydrator_service.rb
|
200
|
+
- lib/dsu/services/entry_group/counter_service.rb
|
201
|
+
- lib/dsu/services/entry_group/deleter_service.rb
|
196
202
|
- lib/dsu/services/entry_group/editor_service.rb
|
197
203
|
- lib/dsu/services/entry_group/hydrator_service.rb
|
198
204
|
- lib/dsu/services/migration_version/hydrator_service.rb
|
@@ -202,6 +208,7 @@ files:
|
|
202
208
|
- lib/dsu/services/temp_file/writer_service.rb
|
203
209
|
- lib/dsu/subcommands/base_subcommand.rb
|
204
210
|
- lib/dsu/subcommands/config.rb
|
211
|
+
- lib/dsu/subcommands/delete.rb
|
205
212
|
- lib/dsu/subcommands/edit.rb
|
206
213
|
- lib/dsu/subcommands/list.rb
|
207
214
|
- lib/dsu/subcommands/theme.rb
|
@@ -241,6 +248,12 @@ files:
|
|
241
248
|
- lib/dsu/views/shared/model_errors.rb
|
242
249
|
- lib/dsu/views/shared/success.rb
|
243
250
|
- lib/dsu/views/shared/warning.rb
|
251
|
+
- lib/locales/en/active_record.yml
|
252
|
+
- lib/locales/en/commands.yml
|
253
|
+
- lib/locales/en/miscellaneous.yml
|
254
|
+
- lib/locales/en/presenters.yml
|
255
|
+
- lib/locales/en/services.yml
|
256
|
+
- lib/locales/en/subcommands.yml
|
244
257
|
- lib/seed_data/themes/cherry.json
|
245
258
|
- lib/seed_data/themes/default.json
|
246
259
|
- lib/seed_data/themes/lemon.json
|
@@ -263,6 +276,8 @@ post_install_message: |
|
|
263
276
|
View the dsu README.md here: https://github.com/gangelo/dsu
|
264
277
|
View the dsu CHANGELOG.md: https://github.com/gangelo/dsu/blob/main/CHANGELOG.md
|
265
278
|
|
279
|
+
Dsu now has a delete command! Try it out by running `dsu delete help`.
|
280
|
+
|
266
281
|
Try a dsu theme by running `dsu theme list` and then `dsu theme use THEME_NAME` where THEME_NAME is the name of the theme you want to try :)
|
267
282
|
rdoc_options: []
|
268
283
|
require_paths:
|
data/exe/dsu_migrate.rb
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
# frozen_string_literal: true
|
4
|
-
|
5
|
-
require 'bundler/setup'
|
6
|
-
# require 'highline'
|
7
|
-
require 'dsu'
|
8
|
-
|
9
|
-
# def run_migrations?
|
10
|
-
# puts '***********************************************'
|
11
|
-
# puts '*** Migrations are pending! ***'
|
12
|
-
# puts '*** This is a pre-release version of dsu. ***'
|
13
|
-
# puts '*** It is highly recommended you exit ***'
|
14
|
-
# puts '*** this installation! ***'
|
15
|
-
# puts '***********************************************'
|
16
|
-
# prompt = 'What do you want to do?' \
|
17
|
-
# "\n c = Continue (install and run migrations)." \
|
18
|
-
# "\n x = Exit (recommended)." \
|
19
|
-
# "\n> "
|
20
|
-
# input = HighLine.new.ask(prompt, String) do |question|
|
21
|
-
# question.default = 'x'
|
22
|
-
# question.readline = true
|
23
|
-
# question.in = %w[x c]
|
24
|
-
# end
|
25
|
-
# input == 'c'
|
26
|
-
# end
|
27
|
-
|
28
|
-
def run_migrations!
|
29
|
-
# return 1 unless run_migrations?
|
30
|
-
|
31
|
-
puts 'Running migrations...'
|
32
|
-
Dsu::Migration::Service.run_migrations!
|
33
|
-
0
|
34
|
-
rescue StandardError => e
|
35
|
-
puts "Error running migrations: #{e.message}"
|
36
|
-
1
|
37
|
-
end
|
38
|
-
|
39
|
-
if Dsu::Migration::Service.run_migrations?
|
40
|
-
exit run_migrations!
|
41
|
-
else
|
42
|
-
exit 0
|
43
|
-
end
|