dsu 2.2.0 → 2.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2800dfb924a05024512259b5131cfa198a81d6bbe5cd40447957573eb00bf0d7
4
- data.tar.gz: c4e65b543e6f2ed28844e00572a3cf402ee5c2e88dba5e743e915e2b5a514cc8
3
+ metadata.gz: b3392337ff034bb87447d33d1fd03e00e58a18bba0a2571cf5588ffa1106a5fc
4
+ data.tar.gz: 07d0cfe879a47372f6f22da07e79409f0f93e752d8a1a253d379dbf8c3a68fca
5
5
  SHA512:
6
- metadata.gz: 9b73f2a35f5791e4576c96cdb207046e784459083ea4815fb97083ff39a458671b4627a853f6423a3c4c87a38bc25df7c8c378622d4c636dfdbca2278ef13691
7
- data.tar.gz: bd037348418829c9e0c4f1e65754d99a6670ff7b130f41806148a4493d784ca64021673f943858ad812ed527718281ca623ec36e3038e2f508625707a61ea189
6
+ metadata.gz: 7e25abb091f0b1bfee094839ac8b06cca34ed15e7637fc45ecb570bf95f8e18c9bb9e86904c7f5768cbac72dac6f084c66aa4bfeb436375c5323b16e9e426000
7
+ data.tar.gz: 9b03fac5350508818cd9e073184d35c6523ee8b0fdd271afc3dab43fde32948c6ab0cc1709dbcfc1e1539cfe2565638e47bf61ff579e6a22dbdb727950c93adf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [2.2.2] 2023-12-23
2
+
3
+ Changes
4
+
5
+ - README.md updates.
6
+
7
+ Bug fix
8
+
9
+ - Fix `dsu config` shortcut command mapping bug that caused `dsu c` to display `dsu delete` command help instead of `dsu config` command help.
10
+
11
+ ## [2.2.1] 2023-12-23
12
+
13
+ Changes
14
+
15
+ - Add specs for `dsu browse` command.
16
+ - Code refactors, nothing discernable to the end user.
17
+
1
18
  ## [2.2.0] 2023-12-23
2
19
 
3
20
  Stable release.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dsu (2.2.0)
4
+ dsu (2.2.2)
5
5
  activemodel (>= 7.0.8, < 8.0)
6
6
  activesupport (>= 7.0.8, < 8.0)
7
7
  colorize (>= 0.8.1, < 1.0)
data/README.md CHANGED
@@ -58,8 +58,9 @@ The folowing section outlines how to use the `dsu` gem.
58
58
  ## Adding DSU Entries
59
59
  The next thing you may want to do is `add` some DSU activities (entries) for a particular day:
60
60
 
61
- `dsu add [OPTIONS] DESCRIPTION`
62
- `dsu a [OPTIONS] DESCRIPTION`
61
+ `$ dsu add [OPTIONS] DESCRIPTION`
62
+
63
+ `$ dsu a [OPTIONS] DESCRIPTION`
63
64
 
64
65
  Adding DSU entry using this command will _add_ the DSU entry for the given day or date, and then _display_ the DSU entries for that day or date.
65
66
 
@@ -69,18 +70,21 @@ Adding DSU entry using this command will _add_ the DSU entry for the given day o
69
70
  If you need to add a DSU entry for the current day (today), you can use the `-n`|`--today` option. Today (`-n`) is the default; therefore, the `-n` flag is optional if you want to add a DSU entry for the _current day_ (today). For example, the below commands will both accomplish the same thing:
70
71
 
71
72
  `$ dsu add [-n|--today] "Pair with John on ticket IN-12345"`
73
+
72
74
  `$ dsu a "Pair with John on ticket IN-12345"`
73
75
 
74
76
  ### Yesterday
75
77
  If for some reason you need to add a DSU entry for yesterday, you can use the `-y`| `--yesterday` option. Both of the below commands accomplish the same thing:
76
78
 
77
79
  `$ dsu add --yesterday "Pick up ticket IN-12345"`
80
+
78
81
  `$ dsu a -y "Pick up ticket IN-12345"`
79
82
 
80
83
  ### Tomorrow
81
84
  If you need to add a DSU entry for tomorrow, you can use the `-t`|`--tomorrow` option:
82
85
 
83
86
  `$ dsu add --tomorrow "Pick up ticket IN-12345"`
87
+
84
88
  `$ dsu a -t "Pick up ticket IN-12345"`
85
89
 
86
90
  ### Miscellaneous Date
@@ -91,6 +95,7 @@ Both of the below examples will accomplish the same thing, assuming the current
91
95
  **NOTE:** When **including year**, dates must be entered in `YYYY/MM/DD` format.
92
96
 
93
97
  `$ dsu add --date 2023/12/31 "Attend New Years Coffee Meet & Greet"`
98
+
94
99
  `$ dsu a -d 12/31 "Attend New Years Coffee Meet & Greet"`
95
100
 
96
101
  See the [Dates](#dates) section for more information on acceptable DATE formats used by `dsu`.
@@ -118,6 +123,7 @@ See the [Mnemonics](#mnemonics) section for more information on acceptable MNEMO
118
123
  The following displays the entries for "Today", where `Time.now == '2023-05-06 08:54:57.6861 -0400'`
119
124
 
120
125
  `$ dsu list today`
126
+
121
127
  `$ dsu l t`
122
128
  ```shell
123
129
  #=>
@@ -130,7 +136,9 @@ Friday, (Yesterday) 2023-05-05
130
136
  ```
131
137
 
132
138
  `$ dsu list date 5/7/2023`
139
+
133
140
  `$ dsu list d 2023/7/5`
141
+
134
142
  `$ dsu l d 7/5` # When omitting YYYY, MM/DD is assumed
135
143
 
136
144
  ```shell
@@ -151,22 +159,27 @@ For more information, see the [Mnemonics](#mnemonics) section for more informati
151
159
 
152
160
  ##### Display the DSU entries for the last 3 days
153
161
  `$ dsu list dates --from yesterday --to -2`
162
+
154
163
  `$ dsu l dd -f y -t -2`
155
164
 
156
165
  ##### Display the DSU entries for 1/1 to 1/4 for the current year
157
166
  `$ dsu list dates --from 1/1 --to +3`
167
+
158
168
  `$ dsu l dd -f 1/1 -t +3`
159
169
 
160
170
  ##### Display the DSU entries for 1/2 to 1/5
161
171
  `$ dsu list dates --from 1/5 --to -3`
172
+
162
173
  `$ dsu l dd -f 1/5 -t -3`
163
174
 
164
175
  ##### Display the DSU entries for the last week
165
176
  `$ dsu list dates --from today --to -6`
177
+
166
178
  `$ dsu l dd -f n -t -6`
167
179
 
168
180
  ##### Display the DSU entries back 1 week from yesterday's date
169
181
  `$ dsu list dates --from -7 --to +6`
182
+
170
183
  `$ dsu l dd -f -7 -t +6`
171
184
 
172
185
  **NOTE:** **The above example is silly,** but it illustrates the fact that you can use relative mnemonics for both `--from` and `--to` options. While you *can* use relative mnemonics for both the `--from` and `--to` options, there is usually a more intuitive way.
@@ -176,6 +189,7 @@ For example:
176
189
  This can be accomplished MUCH easier by using the `yesterday` mnemonic. This will display the DSU entries back 1 week from yesterday's date.
177
190
 
178
191
  `$ dsu list dates --from yesterday --to -6`
192
+
179
193
  `$ dsu l dd -f y -t -6`
180
194
 
181
195
  ## Browsing DSU Entries
@@ -214,6 +228,7 @@ If no entries exist for the DSU date, the editor will open and allow you to add
214
228
  The following will edit your DSU entry group entries for "Today", where `Time.now == '2023-05-09 12:13:45.8273 -0400'`. Simply follow the directions in the editor file, then save and close your editor to apply the changes:
215
229
 
216
230
  `$ dsu edit today`
231
+
217
232
  `$ dsu e n`
218
233
 
219
234
  ```shell
@@ -315,6 +330,7 @@ See the [Mnemonics](#mnemonics) section for more information on acceptable MNEMO
315
330
  The following example deletes the entry group and *all* entries for today's date.
316
331
 
317
332
  `$ dsu delete today`
333
+
318
334
  `$ dsu d n`
319
335
  ```shell
320
336
  #=>
@@ -324,6 +340,7 @@ Deleted 1 entry group(s).
324
340
  The following example deletes the entry group and *all* entries for yesterday's date.
325
341
 
326
342
  `$ dsu delete yesterday`
343
+
327
344
  `$ dsu d y`
328
345
  ```shell
329
346
  #=>
@@ -333,6 +350,7 @@ Deleted 1 entry group(s).
333
350
  The following example deletes the entry group and *all* entries for tomorrow's date.
334
351
 
335
352
  `$ dsu delete tomorrow`
353
+
336
354
  `$ dsu d t`
337
355
  ```shell
338
356
  #=>
@@ -343,6 +361,7 @@ Deleted 1 entry group(s).
343
361
  The following deletes the entry group and all entries for 12/17 of the current year.
344
362
 
345
363
  `$ dsu delete date 12/17`
364
+
346
365
  `$ dsu d d 12/17`
347
366
  ```shell
348
367
  #=>
@@ -353,6 +372,7 @@ Deleted 1 entry group(s)
353
372
  The following deletes the entry group and all entries for the past week, starting from today (12/17/2023).
354
373
 
355
374
  `$ dsu delete dates --from today --to -6`
375
+
356
376
  `$ dsu d dd -f n -t -6`
357
377
  ```shell
358
378
  #=>
@@ -23,6 +23,7 @@ module Dsu
23
23
  map %w[m] => :month
24
24
  map %w[y] => :year
25
25
 
26
+ class_option :pager, default: true, type: :boolean, hide: true, aliases: '-p'
26
27
  class_option :include_all, default: nil, type: :boolean, aliases: '-a',
27
28
  desc: I18n.t('options.include_all')
28
29
 
@@ -58,7 +58,7 @@ module Dsu
58
58
  end
59
59
 
60
60
  def output_with_pager(output:, options:)
61
- if options[:pager] == :no_pager
61
+ if options[:pager] == false
62
62
  puts output
63
63
  return
64
64
  end
data/lib/dsu/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Dsu
4
4
  VERSION_REGEX = /\A\d+\.\d+\.\d+(\.(alpha|rc)\.\d+)?\z/
5
- VERSION = '2.2.0'
5
+ VERSION = '2.2.2'
6
6
  end
@@ -23,7 +23,11 @@ module Dsu
23
23
 
24
24
  # TODO: I18n.
25
25
  def render
26
- puts apply_theme(message, theme_color: color_theme.info)
26
+ puts render_as_string
27
+ end
28
+
29
+ def render_as_string
30
+ apply_theme(message, theme_color: color_theme.info)
27
31
  end
28
32
 
29
33
  private
@@ -58,7 +58,7 @@ en:
58
58
  desc: config|c SUBCOMMAND
59
59
  usage: Manage configuration file for this gem
60
60
  delete:
61
- key_mappings: c
61
+ key_mappings: d
62
62
  desc: delete|d SUBCOMMAND
63
63
  usage: Delete DSU entries for the given SUBCOMMAND
64
64
  edit:
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.2.0
4
+ version: 2.2.2
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-12-23 00:00:00.000000000 Z
11
+ date: 2023-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport