simple_command_dispatcher 4.1.0 → 5.0.0
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/.github/workflows/ruby.yml +3 -3
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +58 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +66 -35
- data/README.md +264 -34
- data/lib/simple_command_dispatcher/commands/command_callable.rb +53 -1
- data/lib/simple_command_dispatcher/commands/errors.rb +39 -0
- data/lib/simple_command_dispatcher/configuration.rb +25 -6
- data/lib/simple_command_dispatcher/helpers/camelize.rb +1 -1
- data/lib/simple_command_dispatcher/logger.rb +21 -0
- data/lib/simple_command_dispatcher/services/command_service.rb +31 -31
- data/lib/simple_command_dispatcher/services/options_service.rb +37 -0
- data/lib/simple_command_dispatcher/version.rb +1 -1
- data/lib/simple_command_dispatcher.rb +37 -6
- data/simple_command_dispatcher.gemspec +1 -1
- metadata +6 -6
- data/.travis.yml +0 -5
- data/Jenkinsfile +0 -20
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aedf2e728af57a21d22a35d5b2d42e4403f5ea6615682b2c877c3ea65759a3b
|
|
4
|
+
data.tar.gz: 2262b184b9aa0612cbd2f28050ef0eab81a7c35dc937b8239ea36599961fee73
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 508db6d4a702ee9765cab2ea64c2c372a924ad4047624c82d77bf1727941c869cf72b726a2b4bb421f091d3889bd730c59d74325cfdee281a3b3a51bc9bff19b
|
|
7
|
+
data.tar.gz: 07c06d18b0f0fc4d433126d0ad4b8972f36138984226f26dad3a47fc6cfc9973a6d68ecab27145216c250d06dce1f080e88c797849cbd7449ac90c6f7f772f33
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -18,18 +18,18 @@ jobs:
|
|
|
18
18
|
os:
|
|
19
19
|
[
|
|
20
20
|
ubuntu-22.04,
|
|
21
|
+
ubuntu-24.04,
|
|
21
22
|
ubuntu-latest,
|
|
22
|
-
macos-13,
|
|
23
23
|
macos-14,
|
|
24
24
|
macos-15,
|
|
25
25
|
windows-2022,
|
|
26
26
|
windows-latest,
|
|
27
27
|
]
|
|
28
28
|
# Use `rbenv install --list` to determine what stable ruby versions to test against.
|
|
29
|
-
ruby: ["
|
|
29
|
+
ruby: ["4.0"]
|
|
30
30
|
|
|
31
31
|
steps:
|
|
32
|
-
- uses: actions/checkout@
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
33
|
|
|
34
34
|
- name: Set timezone on Linux
|
|
35
35
|
if: contains(matrix.os, 'ubuntu')
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## Version 5.0.0 - 2026-02-17
|
|
4
|
+
|
|
5
|
+
- **Breaking Changes**:
|
|
6
|
+
|
|
7
|
+
- Minimum Ruby version changed from 3.3 to 4.0.1
|
|
8
|
+
- Ruby version constraint updated to `>= 4.0.1`, `< 5.0`
|
|
9
|
+
|
|
10
|
+
- **CI/CD Updates**:
|
|
11
|
+
|
|
12
|
+
- Updated GitHub Actions matrix to test against Ruby 4.0
|
|
13
|
+
- Updated `actions/checkout` from v3 to v4
|
|
14
|
+
- Removed stale `.travis.yml` (referenced Ruby 2.0.0)
|
|
15
|
+
- Removed stale `Jenkinsfile` (referenced Ruby 3.2.6)
|
|
16
|
+
|
|
17
|
+
- **Dependency Updates**:
|
|
18
|
+
|
|
19
|
+
- Added `fiddle` gem for Windows compatibility (extracted from default gems in Ruby 4.0.0)
|
|
20
|
+
- Updated all gem dependencies via `bundle update`
|
|
21
|
+
- ActiveSupport updated to 8.1.2
|
|
22
|
+
- RuboCop updated to 1.84.2
|
|
23
|
+
- RSpec updated to 3.13.2
|
|
24
|
+
|
|
25
|
+
## Version 4.2.0 - 2025-10-07
|
|
26
|
+
|
|
27
|
+
- **New Feature: Configurable Logger with Debug Mode**:
|
|
28
|
+
|
|
29
|
+
- Added configurable logger with automatic Rails.logger detection
|
|
30
|
+
- Introduced debug mode for command execution debugging via `options: { debug: true }`
|
|
31
|
+
- Logger can be configured via `SimpleCommandDispatcher.configuration.logger`
|
|
32
|
+
- Added `OptionsService` for managing command execution options
|
|
33
|
+
- Enhanced `SimpleCommandDispatcher.call` with `options:` parameter to support debug logging
|
|
34
|
+
- When debug mode is enabled, detailed debug logging shows command execution flow
|
|
35
|
+
|
|
36
|
+
- **Test Coverage Improvements**:
|
|
37
|
+
|
|
38
|
+
- Achieved 100% test coverage across all modules (243 examples, 0 failures)
|
|
39
|
+
- Added comprehensive tests for `CommandCallable::Errors` class (15 new tests)
|
|
40
|
+
- Added comprehensive tests for `CommandCallable::Utils.array_wrap` method (8 new tests)
|
|
41
|
+
- Added tests for Rails logger auto-detection in configuration
|
|
42
|
+
- Added tests for debug mode functionality in command execution
|
|
43
|
+
- Enhanced test coverage for `OptionsService` and logger integration
|
|
44
|
+
|
|
45
|
+
- **Documentation Enhancements**:
|
|
46
|
+
|
|
47
|
+
- Updated API documentation for `SimpleCommandDispatcher.call` to include `options` parameter
|
|
48
|
+
- Added comprehensive documentation for `CommandCallable` module with usage examples
|
|
49
|
+
- Documented all public methods in `Errors` class with examples
|
|
50
|
+
- Added documentation for `OptionsService` class and debug mode
|
|
51
|
+
- Enhanced `Configuration` documentation to include logger attribute
|
|
52
|
+
- Fixed all YARD documentation to accurately reflect current implementation
|
|
53
|
+
- Added best practice guidance for private `initialize` in CommandCallable commands
|
|
54
|
+
|
|
55
|
+
- **Dependency Updates**:
|
|
56
|
+
|
|
57
|
+
- Added `irb` and `reline` gems to development dependencies
|
|
58
|
+
- Addresses Ruby 3.5 deprecation warnings for extracted standard library gems
|
|
59
|
+
- Rails 8 compatibility confirmed (supports ActiveSupport 8.x)
|
|
60
|
+
|
|
3
61
|
## Version 4.1.0 - 2025-07-14
|
|
4
62
|
|
|
5
63
|
- **New Feature: CommandCallable Module**:
|
data/Gemfile
CHANGED
|
@@ -10,7 +10,10 @@ gem 'colorize', '>= 0.8.1', '< 2.0'
|
|
|
10
10
|
gem 'rake', '>= 13.0', '< 14.0'
|
|
11
11
|
|
|
12
12
|
group :development do
|
|
13
|
+
gem 'fiddle', '>= 1.1'
|
|
14
|
+
gem 'irb', '>= 1.0'
|
|
13
15
|
gem 'pry-byebug', '>= 3.9', '< 4.0'
|
|
16
|
+
gem 'reline', '>= 0.3'
|
|
14
17
|
gem 'rubocop', '>= 1.62', '< 2.0'
|
|
15
18
|
gem 'rubocop-performance', '>= 1.20', '< 2.0'
|
|
16
19
|
gem 'rubocop-rake', '>= 0.6', '< 1.0'
|
data/Gemfile.lock
CHANGED
|
@@ -1,73 +1,97 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
simple_command_dispatcher (
|
|
4
|
+
simple_command_dispatcher (5.0.0)
|
|
5
5
|
activesupport (>= 7.0.8, < 9.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
activesupport (
|
|
10
|
+
activesupport (8.1.2)
|
|
11
11
|
base64
|
|
12
|
-
benchmark (>= 0.3)
|
|
13
12
|
bigdecimal
|
|
14
13
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
15
14
|
connection_pool (>= 2.2.5)
|
|
16
15
|
drb
|
|
17
16
|
i18n (>= 1.6, < 2)
|
|
17
|
+
json
|
|
18
18
|
logger (>= 1.4.2)
|
|
19
19
|
minitest (>= 5.1)
|
|
20
20
|
securerandom (>= 0.3)
|
|
21
21
|
tzinfo (~> 2.0, >= 2.0.5)
|
|
22
|
+
uri (>= 0.13.1)
|
|
22
23
|
ast (2.4.3)
|
|
23
24
|
base64 (0.3.0)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
bigdecimal (4.0.1)
|
|
26
|
+
byebug (13.0.0)
|
|
27
|
+
reline (>= 0.6.0)
|
|
27
28
|
coderay (1.1.3)
|
|
28
29
|
colorize (1.1.0)
|
|
29
|
-
concurrent-ruby (1.3.
|
|
30
|
-
connection_pool (
|
|
30
|
+
concurrent-ruby (1.3.6)
|
|
31
|
+
connection_pool (3.0.2)
|
|
32
|
+
date (3.5.1)
|
|
31
33
|
diff-lcs (1.6.2)
|
|
32
34
|
docile (1.4.1)
|
|
33
35
|
drb (2.2.3)
|
|
34
|
-
|
|
36
|
+
erb (6.0.1)
|
|
37
|
+
fiddle (1.1.8)
|
|
38
|
+
i18n (1.14.8)
|
|
35
39
|
concurrent-ruby (~> 1.0)
|
|
36
|
-
|
|
40
|
+
io-console (0.8.2)
|
|
41
|
+
irb (1.17.0)
|
|
42
|
+
pp (>= 0.6.0)
|
|
43
|
+
prism (>= 1.3.0)
|
|
44
|
+
rdoc (>= 4.0.0)
|
|
45
|
+
reline (>= 0.4.2)
|
|
46
|
+
json (2.18.1)
|
|
37
47
|
language_server-protocol (3.17.0.5)
|
|
38
48
|
lint_roller (1.1.0)
|
|
39
49
|
logger (1.7.0)
|
|
40
50
|
method_source (1.1.0)
|
|
41
|
-
minitest (
|
|
51
|
+
minitest (6.0.1)
|
|
52
|
+
prism (~> 1.5)
|
|
42
53
|
parallel (1.27.0)
|
|
43
|
-
parser (3.3.
|
|
54
|
+
parser (3.3.10.2)
|
|
44
55
|
ast (~> 2.4.1)
|
|
45
56
|
racc
|
|
46
|
-
|
|
47
|
-
|
|
57
|
+
pp (0.6.3)
|
|
58
|
+
prettyprint
|
|
59
|
+
prettyprint (0.2.0)
|
|
60
|
+
prism (1.9.0)
|
|
61
|
+
pry (0.16.0)
|
|
48
62
|
coderay (~> 1.1)
|
|
49
63
|
method_source (~> 1.0)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
64
|
+
reline (>= 0.6.0)
|
|
65
|
+
pry-byebug (3.12.0)
|
|
66
|
+
byebug (~> 13.0)
|
|
67
|
+
pry (>= 0.13, < 0.17)
|
|
68
|
+
psych (5.3.1)
|
|
69
|
+
date
|
|
70
|
+
stringio
|
|
53
71
|
racc (1.8.1)
|
|
54
72
|
rainbow (3.1.1)
|
|
55
|
-
rake (13.3.
|
|
56
|
-
|
|
57
|
-
|
|
73
|
+
rake (13.3.1)
|
|
74
|
+
rdoc (7.2.0)
|
|
75
|
+
erb
|
|
76
|
+
psych (>= 4.0.0)
|
|
77
|
+
tsort
|
|
78
|
+
regexp_parser (2.11.3)
|
|
79
|
+
reline (0.6.3)
|
|
80
|
+
io-console (~> 0.5)
|
|
81
|
+
rspec (3.13.2)
|
|
58
82
|
rspec-core (~> 3.13.0)
|
|
59
83
|
rspec-expectations (~> 3.13.0)
|
|
60
84
|
rspec-mocks (~> 3.13.0)
|
|
61
|
-
rspec-core (3.13.
|
|
85
|
+
rspec-core (3.13.6)
|
|
62
86
|
rspec-support (~> 3.13.0)
|
|
63
87
|
rspec-expectations (3.13.5)
|
|
64
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
65
89
|
rspec-support (~> 3.13.0)
|
|
66
|
-
rspec-mocks (3.13.
|
|
90
|
+
rspec-mocks (3.13.7)
|
|
67
91
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
68
92
|
rspec-support (~> 3.13.0)
|
|
69
|
-
rspec-support (3.13.
|
|
70
|
-
rubocop (1.
|
|
93
|
+
rspec-support (3.13.7)
|
|
94
|
+
rubocop (1.84.2)
|
|
71
95
|
json (~> 2.3)
|
|
72
96
|
language_server-protocol (~> 3.17.0.2)
|
|
73
97
|
lint_roller (~> 1.1.0)
|
|
@@ -75,39 +99,43 @@ GEM
|
|
|
75
99
|
parser (>= 3.3.0.2)
|
|
76
100
|
rainbow (>= 2.2.2, < 4.0)
|
|
77
101
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
78
|
-
rubocop-ast (>= 1.
|
|
102
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
79
103
|
ruby-progressbar (~> 1.7)
|
|
80
104
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
81
|
-
rubocop-ast (1.
|
|
105
|
+
rubocop-ast (1.49.0)
|
|
82
106
|
parser (>= 3.3.7.2)
|
|
83
|
-
prism (~> 1.
|
|
84
|
-
rubocop-performance (1.
|
|
107
|
+
prism (~> 1.7)
|
|
108
|
+
rubocop-performance (1.26.1)
|
|
85
109
|
lint_roller (~> 1.1)
|
|
86
110
|
rubocop (>= 1.75.0, < 2.0)
|
|
87
|
-
rubocop-ast (>= 1.
|
|
111
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
88
112
|
rubocop-rake (0.7.1)
|
|
89
113
|
lint_roller (~> 1.1)
|
|
90
114
|
rubocop (>= 1.72.1)
|
|
91
|
-
rubocop-rspec (3.
|
|
115
|
+
rubocop-rspec (3.9.0)
|
|
92
116
|
lint_roller (~> 1.1)
|
|
93
|
-
rubocop (~> 1.
|
|
117
|
+
rubocop (~> 1.81)
|
|
94
118
|
ruby-progressbar (1.13.0)
|
|
95
119
|
securerandom (0.4.1)
|
|
96
120
|
simplecov (0.22.0)
|
|
97
121
|
docile (~> 1.1)
|
|
98
122
|
simplecov-html (~> 0.11)
|
|
99
123
|
simplecov_json_formatter (~> 0.1)
|
|
100
|
-
simplecov-html (0.13.
|
|
124
|
+
simplecov-html (0.13.2)
|
|
101
125
|
simplecov_json_formatter (0.1.4)
|
|
126
|
+
stringio (3.2.0)
|
|
127
|
+
tsort (0.2.0)
|
|
102
128
|
tzinfo (2.0.6)
|
|
103
129
|
concurrent-ruby (~> 1.0)
|
|
104
|
-
unicode-display_width (3.
|
|
105
|
-
unicode-emoji (~> 4.
|
|
106
|
-
unicode-emoji (4.0
|
|
130
|
+
unicode-display_width (3.2.0)
|
|
131
|
+
unicode-emoji (~> 4.1)
|
|
132
|
+
unicode-emoji (4.2.0)
|
|
133
|
+
uri (1.1.1)
|
|
107
134
|
|
|
108
135
|
PLATFORMS
|
|
109
136
|
arm64-darwin-22
|
|
110
137
|
arm64-darwin-23
|
|
138
|
+
arm64-darwin-25
|
|
111
139
|
x64-mingw-ucrt
|
|
112
140
|
x86_64-darwin-19
|
|
113
141
|
x86_64-darwin-20
|
|
@@ -118,8 +146,11 @@ PLATFORMS
|
|
|
118
146
|
DEPENDENCIES
|
|
119
147
|
bundler (~> 2.5, >= 2.5.3)
|
|
120
148
|
colorize (>= 0.8.1, < 2.0)
|
|
149
|
+
fiddle (>= 1.1)
|
|
150
|
+
irb (>= 1.0)
|
|
121
151
|
pry-byebug (>= 3.9, < 4.0)
|
|
122
152
|
rake (>= 13.0, < 14.0)
|
|
153
|
+
reline (>= 0.3)
|
|
123
154
|
rspec (>= 3.10, < 4.0)
|
|
124
155
|
rubocop (>= 1.62, < 2.0)
|
|
125
156
|
rubocop-performance (>= 1.20, < 2.0)
|