g2_command 2.3.0 → 3.1.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.
@@ -0,0 +1,225 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ g2_command (3.1.0)
5
+ activemodel (>= 5.0, < 7.1)
6
+ activesupport (>= 5.0, < 7.1)
7
+ dry-initializer (~> 3.0)
8
+ dry-monads (~> 1.3)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actioncable (6.1.4.4)
14
+ actionpack (= 6.1.4.4)
15
+ activesupport (= 6.1.4.4)
16
+ nio4r (~> 2.0)
17
+ websocket-driver (>= 0.6.1)
18
+ actionmailbox (6.1.4.4)
19
+ actionpack (= 6.1.4.4)
20
+ activejob (= 6.1.4.4)
21
+ activerecord (= 6.1.4.4)
22
+ activestorage (= 6.1.4.4)
23
+ activesupport (= 6.1.4.4)
24
+ mail (>= 2.7.1)
25
+ actionmailer (6.1.4.4)
26
+ actionpack (= 6.1.4.4)
27
+ actionview (= 6.1.4.4)
28
+ activejob (= 6.1.4.4)
29
+ activesupport (= 6.1.4.4)
30
+ mail (~> 2.5, >= 2.5.4)
31
+ rails-dom-testing (~> 2.0)
32
+ actionpack (6.1.4.4)
33
+ actionview (= 6.1.4.4)
34
+ activesupport (= 6.1.4.4)
35
+ rack (~> 2.0, >= 2.0.9)
36
+ rack-test (>= 0.6.3)
37
+ rails-dom-testing (~> 2.0)
38
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
39
+ actiontext (6.1.4.4)
40
+ actionpack (= 6.1.4.4)
41
+ activerecord (= 6.1.4.4)
42
+ activestorage (= 6.1.4.4)
43
+ activesupport (= 6.1.4.4)
44
+ nokogiri (>= 1.8.5)
45
+ actionview (6.1.4.4)
46
+ activesupport (= 6.1.4.4)
47
+ builder (~> 3.1)
48
+ erubi (~> 1.4)
49
+ rails-dom-testing (~> 2.0)
50
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
51
+ activejob (6.1.4.4)
52
+ activesupport (= 6.1.4.4)
53
+ globalid (>= 0.3.6)
54
+ activemodel (6.1.4.4)
55
+ activesupport (= 6.1.4.4)
56
+ activerecord (6.1.4.4)
57
+ activemodel (= 6.1.4.4)
58
+ activesupport (= 6.1.4.4)
59
+ activestorage (6.1.4.4)
60
+ actionpack (= 6.1.4.4)
61
+ activejob (= 6.1.4.4)
62
+ activerecord (= 6.1.4.4)
63
+ activesupport (= 6.1.4.4)
64
+ marcel (~> 1.0.0)
65
+ mini_mime (>= 1.1.0)
66
+ activesupport (6.1.4.4)
67
+ concurrent-ruby (~> 1.0, >= 1.0.2)
68
+ i18n (>= 1.6, < 2)
69
+ minitest (>= 5.1)
70
+ tzinfo (~> 2.0)
71
+ zeitwerk (~> 2.3)
72
+ appraisal (2.3.0)
73
+ bundler
74
+ rake
75
+ thor (>= 0.14.0)
76
+ ast (2.4.2)
77
+ builder (3.2.4)
78
+ coderay (1.1.3)
79
+ concurrent-ruby (1.1.9)
80
+ crass (1.0.6)
81
+ diff-lcs (1.4.4)
82
+ docile (1.3.5)
83
+ dry-core (0.7.1)
84
+ concurrent-ruby (~> 1.0)
85
+ dry-initializer (3.0.4)
86
+ dry-monads (1.4.0)
87
+ concurrent-ruby (~> 1.0)
88
+ dry-core (~> 0.7)
89
+ erubi (1.10.0)
90
+ fivemat (1.3.7)
91
+ globalid (1.0.0)
92
+ activesupport (>= 5.0)
93
+ i18n (1.8.11)
94
+ concurrent-ruby (~> 1.0)
95
+ json (2.5.1)
96
+ loofah (2.13.0)
97
+ crass (~> 1.0.2)
98
+ nokogiri (>= 1.5.9)
99
+ mail (2.7.1)
100
+ mini_mime (>= 0.1.1)
101
+ marcel (1.0.2)
102
+ method_source (1.0.0)
103
+ mini_mime (1.1.2)
104
+ mini_portile2 (2.6.1)
105
+ minitest (5.15.0)
106
+ nio4r (2.5.8)
107
+ nokogiri (1.12.5)
108
+ mini_portile2 (~> 2.6.1)
109
+ racc (~> 1.4)
110
+ parallel (1.20.1)
111
+ parser (3.0.0.0)
112
+ ast (~> 2.4.1)
113
+ pry (0.13.1)
114
+ coderay (~> 1.1)
115
+ method_source (~> 1.0)
116
+ racc (1.6.0)
117
+ rack (2.2.3)
118
+ rack-test (1.1.0)
119
+ rack (>= 1.0, < 3)
120
+ rails (6.1.4.4)
121
+ actioncable (= 6.1.4.4)
122
+ actionmailbox (= 6.1.4.4)
123
+ actionmailer (= 6.1.4.4)
124
+ actionpack (= 6.1.4.4)
125
+ actiontext (= 6.1.4.4)
126
+ actionview (= 6.1.4.4)
127
+ activejob (= 6.1.4.4)
128
+ activemodel (= 6.1.4.4)
129
+ activerecord (= 6.1.4.4)
130
+ activestorage (= 6.1.4.4)
131
+ activesupport (= 6.1.4.4)
132
+ bundler (>= 1.15.0)
133
+ railties (= 6.1.4.4)
134
+ sprockets-rails (>= 2.0.0)
135
+ rails-dom-testing (2.0.3)
136
+ activesupport (>= 4.2.0)
137
+ nokogiri (>= 1.6)
138
+ rails-html-sanitizer (1.4.2)
139
+ loofah (~> 2.3)
140
+ railties (6.1.4.4)
141
+ actionpack (= 6.1.4.4)
142
+ activesupport (= 6.1.4.4)
143
+ method_source
144
+ rake (>= 0.13)
145
+ thor (~> 1.0)
146
+ rainbow (3.0.0)
147
+ rake (12.3.3)
148
+ regexp_parser (2.0.3)
149
+ rexml (3.2.5)
150
+ rspec (3.10.0)
151
+ rspec-core (~> 3.10.0)
152
+ rspec-expectations (~> 3.10.0)
153
+ rspec-mocks (~> 3.10.0)
154
+ rspec-core (3.10.1)
155
+ rspec-support (~> 3.10.0)
156
+ rspec-expectations (3.10.1)
157
+ diff-lcs (>= 1.2.0, < 2.0)
158
+ rspec-support (~> 3.10.0)
159
+ rspec-mocks (3.10.2)
160
+ diff-lcs (>= 1.2.0, < 2.0)
161
+ rspec-support (~> 3.10.0)
162
+ rspec-support (3.10.2)
163
+ rspec_junit_formatter (0.4.1)
164
+ rspec-core (>= 2, < 4, != 2.12.0)
165
+ rubocop (1.10.0)
166
+ parallel (~> 1.10)
167
+ parser (>= 3.0.0.0)
168
+ rainbow (>= 2.2.2, < 4.0)
169
+ regexp_parser (>= 1.8, < 3.0)
170
+ rexml
171
+ rubocop-ast (>= 1.2.0, < 2.0)
172
+ ruby-progressbar (~> 1.7)
173
+ unicode-display_width (>= 1.4.0, < 3.0)
174
+ rubocop-ast (1.4.1)
175
+ parser (>= 2.7.1.5)
176
+ rubocop-g2 (1.3.0)
177
+ rubocop (>= 0.82)
178
+ rubocop-rails (>= 2.5)
179
+ rubocop-rspec (>= 1.39)
180
+ rubocop-rails (2.9.1)
181
+ activesupport (>= 4.2.0)
182
+ rack (>= 1.1)
183
+ rubocop (>= 0.90.0, < 2.0)
184
+ rubocop-rspec (2.1.0)
185
+ rubocop (~> 1.0)
186
+ rubocop-ast (>= 1.1.0)
187
+ ruby-progressbar (1.11.0)
188
+ simplecov (0.16.1)
189
+ docile (~> 1.1)
190
+ json (>= 1.8, < 3)
191
+ simplecov-html (~> 0.10.0)
192
+ simplecov-html (0.10.2)
193
+ sprockets (4.0.2)
194
+ concurrent-ruby (~> 1.0)
195
+ rack (> 1, < 3)
196
+ sprockets-rails (3.4.2)
197
+ actionpack (>= 5.2)
198
+ activesupport (>= 5.2)
199
+ sprockets (>= 3.0.0)
200
+ thor (1.1.0)
201
+ tzinfo (2.0.4)
202
+ concurrent-ruby (~> 1.0)
203
+ unicode-display_width (2.0.0)
204
+ websocket-driver (0.7.5)
205
+ websocket-extensions (>= 0.1.0)
206
+ websocket-extensions (0.1.5)
207
+ zeitwerk (2.5.1)
208
+
209
+ PLATFORMS
210
+ ruby
211
+
212
+ DEPENDENCIES
213
+ appraisal
214
+ fivemat
215
+ g2_command!
216
+ pry
217
+ rails (~> 6.1.0)
218
+ rake (~> 12.0)
219
+ rspec (~> 3.0)
220
+ rspec_junit_formatter
221
+ rubocop-g2
222
+ simplecov (= 0.16.1)
223
+
224
+ BUNDLED WITH
225
+ 2.2.32
@@ -5,12 +5,11 @@ source "https://rubygems.org"
5
5
  gem "appraisal"
6
6
  gem "fivemat"
7
7
  gem "pry"
8
- gem "rails", "5.2.4"
8
+ gem "rails", "~> 7.0.0"
9
9
  gem "rake", "~> 12.0"
10
10
  gem "rspec", "~> 3.0"
11
11
  gem "rspec_junit_formatter"
12
12
  gem "rubocop-g2"
13
13
  gem "simplecov", "0.16.1"
14
- gem "sprockets", "~> 3"
15
14
 
16
15
  gemspec path: "../"
@@ -0,0 +1,215 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ g2_command (3.1.0)
5
+ activemodel (>= 5.0, < 7.1)
6
+ activesupport (>= 5.0, < 7.1)
7
+ dry-initializer (~> 3.0)
8
+ dry-monads (~> 1.3)
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ actioncable (7.0.0)
14
+ actionpack (= 7.0.0)
15
+ activesupport (= 7.0.0)
16
+ nio4r (~> 2.0)
17
+ websocket-driver (>= 0.6.1)
18
+ actionmailbox (7.0.0)
19
+ actionpack (= 7.0.0)
20
+ activejob (= 7.0.0)
21
+ activerecord (= 7.0.0)
22
+ activestorage (= 7.0.0)
23
+ activesupport (= 7.0.0)
24
+ mail (>= 2.7.1)
25
+ actionmailer (7.0.0)
26
+ actionpack (= 7.0.0)
27
+ actionview (= 7.0.0)
28
+ activejob (= 7.0.0)
29
+ activesupport (= 7.0.0)
30
+ mail (~> 2.5, >= 2.5.4)
31
+ rails-dom-testing (~> 2.0)
32
+ actionpack (7.0.0)
33
+ actionview (= 7.0.0)
34
+ activesupport (= 7.0.0)
35
+ rack (~> 2.0, >= 2.2.0)
36
+ rack-test (>= 0.6.3)
37
+ rails-dom-testing (~> 2.0)
38
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
39
+ actiontext (7.0.0)
40
+ actionpack (= 7.0.0)
41
+ activerecord (= 7.0.0)
42
+ activestorage (= 7.0.0)
43
+ activesupport (= 7.0.0)
44
+ globalid (>= 0.6.0)
45
+ nokogiri (>= 1.8.5)
46
+ actionview (7.0.0)
47
+ activesupport (= 7.0.0)
48
+ builder (~> 3.1)
49
+ erubi (~> 1.4)
50
+ rails-dom-testing (~> 2.0)
51
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
52
+ activejob (7.0.0)
53
+ activesupport (= 7.0.0)
54
+ globalid (>= 0.3.6)
55
+ activemodel (7.0.0)
56
+ activesupport (= 7.0.0)
57
+ activerecord (7.0.0)
58
+ activemodel (= 7.0.0)
59
+ activesupport (= 7.0.0)
60
+ activestorage (7.0.0)
61
+ actionpack (= 7.0.0)
62
+ activejob (= 7.0.0)
63
+ activerecord (= 7.0.0)
64
+ activesupport (= 7.0.0)
65
+ marcel (~> 1.0)
66
+ mini_mime (>= 1.1.0)
67
+ activesupport (7.0.0)
68
+ concurrent-ruby (~> 1.0, >= 1.0.2)
69
+ i18n (>= 1.6, < 2)
70
+ minitest (>= 5.1)
71
+ tzinfo (~> 2.0)
72
+ appraisal (2.4.1)
73
+ bundler
74
+ rake
75
+ thor (>= 0.14.0)
76
+ ast (2.4.2)
77
+ builder (3.2.4)
78
+ coderay (1.1.3)
79
+ concurrent-ruby (1.1.9)
80
+ crass (1.0.6)
81
+ diff-lcs (1.4.4)
82
+ docile (1.4.0)
83
+ dry-core (0.7.1)
84
+ concurrent-ruby (~> 1.0)
85
+ dry-initializer (3.0.4)
86
+ dry-monads (1.4.0)
87
+ concurrent-ruby (~> 1.0)
88
+ dry-core (~> 0.7)
89
+ erubi (1.10.0)
90
+ fivemat (1.3.7)
91
+ globalid (1.0.0)
92
+ activesupport (>= 5.0)
93
+ i18n (1.8.11)
94
+ concurrent-ruby (~> 1.0)
95
+ json (2.5.1)
96
+ loofah (2.13.0)
97
+ crass (~> 1.0.2)
98
+ nokogiri (>= 1.5.9)
99
+ mail (2.7.1)
100
+ mini_mime (>= 0.1.1)
101
+ marcel (1.0.2)
102
+ method_source (1.0.0)
103
+ mini_mime (1.1.2)
104
+ minitest (5.15.0)
105
+ nio4r (2.5.8)
106
+ nokogiri (1.12.5-x86_64-darwin)
107
+ racc (~> 1.4)
108
+ parallel (1.21.0)
109
+ parser (3.0.3.2)
110
+ ast (~> 2.4.1)
111
+ pry (0.14.1)
112
+ coderay (~> 1.1)
113
+ method_source (~> 1.0)
114
+ racc (1.6.0)
115
+ rack (2.2.3)
116
+ rack-test (1.1.0)
117
+ rack (>= 1.0, < 3)
118
+ rails (7.0.0)
119
+ actioncable (= 7.0.0)
120
+ actionmailbox (= 7.0.0)
121
+ actionmailer (= 7.0.0)
122
+ actionpack (= 7.0.0)
123
+ actiontext (= 7.0.0)
124
+ actionview (= 7.0.0)
125
+ activejob (= 7.0.0)
126
+ activemodel (= 7.0.0)
127
+ activerecord (= 7.0.0)
128
+ activestorage (= 7.0.0)
129
+ activesupport (= 7.0.0)
130
+ bundler (>= 1.15.0)
131
+ railties (= 7.0.0)
132
+ rails-dom-testing (2.0.3)
133
+ activesupport (>= 4.2.0)
134
+ nokogiri (>= 1.6)
135
+ rails-html-sanitizer (1.4.2)
136
+ loofah (~> 2.3)
137
+ railties (7.0.0)
138
+ actionpack (= 7.0.0)
139
+ activesupport (= 7.0.0)
140
+ method_source
141
+ rake (>= 12.2)
142
+ thor (~> 1.0)
143
+ zeitwerk (~> 2.5)
144
+ rainbow (3.0.0)
145
+ rake (12.3.3)
146
+ regexp_parser (2.2.0)
147
+ rexml (3.2.5)
148
+ rspec (3.10.0)
149
+ rspec-core (~> 3.10.0)
150
+ rspec-expectations (~> 3.10.0)
151
+ rspec-mocks (~> 3.10.0)
152
+ rspec-core (3.10.1)
153
+ rspec-support (~> 3.10.0)
154
+ rspec-expectations (3.10.1)
155
+ diff-lcs (>= 1.2.0, < 2.0)
156
+ rspec-support (~> 3.10.0)
157
+ rspec-mocks (3.10.2)
158
+ diff-lcs (>= 1.2.0, < 2.0)
159
+ rspec-support (~> 3.10.0)
160
+ rspec-support (3.10.3)
161
+ rspec_junit_formatter (0.4.1)
162
+ rspec-core (>= 2, < 4, != 2.12.0)
163
+ rubocop (1.23.0)
164
+ parallel (~> 1.10)
165
+ parser (>= 3.0.0.0)
166
+ rainbow (>= 2.2.2, < 4.0)
167
+ regexp_parser (>= 1.8, < 3.0)
168
+ rexml
169
+ rubocop-ast (>= 1.12.0, < 2.0)
170
+ ruby-progressbar (~> 1.7)
171
+ unicode-display_width (>= 1.4.0, < 3.0)
172
+ rubocop-ast (1.15.0)
173
+ parser (>= 3.0.1.1)
174
+ rubocop-g2 (1.5.1)
175
+ rubocop (>= 0.82)
176
+ rubocop-rails (>= 2.5)
177
+ rubocop-rspec (>= 1.39)
178
+ rubocop-rails (2.12.4)
179
+ activesupport (>= 4.2.0)
180
+ rack (>= 1.1)
181
+ rubocop (>= 1.7.0, < 2.0)
182
+ rubocop-rspec (2.6.0)
183
+ rubocop (~> 1.19)
184
+ ruby-progressbar (1.11.0)
185
+ simplecov (0.16.1)
186
+ docile (~> 1.1)
187
+ json (>= 1.8, < 3)
188
+ simplecov-html (~> 0.10.0)
189
+ simplecov-html (0.10.2)
190
+ thor (1.1.0)
191
+ tzinfo (2.0.4)
192
+ concurrent-ruby (~> 1.0)
193
+ unicode-display_width (2.1.0)
194
+ websocket-driver (0.7.5)
195
+ websocket-extensions (>= 0.1.0)
196
+ websocket-extensions (0.1.5)
197
+ zeitwerk (2.5.1)
198
+
199
+ PLATFORMS
200
+ x86_64-darwin-20
201
+
202
+ DEPENDENCIES
203
+ appraisal
204
+ fivemat
205
+ g2_command!
206
+ pry
207
+ rails (~> 7.0.0)
208
+ rake (~> 12.0)
209
+ rspec (~> 3.0)
210
+ rspec_junit_formatter
211
+ rubocop-g2
212
+ simplecov (= 0.16.1)
213
+
214
+ BUNDLED WITH
215
+ 2.2.32
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/hash'
4
-
5
3
  module Command
6
4
  module InputMiddleware
7
5
  class Symbolizer
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Command
4
- VERSION = '2.3.0'
4
+ VERSION = '3.1.0'
5
5
  end
data/lib/command.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/core_ext/string'
3
+ require 'active_support/all'
4
4
  require 'active_model'
5
5
  require 'dry-initializer'
6
6
  require 'dry-monads'
@@ -18,6 +18,8 @@ module Command
18
18
  include Dry::Monads[:result]
19
19
  include ActiveModel::Validations
20
20
 
21
+ private_class_method :new
22
+
21
23
  def initialize(inputs = {})
22
24
  super(**Command::InputMiddleware.call(inputs))
23
25
  end
@@ -53,7 +55,7 @@ module Command
53
55
 
54
56
  class_methods do
55
57
  def run(inputs = {})
56
- new(inputs).run
58
+ new(**Command::InputMiddleware.call(inputs)).run
57
59
  end
58
60
 
59
61
  def run!(inputs = {})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: g2_command
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hamed Asghari
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-28 00:00:00.000000000 Z
11
+ date: 2021-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '5.0'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7'
22
+ version: '7.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '5.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7'
32
+ version: '7.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: activesupport
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  version: '5.0'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '7'
42
+ version: '7.1'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -49,7 +49,7 @@ dependencies:
49
49
  version: '5.0'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '7'
52
+ version: '7.1'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: dry-initializer
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -91,7 +91,6 @@ files:
91
91
  - ".gitignore"
92
92
  - ".rspec"
93
93
  - ".rubocop.yml"
94
- - ".ruby-version"
95
94
  - ".tool-versions"
96
95
  - Appraisals
97
96
  - CODE_OF_CONDUCT.md
@@ -104,12 +103,12 @@ files:
104
103
  - bin/setup
105
104
  - g2_command.gemspec
106
105
  - gemfiles/.bundle/config
107
- - gemfiles/rails_5.1.gemfile
108
- - gemfiles/rails_5.1.gemfile.lock
109
- - gemfiles/rails_5.2.gemfile
110
- - gemfiles/rails_5.2.gemfile.lock
111
106
  - gemfiles/rails_6.0.gemfile
112
107
  - gemfiles/rails_6.0.gemfile.lock
108
+ - gemfiles/rails_6.1.gemfile
109
+ - gemfiles/rails_6.1.gemfile.lock
110
+ - gemfiles/rails_7.0.gemfile
111
+ - gemfiles/rails_7.0.gemfile.lock
113
112
  - lib/command.rb
114
113
  - lib/command/failure.rb
115
114
  - lib/command/input_middleware.rb
@@ -140,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
139
  - !ruby/object:Gem::Version
141
140
  version: '0'
142
141
  requirements: []
143
- rubygems_version: 3.1.4
142
+ rubygems_version: 3.2.32
144
143
  signing_key:
145
144
  specification_version: 4
146
145
  summary: An implementation of the command pattern using dry-rb
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.7.2