g2_command 2.4.0 → 3.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b498126a177312a5f04fe6b4c410de93ac2bf9ba04979bd97eb4b557f9db2ba
4
- data.tar.gz: 8c92c87dced570aa7529ba71e0bc7b81821c65b86dc6303aeb8d466dde436f3b
3
+ metadata.gz: 2f755a4e98e7f55bf7f8c22fe555c535af406c8c3875fedc86fd8d5f6e7af336
4
+ data.tar.gz: a8143c988052583c9ecbb5e59cf3b20190657c58687947779f770c75833c6c08
5
5
  SHA512:
6
- metadata.gz: 90fac7759c6ef26ed7f687a5217758aa78094149b1397bb7d63cd398e0dc8327ea2197f8559e67645a02f43ec691433a9bf13a1feaf3e97706af7deeb606d293
7
- data.tar.gz: 8384432912974a58e364540608a70f673ab17c80f29ddc082d77c800a307a5788b916cc586688b60c85b72f7402320266367eaac694657329ac08efce78ad419
6
+ metadata.gz: 5563fca17f8952a6a88af5508964e0f899e1df2c583032e781f2472609a6fa14683589815532ca3f93cb1b233457dfacedbb519e1674b860dd2047096665aaae
7
+ data.tar.gz: 961832db2ed4b0cf607f3c8199baef7b34395d2acbd4e1d2c7a59837aca309d20732b69f5c642940ab9fb7e4128ef6f7d8e3bdfe19dd8eae4097b56b1f631ff1
data/.circleci/config.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  version: 2.1
2
2
 
3
3
  orbs:
4
- ruby: g2crowd/ruby@0.0.13
4
+ ruby: g2crowd/ruby@0.1.0
5
5
 
6
6
  workflows:
7
7
  version: 2
@@ -11,20 +11,12 @@ workflows:
11
11
  context: g2crowd-global
12
12
  matrix:
13
13
  parameters:
14
- ruby: ['2.5.8', '2.6.6', '2.7.2', '3.0.0']
14
+ ruby: ['2.7.5', '3.0.3', '3.1.0']
15
15
  appraisal:
16
- - rails_5.1
17
- - rails_5.2
18
- - rails_6.0
19
16
  - rails_6.1
20
- exclude:
21
- - ruby: '3.0.0'
22
- appraisal: rails_5.1
23
- - ruby: '3.0.0'
24
- appraisal: rails_5.2
25
- - ruby: '3.0.0'
26
- appraisal: rails_6.0
17
+ - rails_7.0
27
18
  - ruby/build:
28
19
  context: g2crowd-global
20
+ ruby: '3.1.0'
29
21
  setup-database: false
30
- bundler-version: '2.1.4'
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.0
1
+ ruby 3.1.0
data/Appraisals CHANGED
@@ -1,17 +1,7 @@
1
- appraise 'rails_5.1' do
2
- gem 'rails', '~> 5.1', '< 5.2'
3
- gem 'sprockets', '~> 3'
4
- end
5
-
6
- appraise 'rails_5.2' do
7
- gem 'rails', '~> 5.2'
8
- gem 'sprockets', '~> 3'
9
- end
10
-
11
- appraise 'rails_6.0' do
12
- gem 'rails', '~> 6.0.3'
13
- end
14
-
15
1
  appraise 'rails_6.1' do
16
2
  gem 'rails', '~> 6.1.0'
17
3
  end
4
+
5
+ appraise 'rails_7.0' do
6
+ gem 'rails', '~> 7.0.0'
7
+ end
data/Gemfile.lock CHANGED
@@ -1,115 +1,134 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- g2_command (2.4.0)
5
- activemodel (>= 5.0, < 7)
6
- activesupport (>= 5.0, < 7)
4
+ g2_command (3.2.0)
5
+ activemodel (>= 5.0, < 7.1)
6
+ activesupport (>= 5.0, < 7.1)
7
7
  dry-initializer (~> 3.0)
8
8
  dry-monads (~> 1.3)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.1.3)
14
- actionpack (= 6.1.3)
15
- activesupport (= 6.1.3)
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 (6.1.3)
19
- actionpack (= 6.1.3)
20
- activejob (= 6.1.3)
21
- activerecord (= 6.1.3)
22
- activestorage (= 6.1.3)
23
- activesupport (= 6.1.3)
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 (6.1.3)
26
- actionpack (= 6.1.3)
27
- actionview (= 6.1.3)
28
- activejob (= 6.1.3)
29
- activesupport (= 6.1.3)
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 (6.1.3)
33
- actionview (= 6.1.3)
34
- activesupport (= 6.1.3)
35
- rack (~> 2.0, >= 2.0.9)
38
+ actionpack (7.0.1)
39
+ actionview (= 7.0.1)
40
+ activesupport (= 7.0.1)
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 (6.1.3)
40
- actionpack (= 6.1.3)
41
- activerecord (= 6.1.3)
42
- activestorage (= 6.1.3)
43
- activesupport (= 6.1.3)
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)
50
+ globalid (>= 0.6.0)
44
51
  nokogiri (>= 1.8.5)
45
- actionview (6.1.3)
46
- activesupport (= 6.1.3)
52
+ actionview (7.0.1)
53
+ activesupport (= 7.0.1)
47
54
  builder (~> 3.1)
48
55
  erubi (~> 1.4)
49
56
  rails-dom-testing (~> 2.0)
50
57
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
51
- activejob (6.1.3)
52
- activesupport (= 6.1.3)
58
+ activejob (7.0.1)
59
+ activesupport (= 7.0.1)
53
60
  globalid (>= 0.3.6)
54
- activemodel (6.1.3)
55
- activesupport (= 6.1.3)
56
- activerecord (6.1.3)
57
- activemodel (= 6.1.3)
58
- activesupport (= 6.1.3)
59
- activestorage (6.1.3)
60
- actionpack (= 6.1.3)
61
- activejob (= 6.1.3)
62
- activerecord (= 6.1.3)
63
- activesupport (= 6.1.3)
64
- marcel (~> 0.3.1)
65
- mimemagic (~> 0.3.2)
66
- activesupport (6.1.3)
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)
71
+ marcel (~> 1.0)
72
+ mini_mime (>= 1.1.0)
73
+ activesupport (7.0.1)
67
74
  concurrent-ruby (~> 1.0, >= 1.0.2)
68
75
  i18n (>= 1.6, < 2)
69
76
  minitest (>= 5.1)
70
77
  tzinfo (~> 2.0)
71
- zeitwerk (~> 2.3)
72
- appraisal (2.3.0)
78
+ appraisal (2.4.1)
73
79
  bundler
74
80
  rake
75
81
  thor (>= 0.14.0)
76
82
  ast (2.4.1)
77
83
  builder (3.2.4)
78
84
  coderay (1.1.2)
79
- concurrent-ruby (1.1.8)
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
- dry-core (0.5.0)
90
+ dry-core (0.7.1)
84
91
  concurrent-ruby (~> 1.0)
85
- dry-equalizer (0.3.0)
86
92
  dry-initializer (3.0.4)
87
- dry-monads (1.3.5)
93
+ dry-monads (1.4.0)
88
94
  concurrent-ruby (~> 1.0)
89
- dry-core (~> 0.4, >= 0.4.4)
90
- dry-equalizer
95
+ dry-core (~> 0.7)
91
96
  erubi (1.10.0)
92
97
  fivemat (1.3.7)
93
- globalid (0.4.2)
94
- activesupport (>= 4.2.0)
95
- i18n (1.8.9)
98
+ globalid (1.0.0)
99
+ activesupport (>= 5.0)
100
+ i18n (1.9.1)
96
101
  concurrent-ruby (~> 1.0)
102
+ io-wait (0.2.1)
97
103
  json (2.3.0)
98
- loofah (2.9.0)
104
+ loofah (2.13.0)
99
105
  crass (~> 1.0.2)
100
106
  nokogiri (>= 1.5.9)
101
107
  mail (2.7.1)
102
108
  mini_mime (>= 0.1.1)
103
- marcel (0.3.3)
104
- mimemagic (~> 0.3.2)
109
+ marcel (1.0.2)
105
110
  method_source (0.9.2)
106
- mimemagic (0.3.5)
107
- mini_mime (1.0.2)
108
- mini_portile2 (2.5.0)
109
- minitest (5.14.4)
110
- nio4r (2.5.5)
111
- nokogiri (1.11.1)
112
- mini_portile2 (~> 2.5.0)
111
+ mini_mime (1.1.2)
112
+ mini_portile2 (2.7.1)
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
129
+ nio4r (2.5.8)
130
+ nokogiri (1.13.1)
131
+ mini_portile2 (~> 2.7.0)
113
132
  racc (~> 1.4)
114
133
  parallel (1.19.2)
115
134
  parser (2.7.2.0)
@@ -117,40 +136,40 @@ GEM
117
136
  pry (0.12.2)
118
137
  coderay (~> 1.1.0)
119
138
  method_source (~> 0.9.0)
120
- racc (1.5.2)
139
+ racc (1.6.0)
121
140
  rack (2.2.3)
122
141
  rack-test (1.1.0)
123
142
  rack (>= 1.0, < 3)
124
- rails (6.1.3)
125
- actioncable (= 6.1.3)
126
- actionmailbox (= 6.1.3)
127
- actionmailer (= 6.1.3)
128
- actionpack (= 6.1.3)
129
- actiontext (= 6.1.3)
130
- actionview (= 6.1.3)
131
- activejob (= 6.1.3)
132
- activemodel (= 6.1.3)
133
- activerecord (= 6.1.3)
134
- activestorage (= 6.1.3)
135
- activesupport (= 6.1.3)
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)
136
155
  bundler (>= 1.15.0)
137
- railties (= 6.1.3)
138
- sprockets-rails (>= 2.0.0)
156
+ railties (= 7.0.1)
139
157
  rails-dom-testing (2.0.3)
140
158
  activesupport (>= 4.2.0)
141
159
  nokogiri (>= 1.6)
142
- rails-html-sanitizer (1.3.0)
160
+ rails-html-sanitizer (1.4.2)
143
161
  loofah (~> 2.3)
144
- railties (6.1.3)
145
- actionpack (= 6.1.3)
146
- activesupport (= 6.1.3)
162
+ railties (7.0.1)
163
+ actionpack (= 7.0.1)
164
+ activesupport (= 7.0.1)
147
165
  method_source
148
- rake (>= 0.8.7)
166
+ rake (>= 12.2)
149
167
  thor (~> 1.0)
168
+ zeitwerk (~> 2.5)
150
169
  rainbow (3.0.0)
151
170
  rake (12.3.3)
152
171
  regexp_parser (1.8.2)
153
- rexml (3.2.4)
172
+ rexml (3.2.5)
154
173
  rspec (3.10.0)
155
174
  rspec-core (~> 3.10.0)
156
175
  rspec-expectations (~> 3.10.0)
@@ -194,21 +213,16 @@ GEM
194
213
  json (>= 1.8, < 3)
195
214
  simplecov-html (~> 0.10.0)
196
215
  simplecov-html (0.10.2)
197
- sprockets (4.0.2)
198
- concurrent-ruby (~> 1.0)
199
- rack (> 1, < 3)
200
- sprockets-rails (3.2.2)
201
- actionpack (>= 4.0)
202
- activesupport (>= 4.0)
203
- sprockets (>= 3.0.0)
204
- thor (1.1.0)
216
+ strscan (3.0.1)
217
+ thor (1.2.1)
218
+ timeout (0.2.0)
205
219
  tzinfo (2.0.4)
206
220
  concurrent-ruby (~> 1.0)
207
221
  unicode-display_width (1.7.0)
208
- websocket-driver (0.7.3)
222
+ websocket-driver (0.7.5)
209
223
  websocket-extensions (>= 0.1.0)
210
224
  websocket-extensions (0.1.5)
211
- zeitwerk (2.4.2)
225
+ zeitwerk (2.5.4)
212
226
 
213
227
  PLATFORMS
214
228
  ruby
@@ -226,4 +240,4 @@ DEPENDENCIES
226
240
  simplecov (= 0.16.1)
227
241
 
228
242
  BUNDLED WITH
229
- 2.2.3
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'
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ['lib']
27
27
 
28
- spec.add_dependency 'activemodel', '>= 5.0', '< 7'
29
- spec.add_dependency 'activesupport', '>= 5.0', '< 7'
28
+ spec.add_dependency 'activemodel', '>= 5.0', '< 7.1'
29
+ spec.add_dependency 'activesupport', '>= 5.0', '< 7.1'
30
30
  spec.add_dependency 'dry-initializer', '~> 3.0'
31
31
  spec.add_dependency 'dry-monads', '~> 1.3'
32
32
  end