dsu 2.4.1 → 2.4.3
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 +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +8 -8
- data/README.md +23 -530
- data/lib/dsu/base_cli.rb +0 -2
- data/lib/dsu/cli.rb +5 -1
- data/lib/dsu/crud/json_file.rb +30 -16
- data/lib/dsu/env.rb +20 -1
- data/lib/dsu/models/color_theme.rb +1 -1
- data/lib/dsu/models/configuration.rb +2 -0
- data/lib/dsu/models/entry_group.rb +1 -1
- data/lib/dsu/models/migration_version.rb +2 -0
- data/lib/dsu/presenters/base_presenter_ex.rb +1 -1
- data/lib/dsu/presenters/configuration_presenter.rb +6 -1
- data/lib/dsu/presenters/entry_group/list/date_presenter.rb +77 -0
- data/lib/dsu/presenters/entry_group/list/dates_presenter.rb +60 -0
- data/lib/dsu/presenters/entry_group/list/messages.rb +15 -0
- data/lib/dsu/presenters/entry_group/list/nothing_to_list.rb +15 -0
- data/lib/dsu/services/entry_group/editor_service.rb +1 -1
- data/lib/dsu/subcommands/list.rb +13 -10
- data/lib/dsu/support/command_hookable.rb +5 -0
- data/lib/dsu/support/entry_group_browsable.rb +4 -1
- data/lib/dsu/version.rb +1 -1
- data/lib/dsu/views/entry_group/list.rb +23 -0
- data/lib/dsu/views/entry_group/show.rb +5 -1
- data/lib/locales/en/services.yml +2 -2
- metadata +38 -30
- data/lib/dsu/crud/raw_json_file.rb +0 -51
- data/lib/dsu/support/entry_group_viewable.rb +0 -61
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.
|
4
|
+
version: 2.4.3
|
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: 2024-01-
|
11
|
+
date: 2024-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -56,20 +56,20 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: '1.1'
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '2.0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: '1.1'
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '2.0'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: os
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,14 +130,13 @@ dependencies:
|
|
130
130
|
- - "<"
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '2.0'
|
133
|
-
description:
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
brings a dash of simplicity and fun, fun, fun to your daily agile routine!\n"
|
133
|
+
description: |2
|
134
|
+
dsu is ruby gem that enables anyone practicing Agile methodology to record, keep track of, and manage their daily standup (DSU) activities.
|
135
|
+
|
136
|
+
* dsu uses no network connections whatsoever.
|
137
|
+
* dsu stores all of its data locally, in .json files.
|
138
|
+
* dsu is a simple (but powerful) command-line tool for users who love to work within the terminal.
|
139
|
+
* dsu versioning follows the semantic versioning standard (MAJOR.MINOR.PATCH).
|
141
140
|
email:
|
142
141
|
- public.gma@gmail.com
|
143
142
|
executables:
|
@@ -169,7 +168,6 @@ files:
|
|
169
168
|
- lib/dsu/cli.rb
|
170
169
|
- lib/dsu/command_services/add_entry_service.rb
|
171
170
|
- lib/dsu/crud/json_file.rb
|
172
|
-
- lib/dsu/crud/raw_json_file.rb
|
173
171
|
- lib/dsu/env.rb
|
174
172
|
- lib/dsu/migration/service.rb
|
175
173
|
- lib/dsu/migration/version.rb
|
@@ -183,6 +181,10 @@ files:
|
|
183
181
|
- lib/dsu/presenters/color_theme_presenter.rb
|
184
182
|
- lib/dsu/presenters/color_theme_show_presenter.rb
|
185
183
|
- lib/dsu/presenters/configuration_presenter.rb
|
184
|
+
- lib/dsu/presenters/entry_group/list/date_presenter.rb
|
185
|
+
- lib/dsu/presenters/entry_group/list/dates_presenter.rb
|
186
|
+
- lib/dsu/presenters/entry_group/list/messages.rb
|
187
|
+
- lib/dsu/presenters/entry_group/list/nothing_to_list.rb
|
186
188
|
- lib/dsu/presenters/entry_group_presenter.rb
|
187
189
|
- lib/dsu/presenters/entry_presenter.rb
|
188
190
|
- lib/dsu/presenters/export/all_presenter.rb
|
@@ -229,7 +231,6 @@ files:
|
|
229
231
|
- lib/dsu/support/command_options/time_mnemonics.rb
|
230
232
|
- lib/dsu/support/descriptable.rb
|
231
233
|
- lib/dsu/support/entry_group_browsable.rb
|
232
|
-
- lib/dsu/support/entry_group_viewable.rb
|
233
234
|
- lib/dsu/support/field_errors.rb
|
234
235
|
- lib/dsu/support/fileable.rb
|
235
236
|
- lib/dsu/support/presentable.rb
|
@@ -247,6 +248,7 @@ files:
|
|
247
248
|
- lib/dsu/views/color_theme/show.rb
|
248
249
|
- lib/dsu/views/configuration/show.rb
|
249
250
|
- lib/dsu/views/entry_group/edit.rb
|
251
|
+
- lib/dsu/views/entry_group/list.rb
|
250
252
|
- lib/dsu/views/entry_group/shared/no_entries_to_display.rb
|
251
253
|
- lib/dsu/views/entry_group/shared/no_entries_to_display_for_month_of.rb
|
252
254
|
- lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
|
@@ -290,25 +292,28 @@ post_install_message: |
|
|
290
292
|
View the dsu README.md here: https://github.com/gangelo/dsu
|
291
293
|
View the dsu CHANGELOG.md: https://github.com/gangelo/dsu/blob/main/CHANGELOG.md
|
292
294
|
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
295
|
+
*
|
296
|
+
***
|
297
|
+
*******
|
298
|
+
*********
|
299
|
+
***********************
|
300
|
+
*****************
|
301
|
+
*************
|
302
|
+
******* *******
|
303
|
+
***** *****
|
304
|
+
*** ***
|
305
|
+
** **
|
298
306
|
|
299
|
-
|
307
|
+
Using dsu? dsu is made available free of charge. Please consider giving dsu a STAR on GitHub as well as sharing dsu with your fellow developers on social media.
|
300
308
|
|
301
|
-
|
309
|
+
Knowing that dsu is being used and appreciated is a great motivator to continue developing and improving dsu.
|
302
310
|
|
303
|
-
|
311
|
+
>>> Star it on github: https://github.com/gangelo/dsu
|
312
|
+
>>> Share on social media: https://rubygems.org/gems/dsu
|
304
313
|
|
305
|
-
|
306
|
-
* * . * . *
|
307
|
-
* * * * * *
|
308
|
-
* * * * *
|
309
|
-
* * *
|
314
|
+
Thank you!
|
310
315
|
|
311
|
-
|
316
|
+
<3 Gene
|
312
317
|
rdoc_options: []
|
313
318
|
require_paths:
|
314
319
|
- lib
|
@@ -317,6 +322,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
317
322
|
- - ">="
|
318
323
|
- !ruby/object:Gem::Version
|
319
324
|
version: 3.0.1
|
325
|
+
- - "<"
|
326
|
+
- !ruby/object:Gem::Version
|
327
|
+
version: '4.0'
|
320
328
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
321
329
|
requirements:
|
322
330
|
- - ">="
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'fileutils'
|
4
|
-
|
5
|
-
module Dsu
|
6
|
-
module Crud
|
7
|
-
module RawJsonFile
|
8
|
-
class << self
|
9
|
-
def delete(file_path:)
|
10
|
-
return false unless exist?(file_path: file_path)
|
11
|
-
|
12
|
-
File.delete(file_path)
|
13
|
-
|
14
|
-
true
|
15
|
-
end
|
16
|
-
|
17
|
-
def delete!(file_path:)
|
18
|
-
raise file_does_not_exist_message(file_path: file_path) unless delete(file_path: file_path)
|
19
|
-
end
|
20
|
-
|
21
|
-
def exist?(file_path:)
|
22
|
-
File.exist?(file_path)
|
23
|
-
end
|
24
|
-
|
25
|
-
def read(file_path:)
|
26
|
-
File.read(file_path) if exist?(file_path: file_path)
|
27
|
-
end
|
28
|
-
|
29
|
-
def read!(file_path:)
|
30
|
-
raise file_does_not_exist_message(file_path: file_path) unless exist?(file_path: file_path)
|
31
|
-
|
32
|
-
read(file_path: file_path)
|
33
|
-
end
|
34
|
-
|
35
|
-
def write(file_data:, file_path:)
|
36
|
-
raise ArgumentError, 'file_data is nil' if file_data.nil?
|
37
|
-
raise ArgumentError, "file_data is the wrong object type:\"#{file_data}\"" unless file_data.is_a?(Hash)
|
38
|
-
|
39
|
-
file_data = JSON.pretty_generate(file_data)
|
40
|
-
File.write(file_path, file_data)
|
41
|
-
end
|
42
|
-
|
43
|
-
private
|
44
|
-
|
45
|
-
def file_does_not_exist_message(file_path:)
|
46
|
-
"File \"#{file_path}\" does not exist"
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Dsu
|
4
|
-
module Support
|
5
|
-
module EntryGroupViewable
|
6
|
-
def view_entry_groups(times:, options: {})
|
7
|
-
raise ArgumentError, 'times must be an Array' unless times.is_a?(Array)
|
8
|
-
raise ArgumentError, 'options must be a Hash' unless options.is_a?(Hash)
|
9
|
-
|
10
|
-
total_viewable_entry_groups = 0
|
11
|
-
|
12
|
-
times.each do |time|
|
13
|
-
view_entry_group(time: time, options: options) do
|
14
|
-
total_viewable_entry_groups += 1
|
15
|
-
puts
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
total_unviewable_entry_groups = times.size - total_viewable_entry_groups
|
20
|
-
yield total_viewable_entry_groups, total_unviewable_entry_groups if block_given?
|
21
|
-
end
|
22
|
-
|
23
|
-
def view_entry_group(time:, options: {})
|
24
|
-
raise ArgumentError, 'time must be a Time object' unless time.is_a?(Time)
|
25
|
-
raise ArgumentError, 'options must be a Hash' unless options.is_a?(Hash)
|
26
|
-
|
27
|
-
return unless show_entry_group?(time: time, options: options)
|
28
|
-
|
29
|
-
entry_group = Models::EntryGroup.find_or_initialize(time: time)
|
30
|
-
Views::EntryGroup::Show.new(entry_group: entry_group).render
|
31
|
-
|
32
|
-
yield if block_given?
|
33
|
-
end
|
34
|
-
|
35
|
-
# This method will unconditionally display the FIRST and LAST entry groups
|
36
|
-
# associated with the times provided by the <times> argument. All other
|
37
|
-
# entry groups will be conditionally displayed based on the :include_all
|
38
|
-
# value in the <options> argument.
|
39
|
-
def view_list_for(times:, options:)
|
40
|
-
configuration = Models::Configuration.new unless defined?(configuration) && configuration
|
41
|
-
options = configuration.to_h.merge(options).with_indifferent_access
|
42
|
-
times_first_and_last = [times.first, times.last]
|
43
|
-
times.each do |time|
|
44
|
-
view_options = options.dup
|
45
|
-
view_options[:include_all] = true if times_first_and_last.include?(time)
|
46
|
-
view_entry_group(time: time, options: view_options) do
|
47
|
-
puts
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
private
|
53
|
-
|
54
|
-
def show_entry_group?(time:, options:)
|
55
|
-
Models::EntryGroup.exist?(time: time) || options[:include_all]
|
56
|
-
end
|
57
|
-
|
58
|
-
module_function :view_entry_group, :view_entry_groups, :view_list_for, :show_entry_group?
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|