g2_command 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69fcd9970024b1ca3dec58e99712786fcef0de463f434d6fd75f624ab83b688f
4
- data.tar.gz: 6c06eace0bdc054f9c6a1c77bf1b3d2eb7f4650e880777ce1e0b430054125266
3
+ metadata.gz: 2f755a4e98e7f55bf7f8c22fe555c535af406c8c3875fedc86fd8d5f6e7af336
4
+ data.tar.gz: a8143c988052583c9ecbb5e59cf3b20190657c58687947779f770c75833c6c08
5
5
  SHA512:
6
- metadata.gz: eb9264c4b7345310dde251893db754df066c32c18425dafdd5d64acca78e276af4494b24cf6a52fc12b19e4a119a820548fb04730f91a7417ca832818fbd8315
7
- data.tar.gz: d0c5a39b55314b0db5379353ca88d20210a6fb907bf330d919399308516b14cccc523f0b0ef8ae0a991cc4b5229003cea53d56ba1fc6825e3fb2f48d130881e2
6
+ metadata.gz: 5563fca17f8952a6a88af5508964e0f899e1df2c583032e781f2472609a6fa14683589815532ca3f93cb1b233457dfacedbb519e1674b860dd2047096665aaae
7
+ data.tar.gz: 961832db2ed4b0cf607f3c8199baef7b34395d2acbd4e1d2c7a59837aca309d20732b69f5c642940ab9fb7e4128ef6f7d8e3bdfe19dd8eae4097b56b1f631ff1
data/.circleci/config.yml CHANGED
@@ -11,16 +11,12 @@ workflows:
11
11
  context: g2crowd-global
12
12
  matrix:
13
13
  parameters:
14
- ruby: ['2.7.5', '3.0.3']
14
+ ruby: ['2.7.5', '3.0.3', '3.1.0']
15
15
  appraisal:
16
- - rails_6.0
17
16
  - rails_6.1
18
17
  - rails_7.0
19
- exclude:
20
- - ruby: '3.0.3'
21
- appraisal: rails_6.0
22
18
  - ruby/build:
23
19
  context: g2crowd-global
24
- ruby: '3.0.3'
20
+ ruby: '3.1.0'
25
21
  setup-database: false
26
- bundler-version: '2.2.32'
22
+ bundler-version: '2.3.6'
@@ -1,17 +1,20 @@
1
1
  name: Linters
2
2
 
3
- on:
4
- push:
5
- branches-ignore:
6
- - main
3
+ on: [pull_request]
7
4
 
8
5
  jobs:
9
6
  build:
10
7
  runs-on: ubuntu-latest
11
8
  steps:
12
- - uses: actions/checkout@v1
9
+ - uses: actions/checkout@v2
13
10
 
14
- - name: Rubocop Linter
15
- uses: g2crowd/rubocop-linter-action@v3.4.0
16
- env:
17
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11
+ - name: Set up Ruby
12
+ uses: ruby/setup-ruby@v1
13
+
14
+ - name: RuboCop Linter
15
+ uses: reviewdog/action-rubocop@v2.1.0
16
+ with:
17
+ rubocop_version: gemfile
18
+ rubocop_extensions: rubocop-rails:gemfile rubocop-rspec:gemfile rubocop-g2:gemfile
19
+ rubocop_flags: '--parallel --force-exclusion'
20
+ github_token: ${{ secrets.GITHUB_TOKEN }}
data/.rubocop.yml CHANGED
@@ -8,7 +8,7 @@ require:
8
8
 
9
9
  AllCops:
10
10
  NewCops: enable
11
- TargetRubyVersion: 2.4
11
+ TargetRubyVersion: 2.7
12
12
  Exclude:
13
13
  - gemfiles/*
14
14
 
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 3.0.3
1
+ ruby 3.1.0
data/Appraisals CHANGED
@@ -1,7 +1,3 @@
1
- appraise 'rails_6.0' do
2
- gem 'rails', '~> 6.0.3'
3
- end
4
-
5
1
  appraise 'rails_6.1' do
6
2
  gem 'rails', '~> 6.1.0'
7
3
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- g2_command (3.1.0)
4
+ g2_command (3.2.0)
5
5
  activemodel (>= 5.0, < 7.1)
6
6
  activesupport (>= 5.0, < 7.1)
7
7
  dry-initializer (~> 3.0)
@@ -10,61 +10,67 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (7.0.0)
14
- actionpack (= 7.0.0)
15
- activesupport (= 7.0.0)
13
+ actioncable (7.0.1)
14
+ actionpack (= 7.0.1)
15
+ activesupport (= 7.0.1)
16
16
  nio4r (~> 2.0)
17
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)
18
+ actionmailbox (7.0.1)
19
+ actionpack (= 7.0.1)
20
+ activejob (= 7.0.1)
21
+ activerecord (= 7.0.1)
22
+ activestorage (= 7.0.1)
23
+ activesupport (= 7.0.1)
24
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)
25
+ net-imap
26
+ net-pop
27
+ net-smtp
28
+ actionmailer (7.0.1)
29
+ actionpack (= 7.0.1)
30
+ actionview (= 7.0.1)
31
+ activejob (= 7.0.1)
32
+ activesupport (= 7.0.1)
30
33
  mail (~> 2.5, >= 2.5.4)
34
+ net-imap
35
+ net-pop
36
+ net-smtp
31
37
  rails-dom-testing (~> 2.0)
32
- actionpack (7.0.0)
33
- actionview (= 7.0.0)
34
- activesupport (= 7.0.0)
38
+ actionpack (7.0.1)
39
+ actionview (= 7.0.1)
40
+ activesupport (= 7.0.1)
35
41
  rack (~> 2.0, >= 2.2.0)
36
42
  rack-test (>= 0.6.3)
37
43
  rails-dom-testing (~> 2.0)
38
44
  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)
45
+ actiontext (7.0.1)
46
+ actionpack (= 7.0.1)
47
+ activerecord (= 7.0.1)
48
+ activestorage (= 7.0.1)
49
+ activesupport (= 7.0.1)
44
50
  globalid (>= 0.6.0)
45
51
  nokogiri (>= 1.8.5)
46
- actionview (7.0.0)
47
- activesupport (= 7.0.0)
52
+ actionview (7.0.1)
53
+ activesupport (= 7.0.1)
48
54
  builder (~> 3.1)
49
55
  erubi (~> 1.4)
50
56
  rails-dom-testing (~> 2.0)
51
57
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
52
- activejob (7.0.0)
53
- activesupport (= 7.0.0)
58
+ activejob (7.0.1)
59
+ activesupport (= 7.0.1)
54
60
  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)
61
+ activemodel (7.0.1)
62
+ activesupport (= 7.0.1)
63
+ activerecord (7.0.1)
64
+ activemodel (= 7.0.1)
65
+ activesupport (= 7.0.1)
66
+ activestorage (7.0.1)
67
+ actionpack (= 7.0.1)
68
+ activejob (= 7.0.1)
69
+ activerecord (= 7.0.1)
70
+ activesupport (= 7.0.1)
65
71
  marcel (~> 1.0)
66
72
  mini_mime (>= 1.1.0)
67
- activesupport (7.0.0)
73
+ activesupport (7.0.1)
68
74
  concurrent-ruby (~> 1.0, >= 1.0.2)
69
75
  i18n (>= 1.6, < 2)
70
76
  minitest (>= 5.1)
@@ -79,6 +85,7 @@ GEM
79
85
  concurrent-ruby (1.1.9)
80
86
  crass (1.0.6)
81
87
  diff-lcs (1.4.4)
88
+ digest (3.1.0)
82
89
  docile (1.3.2)
83
90
  dry-core (0.7.1)
84
91
  concurrent-ruby (~> 1.0)
@@ -90,8 +97,9 @@ GEM
90
97
  fivemat (1.3.7)
91
98
  globalid (1.0.0)
92
99
  activesupport (>= 5.0)
93
- i18n (1.8.11)
100
+ i18n (1.9.1)
94
101
  concurrent-ruby (~> 1.0)
102
+ io-wait (0.2.1)
95
103
  json (2.3.0)
96
104
  loofah (2.13.0)
97
105
  crass (~> 1.0.2)
@@ -101,11 +109,26 @@ GEM
101
109
  marcel (1.0.2)
102
110
  method_source (0.9.2)
103
111
  mini_mime (1.1.2)
104
- mini_portile2 (2.6.1)
112
+ mini_portile2 (2.7.1)
105
113
  minitest (5.15.0)
114
+ net-imap (0.2.3)
115
+ digest
116
+ net-protocol
117
+ strscan
118
+ net-pop (0.1.1)
119
+ digest
120
+ net-protocol
121
+ timeout
122
+ net-protocol (0.1.2)
123
+ io-wait
124
+ timeout
125
+ net-smtp (0.3.1)
126
+ digest
127
+ net-protocol
128
+ timeout
106
129
  nio4r (2.5.8)
107
- nokogiri (1.12.5)
108
- mini_portile2 (~> 2.6.1)
130
+ nokogiri (1.13.1)
131
+ mini_portile2 (~> 2.7.0)
109
132
  racc (~> 1.4)
110
133
  parallel (1.19.2)
111
134
  parser (2.7.2.0)
@@ -117,28 +140,28 @@ GEM
117
140
  rack (2.2.3)
118
141
  rack-test (1.1.0)
119
142
  rack (>= 1.0, < 3)
120
- rails (7.0.0)
121
- actioncable (= 7.0.0)
122
- actionmailbox (= 7.0.0)
123
- actionmailer (= 7.0.0)
124
- actionpack (= 7.0.0)
125
- actiontext (= 7.0.0)
126
- actionview (= 7.0.0)
127
- activejob (= 7.0.0)
128
- activemodel (= 7.0.0)
129
- activerecord (= 7.0.0)
130
- activestorage (= 7.0.0)
131
- activesupport (= 7.0.0)
143
+ rails (7.0.1)
144
+ actioncable (= 7.0.1)
145
+ actionmailbox (= 7.0.1)
146
+ actionmailer (= 7.0.1)
147
+ actionpack (= 7.0.1)
148
+ actiontext (= 7.0.1)
149
+ actionview (= 7.0.1)
150
+ activejob (= 7.0.1)
151
+ activemodel (= 7.0.1)
152
+ activerecord (= 7.0.1)
153
+ activestorage (= 7.0.1)
154
+ activesupport (= 7.0.1)
132
155
  bundler (>= 1.15.0)
133
- railties (= 7.0.0)
156
+ railties (= 7.0.1)
134
157
  rails-dom-testing (2.0.3)
135
158
  activesupport (>= 4.2.0)
136
159
  nokogiri (>= 1.6)
137
160
  rails-html-sanitizer (1.4.2)
138
161
  loofah (~> 2.3)
139
- railties (7.0.0)
140
- actionpack (= 7.0.0)
141
- activesupport (= 7.0.0)
162
+ railties (7.0.1)
163
+ actionpack (= 7.0.1)
164
+ activesupport (= 7.0.1)
142
165
  method_source
143
166
  rake (>= 12.2)
144
167
  thor (~> 1.0)
@@ -190,14 +213,16 @@ GEM
190
213
  json (>= 1.8, < 3)
191
214
  simplecov-html (~> 0.10.0)
192
215
  simplecov-html (0.10.2)
193
- thor (1.1.0)
216
+ strscan (3.0.1)
217
+ thor (1.2.1)
218
+ timeout (0.2.0)
194
219
  tzinfo (2.0.4)
195
220
  concurrent-ruby (~> 1.0)
196
221
  unicode-display_width (1.7.0)
197
222
  websocket-driver (0.7.5)
198
223
  websocket-extensions (>= 0.1.0)
199
224
  websocket-extensions (0.1.5)
200
- zeitwerk (2.5.1)
225
+ zeitwerk (2.5.4)
201
226
 
202
227
  PLATFORMS
203
228
  ruby
@@ -215,4 +240,4 @@ DEPENDENCIES
215
240
  simplecov (= 0.16.1)
216
241
 
217
242
  BUNDLED WITH
218
- 2.2.32
243
+ 2.3.6
data/README.md CHANGED
@@ -22,6 +22,30 @@ Or install it yourself as:
22
22
 
23
23
  TODO: Write usage instructions here
24
24
 
25
+ ## RSpec Helper
26
+
27
+ In `spec_helper.rb`:
28
+
29
+ ```ruby
30
+ require 'command/test_helper'
31
+
32
+ RSpec.configure do |config|
33
+ config.include Command::TestHelper
34
+ end
35
+ ```
36
+
37
+ Create a Success outcome object:
38
+
39
+ ```ruby
40
+ let(:outcome) { create_outcome(value: 'Return value') }
41
+ ```
42
+
43
+ Create a Failure outcome object:
44
+
45
+ ```ruby
46
+ let(:outcome) { create_outcome(errors: { user: 'is invalid' }) }
47
+ ```
48
+
25
49
  ## Development
26
50
 
27
51
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/g2_command.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = 'An implementation of the command pattern using dry-rb'
12
12
  spec.homepage = 'https://github.com/g2crowd/g2_command'
13
13
  spec.license = 'MIT'
14
- spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
14
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
15
15
 
16
16
  spec.metadata['homepage_uri'] = spec.homepage
17
17
  spec.metadata['source_code_uri'] = 'https://github.com/g2crowd/g2_command'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- g2_command (3.1.0)
4
+ g2_command (3.2.0)
5
5
  activemodel (>= 5.0, < 7.1)
6
6
  activesupport (>= 5.0, < 7.1)
7
7
  dry-initializer (~> 3.0)
@@ -90,7 +90,7 @@ GEM
90
90
  fivemat (1.3.7)
91
91
  globalid (1.0.0)
92
92
  activesupport (>= 5.0)
93
- i18n (1.8.11)
93
+ i18n (1.9.1)
94
94
  concurrent-ruby (~> 1.0)
95
95
  json (2.5.1)
96
96
  loofah (2.13.0)
@@ -101,11 +101,11 @@ GEM
101
101
  marcel (1.0.2)
102
102
  method_source (1.0.0)
103
103
  mini_mime (1.1.2)
104
- mini_portile2 (2.6.1)
104
+ mini_portile2 (2.7.1)
105
105
  minitest (5.15.0)
106
106
  nio4r (2.5.8)
107
- nokogiri (1.12.5)
108
- mini_portile2 (~> 2.6.1)
107
+ nokogiri (1.13.1)
108
+ mini_portile2 (~> 2.7.0)
109
109
  racc (~> 1.4)
110
110
  parallel (1.20.1)
111
111
  parser (3.0.0.0)
@@ -197,14 +197,14 @@ GEM
197
197
  actionpack (>= 5.2)
198
198
  activesupport (>= 5.2)
199
199
  sprockets (>= 3.0.0)
200
- thor (1.1.0)
200
+ thor (1.2.1)
201
201
  tzinfo (2.0.4)
202
202
  concurrent-ruby (~> 1.0)
203
203
  unicode-display_width (2.0.0)
204
204
  websocket-driver (0.7.5)
205
205
  websocket-extensions (>= 0.1.0)
206
206
  websocket-extensions (0.1.5)
207
- zeitwerk (2.5.1)
207
+ zeitwerk (2.5.4)
208
208
 
209
209
  PLATFORMS
210
210
  ruby
@@ -222,4 +222,4 @@ DEPENDENCIES
222
222
  simplecov (= 0.16.1)
223
223
 
224
224
  BUNDLED WITH
225
- 2.2.32
225
+ 2.3.6
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- g2_command (3.1.0)
4
+ g2_command (3.2.0)
5
5
  activemodel (>= 5.0, < 7.1)
6
6
  activesupport (>= 5.0, < 7.1)
7
7
  dry-initializer (~> 3.0)
@@ -10,61 +10,67 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (7.0.0)
14
- actionpack (= 7.0.0)
15
- activesupport (= 7.0.0)
13
+ actioncable (7.0.1)
14
+ actionpack (= 7.0.1)
15
+ activesupport (= 7.0.1)
16
16
  nio4r (~> 2.0)
17
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)
18
+ actionmailbox (7.0.1)
19
+ actionpack (= 7.0.1)
20
+ activejob (= 7.0.1)
21
+ activerecord (= 7.0.1)
22
+ activestorage (= 7.0.1)
23
+ activesupport (= 7.0.1)
24
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)
25
+ net-imap
26
+ net-pop
27
+ net-smtp
28
+ actionmailer (7.0.1)
29
+ actionpack (= 7.0.1)
30
+ actionview (= 7.0.1)
31
+ activejob (= 7.0.1)
32
+ activesupport (= 7.0.1)
30
33
  mail (~> 2.5, >= 2.5.4)
34
+ net-imap
35
+ net-pop
36
+ net-smtp
31
37
  rails-dom-testing (~> 2.0)
32
- actionpack (7.0.0)
33
- actionview (= 7.0.0)
34
- activesupport (= 7.0.0)
38
+ actionpack (7.0.1)
39
+ actionview (= 7.0.1)
40
+ activesupport (= 7.0.1)
35
41
  rack (~> 2.0, >= 2.2.0)
36
42
  rack-test (>= 0.6.3)
37
43
  rails-dom-testing (~> 2.0)
38
44
  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)
45
+ actiontext (7.0.1)
46
+ actionpack (= 7.0.1)
47
+ activerecord (= 7.0.1)
48
+ activestorage (= 7.0.1)
49
+ activesupport (= 7.0.1)
44
50
  globalid (>= 0.6.0)
45
51
  nokogiri (>= 1.8.5)
46
- actionview (7.0.0)
47
- activesupport (= 7.0.0)
52
+ actionview (7.0.1)
53
+ activesupport (= 7.0.1)
48
54
  builder (~> 3.1)
49
55
  erubi (~> 1.4)
50
56
  rails-dom-testing (~> 2.0)
51
57
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
52
- activejob (7.0.0)
53
- activesupport (= 7.0.0)
58
+ activejob (7.0.1)
59
+ activesupport (= 7.0.1)
54
60
  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)
61
+ activemodel (7.0.1)
62
+ activesupport (= 7.0.1)
63
+ activerecord (7.0.1)
64
+ activemodel (= 7.0.1)
65
+ activesupport (= 7.0.1)
66
+ activestorage (7.0.1)
67
+ actionpack (= 7.0.1)
68
+ activejob (= 7.0.1)
69
+ activerecord (= 7.0.1)
70
+ activesupport (= 7.0.1)
65
71
  marcel (~> 1.0)
66
72
  mini_mime (>= 1.1.0)
67
- activesupport (7.0.0)
73
+ activesupport (7.0.1)
68
74
  concurrent-ruby (~> 1.0, >= 1.0.2)
69
75
  i18n (>= 1.6, < 2)
70
76
  minitest (>= 5.1)
@@ -79,6 +85,7 @@ GEM
79
85
  concurrent-ruby (1.1.9)
80
86
  crass (1.0.6)
81
87
  diff-lcs (1.4.4)
88
+ digest (3.1.0)
82
89
  docile (1.4.0)
83
90
  dry-core (0.7.1)
84
91
  concurrent-ruby (~> 1.0)
@@ -90,8 +97,9 @@ GEM
90
97
  fivemat (1.3.7)
91
98
  globalid (1.0.0)
92
99
  activesupport (>= 5.0)
93
- i18n (1.8.11)
100
+ i18n (1.9.1)
94
101
  concurrent-ruby (~> 1.0)
102
+ io-wait (0.2.1)
95
103
  json (2.5.1)
96
104
  loofah (2.13.0)
97
105
  crass (~> 1.0.2)
@@ -101,9 +109,26 @@ GEM
101
109
  marcel (1.0.2)
102
110
  method_source (1.0.0)
103
111
  mini_mime (1.1.2)
112
+ mini_portile2 (2.7.1)
104
113
  minitest (5.15.0)
114
+ net-imap (0.2.3)
115
+ digest
116
+ net-protocol
117
+ strscan
118
+ net-pop (0.1.1)
119
+ digest
120
+ net-protocol
121
+ timeout
122
+ net-protocol (0.1.2)
123
+ io-wait
124
+ timeout
125
+ net-smtp (0.3.1)
126
+ digest
127
+ net-protocol
128
+ timeout
105
129
  nio4r (2.5.8)
106
- nokogiri (1.12.5-x86_64-darwin)
130
+ nokogiri (1.13.1)
131
+ mini_portile2 (~> 2.7.0)
107
132
  racc (~> 1.4)
108
133
  parallel (1.21.0)
109
134
  parser (3.0.3.2)
@@ -115,28 +140,28 @@ GEM
115
140
  rack (2.2.3)
116
141
  rack-test (1.1.0)
117
142
  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)
143
+ rails (7.0.1)
144
+ actioncable (= 7.0.1)
145
+ actionmailbox (= 7.0.1)
146
+ actionmailer (= 7.0.1)
147
+ actionpack (= 7.0.1)
148
+ actiontext (= 7.0.1)
149
+ actionview (= 7.0.1)
150
+ activejob (= 7.0.1)
151
+ activemodel (= 7.0.1)
152
+ activerecord (= 7.0.1)
153
+ activestorage (= 7.0.1)
154
+ activesupport (= 7.0.1)
130
155
  bundler (>= 1.15.0)
131
- railties (= 7.0.0)
156
+ railties (= 7.0.1)
132
157
  rails-dom-testing (2.0.3)
133
158
  activesupport (>= 4.2.0)
134
159
  nokogiri (>= 1.6)
135
160
  rails-html-sanitizer (1.4.2)
136
161
  loofah (~> 2.3)
137
- railties (7.0.0)
138
- actionpack (= 7.0.0)
139
- activesupport (= 7.0.0)
162
+ railties (7.0.1)
163
+ actionpack (= 7.0.1)
164
+ activesupport (= 7.0.1)
140
165
  method_source
141
166
  rake (>= 12.2)
142
167
  thor (~> 1.0)
@@ -187,17 +212,19 @@ GEM
187
212
  json (>= 1.8, < 3)
188
213
  simplecov-html (~> 0.10.0)
189
214
  simplecov-html (0.10.2)
190
- thor (1.1.0)
215
+ strscan (3.0.1)
216
+ thor (1.2.1)
217
+ timeout (0.2.0)
191
218
  tzinfo (2.0.4)
192
219
  concurrent-ruby (~> 1.0)
193
220
  unicode-display_width (2.1.0)
194
221
  websocket-driver (0.7.5)
195
222
  websocket-extensions (>= 0.1.0)
196
223
  websocket-extensions (0.1.5)
197
- zeitwerk (2.5.1)
224
+ zeitwerk (2.5.4)
198
225
 
199
226
  PLATFORMS
200
- x86_64-darwin-20
227
+ ruby
201
228
 
202
229
  DEPENDENCIES
203
230
  appraisal
@@ -212,4 +239,4 @@ DEPENDENCIES
212
239
  simplecov (= 0.16.1)
213
240
 
214
241
  BUNDLED WITH
215
- 2.2.32
242
+ 2.3.6
@@ -0,0 +1,22 @@
1
+ module Command
2
+ module TestHelper
3
+ class ProxyCommand
4
+ include Command
5
+
6
+ option :error_list
7
+ option :return_value
8
+
9
+ def execute
10
+ error_list.each do |(key, value)|
11
+ errors.add(key.to_sym, value.to_s)
12
+ end
13
+
14
+ return_value
15
+ end
16
+ end
17
+
18
+ def create_outcome(errors: {}, value: nil)
19
+ ProxyCommand.run(error_list: errors, return_value: value)
20
+ end
21
+ end
22
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Command
4
- VERSION = '3.1.0'
4
+ VERSION = '3.2.0'
5
5
  end
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: 3.1.0
4
+ version: 3.2.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: 2021-12-20 00:00:00.000000000 Z
11
+ date: 2022-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -86,7 +86,6 @@ extensions: []
86
86
  extra_rdoc_files: []
87
87
  files:
88
88
  - ".circleci/config.yml"
89
- - ".github/config/rubocop_linter_action.yml"
90
89
  - ".github/workflows/linters.yml"
91
90
  - ".gitignore"
92
91
  - ".rspec"
@@ -103,8 +102,6 @@ files:
103
102
  - bin/setup
104
103
  - g2_command.gemspec
105
104
  - gemfiles/.bundle/config
106
- - gemfiles/rails_6.0.gemfile
107
- - gemfiles/rails_6.0.gemfile.lock
108
105
  - gemfiles/rails_6.1.gemfile
109
106
  - gemfiles/rails_6.1.gemfile.lock
110
107
  - gemfiles/rails_7.0.gemfile
@@ -115,6 +112,7 @@ files:
115
112
  - lib/command/input_middleware/rails_params.rb
116
113
  - lib/command/input_middleware/symbolizer.rb
117
114
  - lib/command/interrupt.rb
115
+ - lib/command/test_helper.rb
118
116
  - lib/command/version.rb
119
117
  - lib/g2_command.rb
120
118
  - lib/gem_ext/active_model/errors.rb
@@ -132,14 +130,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
130
  requirements:
133
131
  - - ">="
134
132
  - !ruby/object:Gem::Version
135
- version: 2.4.0
133
+ version: 2.7.0
136
134
  required_rubygems_version: !ruby/object:Gem::Requirement
137
135
  requirements:
138
136
  - - ">="
139
137
  - !ruby/object:Gem::Version
140
138
  version: '0'
141
139
  requirements: []
142
- rubygems_version: 3.2.32
140
+ rubygems_version: 3.3.3
143
141
  signing_key:
144
142
  specification_version: 4
145
143
  summary: An implementation of the command pattern using dry-rb
@@ -1,17 +0,0 @@
1
- check_name: 'RuboCop'
2
-
3
- # Instead of installing gems from rubygems, we can run `bundle install` on your project,
4
- # you would need to do this if you are using something like 'rubocop-github' or if you don't
5
- # want to list out dependencies with the `versions` key.
6
- # Valid options: true || false
7
- # Default: false
8
- bundle: true
9
-
10
- # The scope of code that Rubocop should lint. Use this if you only want to lint changed files. If this is not set
11
- # or not equal to 'modified', Rubocop is run against the entire codebase. Note that this will not work on the main branch.
12
- # Valid options: 'modified'
13
- # Default: nil
14
- check_scope: 'modified'
15
-
16
- rubocop_force_exclusion: true
17
- base_branch: "origin/main"
@@ -1,15 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal"
6
- gem "fivemat"
7
- gem "pry"
8
- gem "rails", "~> 6.0.3"
9
- gem "rake", "~> 12.0"
10
- gem "rspec", "~> 3.0"
11
- gem "rspec_junit_formatter"
12
- gem "rubocop-g2"
13
- gem "simplecov", "0.16.1"
14
-
15
- gemspec path: "../"
@@ -1,222 +0,0 @@
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.0.4.4)
14
- actionpack (= 6.0.4.4)
15
- nio4r (~> 2.0)
16
- websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.4.4)
18
- actionpack (= 6.0.4.4)
19
- activejob (= 6.0.4.4)
20
- activerecord (= 6.0.4.4)
21
- activestorage (= 6.0.4.4)
22
- activesupport (= 6.0.4.4)
23
- mail (>= 2.7.1)
24
- actionmailer (6.0.4.4)
25
- actionpack (= 6.0.4.4)
26
- actionview (= 6.0.4.4)
27
- activejob (= 6.0.4.4)
28
- mail (~> 2.5, >= 2.5.4)
29
- rails-dom-testing (~> 2.0)
30
- actionpack (6.0.4.4)
31
- actionview (= 6.0.4.4)
32
- activesupport (= 6.0.4.4)
33
- rack (~> 2.0, >= 2.0.8)
34
- rack-test (>= 0.6.3)
35
- rails-dom-testing (~> 2.0)
36
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.4.4)
38
- actionpack (= 6.0.4.4)
39
- activerecord (= 6.0.4.4)
40
- activestorage (= 6.0.4.4)
41
- activesupport (= 6.0.4.4)
42
- nokogiri (>= 1.8.5)
43
- actionview (6.0.4.4)
44
- activesupport (= 6.0.4.4)
45
- builder (~> 3.1)
46
- erubi (~> 1.4)
47
- rails-dom-testing (~> 2.0)
48
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.4.4)
50
- activesupport (= 6.0.4.4)
51
- globalid (>= 0.3.6)
52
- activemodel (6.0.4.4)
53
- activesupport (= 6.0.4.4)
54
- activerecord (6.0.4.4)
55
- activemodel (= 6.0.4.4)
56
- activesupport (= 6.0.4.4)
57
- activestorage (6.0.4.4)
58
- actionpack (= 6.0.4.4)
59
- activejob (= 6.0.4.4)
60
- activerecord (= 6.0.4.4)
61
- marcel (~> 1.0.0)
62
- activesupport (6.0.4.4)
63
- concurrent-ruby (~> 1.0, >= 1.0.2)
64
- i18n (>= 0.7, < 2)
65
- minitest (~> 5.1)
66
- tzinfo (~> 1.1)
67
- zeitwerk (~> 2.2, >= 2.2.2)
68
- appraisal (2.3.0)
69
- bundler
70
- rake
71
- thor (>= 0.14.0)
72
- ast (2.4.1)
73
- builder (3.2.4)
74
- coderay (1.1.3)
75
- concurrent-ruby (1.1.9)
76
- crass (1.0.6)
77
- diff-lcs (1.4.4)
78
- docile (1.3.2)
79
- dry-core (0.7.1)
80
- concurrent-ruby (~> 1.0)
81
- dry-initializer (3.0.4)
82
- dry-monads (1.4.0)
83
- concurrent-ruby (~> 1.0)
84
- dry-core (~> 0.7)
85
- erubi (1.10.0)
86
- fivemat (1.3.7)
87
- globalid (1.0.0)
88
- activesupport (>= 5.0)
89
- i18n (1.8.11)
90
- concurrent-ruby (~> 1.0)
91
- json (2.3.1)
92
- loofah (2.13.0)
93
- crass (~> 1.0.2)
94
- nokogiri (>= 1.5.9)
95
- mail (2.7.1)
96
- mini_mime (>= 0.1.1)
97
- marcel (1.0.2)
98
- method_source (1.0.0)
99
- mini_mime (1.1.2)
100
- mini_portile2 (2.6.1)
101
- minitest (5.15.0)
102
- nio4r (2.5.8)
103
- nokogiri (1.12.5)
104
- mini_portile2 (~> 2.6.1)
105
- racc (~> 1.4)
106
- parallel (1.19.2)
107
- parser (2.7.2.0)
108
- ast (~> 2.4.1)
109
- pry (0.13.1)
110
- coderay (~> 1.1)
111
- method_source (~> 1.0)
112
- racc (1.6.0)
113
- rack (2.2.3)
114
- rack-test (1.1.0)
115
- rack (>= 1.0, < 3)
116
- rails (6.0.4.4)
117
- actioncable (= 6.0.4.4)
118
- actionmailbox (= 6.0.4.4)
119
- actionmailer (= 6.0.4.4)
120
- actionpack (= 6.0.4.4)
121
- actiontext (= 6.0.4.4)
122
- actionview (= 6.0.4.4)
123
- activejob (= 6.0.4.4)
124
- activemodel (= 6.0.4.4)
125
- activerecord (= 6.0.4.4)
126
- activestorage (= 6.0.4.4)
127
- activesupport (= 6.0.4.4)
128
- bundler (>= 1.3.0)
129
- railties (= 6.0.4.4)
130
- sprockets-rails (>= 2.0.0)
131
- rails-dom-testing (2.0.3)
132
- activesupport (>= 4.2.0)
133
- nokogiri (>= 1.6)
134
- rails-html-sanitizer (1.4.2)
135
- loofah (~> 2.3)
136
- railties (6.0.4.4)
137
- actionpack (= 6.0.4.4)
138
- activesupport (= 6.0.4.4)
139
- method_source
140
- rake (>= 0.8.7)
141
- thor (>= 0.20.3, < 2.0)
142
- rainbow (3.0.0)
143
- rake (12.3.3)
144
- regexp_parser (1.8.2)
145
- rexml (3.2.5)
146
- rspec (3.9.0)
147
- rspec-core (~> 3.9.0)
148
- rspec-expectations (~> 3.9.0)
149
- rspec-mocks (~> 3.9.0)
150
- rspec-core (3.9.3)
151
- rspec-support (~> 3.9.3)
152
- rspec-expectations (3.9.3)
153
- diff-lcs (>= 1.2.0, < 2.0)
154
- rspec-support (~> 3.9.0)
155
- rspec-mocks (3.9.1)
156
- diff-lcs (>= 1.2.0, < 2.0)
157
- rspec-support (~> 3.9.0)
158
- rspec-support (3.9.4)
159
- rspec_junit_formatter (0.4.1)
160
- rspec-core (>= 2, < 4, != 2.12.0)
161
- rubocop (0.93.1)
162
- parallel (~> 1.10)
163
- parser (>= 2.7.1.5)
164
- rainbow (>= 2.2.2, < 4.0)
165
- regexp_parser (>= 1.8)
166
- rexml
167
- rubocop-ast (>= 0.6.0)
168
- ruby-progressbar (~> 1.7)
169
- unicode-display_width (>= 1.4.0, < 2.0)
170
- rubocop-ast (1.1.0)
171
- parser (>= 2.7.1.5)
172
- rubocop-g2 (1.2.1)
173
- rubocop (>= 0.82)
174
- rubocop-rails (>= 2.5)
175
- rubocop-rspec (>= 1.39)
176
- rubocop-rails (2.8.1)
177
- activesupport (>= 4.2.0)
178
- rack (>= 1.1)
179
- rubocop (>= 0.87.0)
180
- rubocop-rspec (1.44.1)
181
- rubocop (~> 0.87)
182
- rubocop-ast (>= 0.7.1)
183
- ruby-progressbar (1.10.1)
184
- simplecov (0.16.1)
185
- docile (~> 1.1)
186
- json (>= 1.8, < 3)
187
- simplecov-html (~> 0.10.0)
188
- simplecov-html (0.10.2)
189
- sprockets (4.0.2)
190
- concurrent-ruby (~> 1.0)
191
- rack (> 1, < 3)
192
- sprockets-rails (3.4.2)
193
- actionpack (>= 5.2)
194
- activesupport (>= 5.2)
195
- sprockets (>= 3.0.0)
196
- thor (1.1.0)
197
- thread_safe (0.3.6)
198
- tzinfo (1.2.9)
199
- thread_safe (~> 0.1)
200
- unicode-display_width (1.7.0)
201
- websocket-driver (0.7.5)
202
- websocket-extensions (>= 0.1.0)
203
- websocket-extensions (0.1.5)
204
- zeitwerk (2.5.1)
205
-
206
- PLATFORMS
207
- ruby
208
-
209
- DEPENDENCIES
210
- appraisal
211
- fivemat
212
- g2_command!
213
- pry
214
- rails (~> 6.0.3)
215
- rake (~> 12.0)
216
- rspec (~> 3.0)
217
- rspec_junit_formatter
218
- rubocop-g2
219
- simplecov (= 0.16.1)
220
-
221
- BUNDLED WITH
222
- 2.2.32