auxiliary_rails 0.4.0 → 0.4.1

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: d9da4081f14b301b1f3afaf5583089107f0874f7393b2586fe5db91323a9f783
4
- data.tar.gz: 11b3e55c61f19b8a0fcc0581147f7dccdd869602ab8fb72f479450ebcf5086d0
3
+ metadata.gz: 21e4e3b8cdcab3166166462d80211275b7ea9e4fe969bfc943d21564491a94b7
4
+ data.tar.gz: bcfa3f19a26113a434e4a6f09d95a00314eae2495e44d79872ce4f46801f6569
5
5
  SHA512:
6
- metadata.gz: 809eef68d020df68ebb2909d6a3ad648cf31eefeda9206d25d663ba886d81360fd8f9622a9a83a109b3960362a76ec0d59a758def6fa95dccb53ae8d91c57f85
7
- data.tar.gz: 6a03196d6b77686fb9e4b3c606d2939ed0b3b583f34f764c0d1117f779c33585aee862a8c3a90a2868fd602f187ed17059b896c1378f20f40d1d2645fe19123f
6
+ metadata.gz: 58db65a473fe1408ca20d6a0f250e47fbba2d60759b9915589735efc2e9562825d702452c42870abfe3077e0e894df5c2228c1737315e30a80792e11be53ff37
7
+ data.tar.gz: 79fbffab02c929e3169c46bfc3f9db020bd9ef3a14240143b1dd422917ae291517511d49dd365ab6284f2205d8fc28fef03f89c5999066ee186f500447526bfc
@@ -0,0 +1,32 @@
1
+ name: Run Checks
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ - develop
8
+
9
+ pull_request:
10
+
11
+ jobs:
12
+ build:
13
+ name: Run Checks on Ruby ${{ matrix.ruby }}
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ ruby:
18
+ - '2.7'
19
+ - '3.1'
20
+ - '3.2'
21
+
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+ - name: Set up Ruby
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: ${{ matrix.ruby }}
28
+ bundler-cache: true
29
+ - name: Run rspec
30
+ run: bin/rspec
31
+ - name: Run rubocop
32
+ run: bin/rubocop
@@ -0,0 +1,32 @@
1
+ name: Publish to GPR
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build + Publish to GPR
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ packages: write
16
+
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+ - name: Set up Ruby
20
+ uses: actions/setup-ruby@v1
21
+
22
+ - name: Publish to GPR
23
+ run: |
24
+ mkdir -p $HOME/.gem
25
+ touch $HOME/.gem/credentials
26
+ chmod 0600 $HOME/.gem/credentials
27
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
28
+ gem build *.gemspec
29
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
30
+ env:
31
+ GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
32
+ OWNER: ${{ github.repository_owner }}
@@ -0,0 +1,31 @@
1
+ name: Publish to RubyGems
2
+
3
+ on:
4
+ push:
5
+ branches: [ "master" ]
6
+ pull_request:
7
+ branches: [ "master" ]
8
+
9
+ jobs:
10
+ build:
11
+ name: Build + Publish to RubyGems
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ packages: write
16
+
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+ - name: Set up Ruby
20
+ uses: actions/setup-ruby@v1
21
+
22
+ - name: Publish to RubyGems
23
+ run: |
24
+ mkdir -p $HOME/.gem
25
+ touch $HOME/.gem/credentials
26
+ chmod 0600 $HOME/.gem/credentials
27
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
28
+ gem build *.gemspec
29
+ gem push *.gem
30
+ env:
31
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
data/.rubocop.yml CHANGED
@@ -3,6 +3,7 @@ inherit_from:
3
3
 
4
4
  require:
5
5
  - rubocop-performance
6
+ - rubocop-rake
6
7
  - rubocop-rspec
7
8
 
8
9
  AllCops:
@@ -25,12 +26,6 @@ Layout/LineEndStringConcatenationIndentation:
25
26
  Layout/MultilineMethodCallIndentation:
26
27
  EnforcedStyle: indented
27
28
 
28
- #################### Metrics ##############################
29
-
30
- Metrics/BlockLength:
31
- IgnoredMethods:
32
- - describe
33
-
34
29
  #################### RSpec ################################
35
30
 
36
31
  RSpec/ExampleLength:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.4
1
+ 3.2.2
data/Gemfile CHANGED
@@ -1,4 +1,12 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in auxiliary_rails.gemspec
4
3
  gemspec
4
+
5
+ gem 'bundler', '~> 2.0'
6
+ gem 'pry'
7
+ gem 'rake'
8
+ gem 'rspec', '~> 3.8'
9
+ gem 'rubocop', '~> 1.54'
10
+ gem 'rubocop-performance'
11
+ gem 'rubocop-rake'
12
+ gem 'rubocop-rspec'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- auxiliary_rails (0.4.0)
4
+ auxiliary_rails (0.4.1)
5
5
  dry-core
6
6
  dry-initializer
7
7
  dry-initializer-rails
@@ -11,67 +11,67 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actioncable (7.0.3.1)
15
- actionpack (= 7.0.3.1)
16
- activesupport (= 7.0.3.1)
14
+ actioncable (7.0.6)
15
+ actionpack (= 7.0.6)
16
+ activesupport (= 7.0.6)
17
17
  nio4r (~> 2.0)
18
18
  websocket-driver (>= 0.6.1)
19
- actionmailbox (7.0.3.1)
20
- actionpack (= 7.0.3.1)
21
- activejob (= 7.0.3.1)
22
- activerecord (= 7.0.3.1)
23
- activestorage (= 7.0.3.1)
24
- activesupport (= 7.0.3.1)
19
+ actionmailbox (7.0.6)
20
+ actionpack (= 7.0.6)
21
+ activejob (= 7.0.6)
22
+ activerecord (= 7.0.6)
23
+ activestorage (= 7.0.6)
24
+ activesupport (= 7.0.6)
25
25
  mail (>= 2.7.1)
26
26
  net-imap
27
27
  net-pop
28
28
  net-smtp
29
- actionmailer (7.0.3.1)
30
- actionpack (= 7.0.3.1)
31
- actionview (= 7.0.3.1)
32
- activejob (= 7.0.3.1)
33
- activesupport (= 7.0.3.1)
29
+ actionmailer (7.0.6)
30
+ actionpack (= 7.0.6)
31
+ actionview (= 7.0.6)
32
+ activejob (= 7.0.6)
33
+ activesupport (= 7.0.6)
34
34
  mail (~> 2.5, >= 2.5.4)
35
35
  net-imap
36
36
  net-pop
37
37
  net-smtp
38
38
  rails-dom-testing (~> 2.0)
39
- actionpack (7.0.3.1)
40
- actionview (= 7.0.3.1)
41
- activesupport (= 7.0.3.1)
42
- rack (~> 2.0, >= 2.2.0)
39
+ actionpack (7.0.6)
40
+ actionview (= 7.0.6)
41
+ activesupport (= 7.0.6)
42
+ rack (~> 2.0, >= 2.2.4)
43
43
  rack-test (>= 0.6.3)
44
44
  rails-dom-testing (~> 2.0)
45
45
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
46
- actiontext (7.0.3.1)
47
- actionpack (= 7.0.3.1)
48
- activerecord (= 7.0.3.1)
49
- activestorage (= 7.0.3.1)
50
- activesupport (= 7.0.3.1)
46
+ actiontext (7.0.6)
47
+ actionpack (= 7.0.6)
48
+ activerecord (= 7.0.6)
49
+ activestorage (= 7.0.6)
50
+ activesupport (= 7.0.6)
51
51
  globalid (>= 0.6.0)
52
52
  nokogiri (>= 1.8.5)
53
- actionview (7.0.3.1)
54
- activesupport (= 7.0.3.1)
53
+ actionview (7.0.6)
54
+ activesupport (= 7.0.6)
55
55
  builder (~> 3.1)
56
56
  erubi (~> 1.4)
57
57
  rails-dom-testing (~> 2.0)
58
58
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
59
- activejob (7.0.3.1)
60
- activesupport (= 7.0.3.1)
59
+ activejob (7.0.6)
60
+ activesupport (= 7.0.6)
61
61
  globalid (>= 0.3.6)
62
- activemodel (7.0.3.1)
63
- activesupport (= 7.0.3.1)
64
- activerecord (7.0.3.1)
65
- activemodel (= 7.0.3.1)
66
- activesupport (= 7.0.3.1)
67
- activestorage (7.0.3.1)
68
- actionpack (= 7.0.3.1)
69
- activejob (= 7.0.3.1)
70
- activerecord (= 7.0.3.1)
71
- activesupport (= 7.0.3.1)
62
+ activemodel (7.0.6)
63
+ activesupport (= 7.0.6)
64
+ activerecord (7.0.6)
65
+ activemodel (= 7.0.6)
66
+ activesupport (= 7.0.6)
67
+ activestorage (7.0.6)
68
+ actionpack (= 7.0.6)
69
+ activejob (= 7.0.6)
70
+ activerecord (= 7.0.6)
71
+ activesupport (= 7.0.6)
72
72
  marcel (~> 1.0)
73
73
  mini_mime (>= 1.1.0)
74
- activesupport (7.0.3.1)
74
+ activesupport (7.0.6)
75
75
  concurrent-ruby (~> 1.0, >= 1.0.2)
76
76
  i18n (>= 1.6, < 2)
77
77
  minitest (>= 5.1)
@@ -79,131 +79,142 @@ GEM
79
79
  ast (2.4.2)
80
80
  builder (3.2.4)
81
81
  coderay (1.1.3)
82
- concurrent-ruby (1.1.10)
82
+ concurrent-ruby (1.2.2)
83
83
  crass (1.0.6)
84
+ date (3.3.3)
84
85
  diff-lcs (1.5.0)
85
- digest (3.1.0)
86
- dry-core (0.8.1)
86
+ dry-core (1.0.0)
87
87
  concurrent-ruby (~> 1.0)
88
+ zeitwerk (~> 2.6)
88
89
  dry-initializer (3.1.1)
89
90
  dry-initializer-rails (3.1.1)
90
91
  dry-initializer (>= 2.4, < 4)
91
92
  rails (> 3.0)
92
- erubi (1.11.0)
93
- globalid (1.0.0)
93
+ erubi (1.12.0)
94
+ globalid (1.1.0)
94
95
  activesupport (>= 5.0)
95
- i18n (1.12.0)
96
+ i18n (1.14.1)
96
97
  concurrent-ruby (~> 1.0)
97
- loofah (2.18.0)
98
+ json (2.6.3)
99
+ language_server-protocol (3.17.0.3)
100
+ loofah (2.21.3)
98
101
  crass (~> 1.0.2)
99
- nokogiri (>= 1.5.9)
100
- mail (2.7.1)
102
+ nokogiri (>= 1.12.0)
103
+ mail (2.8.1)
101
104
  mini_mime (>= 0.1.1)
105
+ net-imap
106
+ net-pop
107
+ net-smtp
102
108
  marcel (1.0.2)
103
109
  method_source (1.0.0)
104
110
  mini_mime (1.1.2)
105
- mini_portile2 (2.8.0)
106
- minitest (5.16.3)
107
- net-imap (0.2.3)
108
- digest
111
+ mini_portile2 (2.8.4)
112
+ minitest (5.18.1)
113
+ net-imap (0.3.6)
114
+ date
109
115
  net-protocol
110
- strscan
111
- net-pop (0.1.1)
112
- digest
116
+ net-pop (0.1.2)
113
117
  net-protocol
118
+ net-protocol (0.2.1)
114
119
  timeout
115
- net-protocol (0.1.3)
116
- timeout
117
- net-smtp (0.3.1)
118
- digest
120
+ net-smtp (0.3.3)
119
121
  net-protocol
120
- timeout
121
- nio4r (2.5.8)
122
- nokogiri (1.13.8)
123
- mini_portile2 (~> 2.8.0)
122
+ nio4r (2.5.9)
123
+ nokogiri (1.15.3)
124
+ mini_portile2 (~> 2.8.2)
124
125
  racc (~> 1.4)
125
- parallel (1.22.1)
126
- parser (3.1.2.1)
126
+ parallel (1.23.0)
127
+ parser (3.2.2.3)
127
128
  ast (~> 2.4.1)
128
- pry (0.14.1)
129
+ racc
130
+ pry (0.14.2)
129
131
  coderay (~> 1.1)
130
132
  method_source (~> 1.0)
131
- racc (1.6.0)
132
- rack (2.2.4)
133
- rack-test (2.0.2)
133
+ racc (1.7.1)
134
+ rack (2.2.7)
135
+ rack-test (2.1.0)
134
136
  rack (>= 1.3)
135
- rails (7.0.3.1)
136
- actioncable (= 7.0.3.1)
137
- actionmailbox (= 7.0.3.1)
138
- actionmailer (= 7.0.3.1)
139
- actionpack (= 7.0.3.1)
140
- actiontext (= 7.0.3.1)
141
- actionview (= 7.0.3.1)
142
- activejob (= 7.0.3.1)
143
- activemodel (= 7.0.3.1)
144
- activerecord (= 7.0.3.1)
145
- activestorage (= 7.0.3.1)
146
- activesupport (= 7.0.3.1)
137
+ rails (7.0.6)
138
+ actioncable (= 7.0.6)
139
+ actionmailbox (= 7.0.6)
140
+ actionmailer (= 7.0.6)
141
+ actionpack (= 7.0.6)
142
+ actiontext (= 7.0.6)
143
+ actionview (= 7.0.6)
144
+ activejob (= 7.0.6)
145
+ activemodel (= 7.0.6)
146
+ activerecord (= 7.0.6)
147
+ activestorage (= 7.0.6)
148
+ activesupport (= 7.0.6)
147
149
  bundler (>= 1.15.0)
148
- railties (= 7.0.3.1)
149
- rails-dom-testing (2.0.3)
150
- activesupport (>= 4.2.0)
150
+ railties (= 7.0.6)
151
+ rails-dom-testing (2.1.1)
152
+ activesupport (>= 5.0.0)
153
+ minitest
151
154
  nokogiri (>= 1.6)
152
- rails-html-sanitizer (1.4.3)
153
- loofah (~> 2.3)
154
- railties (7.0.3.1)
155
- actionpack (= 7.0.3.1)
156
- activesupport (= 7.0.3.1)
155
+ rails-html-sanitizer (1.6.0)
156
+ loofah (~> 2.21)
157
+ nokogiri (~> 1.14)
158
+ railties (7.0.6)
159
+ actionpack (= 7.0.6)
160
+ activesupport (= 7.0.6)
157
161
  method_source
158
162
  rake (>= 12.2)
159
163
  thor (~> 1.0)
160
164
  zeitwerk (~> 2.5)
161
165
  rainbow (3.1.1)
162
166
  rake (13.0.6)
163
- regexp_parser (2.5.0)
167
+ regexp_parser (2.8.1)
164
168
  rexml (3.2.5)
165
- rspec (3.11.0)
166
- rspec-core (~> 3.11.0)
167
- rspec-expectations (~> 3.11.0)
168
- rspec-mocks (~> 3.11.0)
169
- rspec-core (3.11.0)
170
- rspec-support (~> 3.11.0)
171
- rspec-expectations (3.11.0)
169
+ rspec (3.12.0)
170
+ rspec-core (~> 3.12.0)
171
+ rspec-expectations (~> 3.12.0)
172
+ rspec-mocks (~> 3.12.0)
173
+ rspec-core (3.12.2)
174
+ rspec-support (~> 3.12.0)
175
+ rspec-expectations (3.12.3)
172
176
  diff-lcs (>= 1.2.0, < 2.0)
173
- rspec-support (~> 3.11.0)
174
- rspec-mocks (3.11.1)
177
+ rspec-support (~> 3.12.0)
178
+ rspec-mocks (3.12.6)
175
179
  diff-lcs (>= 1.2.0, < 2.0)
176
- rspec-support (~> 3.11.0)
177
- rspec-support (3.11.0)
178
- rubocop (1.20.0)
180
+ rspec-support (~> 3.12.0)
181
+ rspec-support (3.12.1)
182
+ rubocop (1.54.2)
183
+ json (~> 2.3)
184
+ language_server-protocol (>= 3.17.0)
179
185
  parallel (~> 1.10)
180
- parser (>= 3.0.0.0)
186
+ parser (>= 3.2.2.3)
181
187
  rainbow (>= 2.2.2, < 4.0)
182
188
  regexp_parser (>= 1.8, < 3.0)
183
- rexml
184
- rubocop-ast (>= 1.9.1, < 2.0)
189
+ rexml (>= 3.2.5, < 4.0)
190
+ rubocop-ast (>= 1.28.0, < 2.0)
185
191
  ruby-progressbar (~> 1.7)
186
- unicode-display_width (>= 1.4.0, < 3.0)
187
- rubocop-ast (1.21.0)
188
- parser (>= 3.1.1.0)
189
- rubocop-performance (1.14.3)
192
+ unicode-display_width (>= 2.4.0, < 3.0)
193
+ rubocop-ast (1.29.0)
194
+ parser (>= 3.2.1.0)
195
+ rubocop-capybara (2.18.0)
196
+ rubocop (~> 1.41)
197
+ rubocop-factory_bot (2.23.1)
198
+ rubocop (~> 1.33)
199
+ rubocop-performance (1.18.0)
190
200
  rubocop (>= 1.7.0, < 2.0)
191
201
  rubocop-ast (>= 0.4.0)
192
202
  rubocop-rake (0.6.0)
193
203
  rubocop (~> 1.0)
194
- rubocop-rspec (2.11.1)
195
- rubocop (~> 1.19)
196
- ruby-progressbar (1.11.0)
197
- strscan (3.0.4)
198
- thor (1.2.1)
199
- timeout (0.3.0)
200
- tzinfo (2.0.5)
204
+ rubocop-rspec (2.22.0)
205
+ rubocop (~> 1.33)
206
+ rubocop-capybara (~> 2.17)
207
+ rubocop-factory_bot (~> 2.22)
208
+ ruby-progressbar (1.13.0)
209
+ thor (1.2.2)
210
+ timeout (0.4.0)
211
+ tzinfo (2.0.6)
201
212
  concurrent-ruby (~> 1.0)
202
- unicode-display_width (2.2.0)
213
+ unicode-display_width (2.4.2)
203
214
  websocket-driver (0.7.5)
204
215
  websocket-extensions (>= 0.1.0)
205
216
  websocket-extensions (0.1.5)
206
- zeitwerk (2.6.0)
217
+ zeitwerk (2.6.8)
207
218
 
208
219
  PLATFORMS
209
220
  ruby
@@ -214,10 +225,10 @@ DEPENDENCIES
214
225
  pry
215
226
  rake
216
227
  rspec (~> 3.8)
217
- rubocop (= 1.20.0)
228
+ rubocop (~> 1.54)
218
229
  rubocop-performance
219
230
  rubocop-rake
220
231
  rubocop-rspec
221
232
 
222
233
  BUNDLED WITH
223
- 2.1.4
234
+ 2.4.17
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  Collection of classes, configs, scripts, generators for Ruby on Rails helping you get things done, better.
4
4
 
5
5
  [![Gem](https://img.shields.io/gem/v/auxiliary_rails.svg)](https://rubygems.org/gems/auxiliary_rails)
6
- [![Build Status](https://travis-ci.org/ergoserv/auxiliary_rails.svg?branch=master)](https://travis-ci.org/ergoserv/auxiliary_rails)
7
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/a317c4893a804ce577ab/maintainability)](https://codeclimate.com/github/ergoserv/auxiliary_rails/maintainability)
8
7
 
9
8
  ## Installation
@@ -180,7 +179,7 @@ Read article [Error Handling](https://github.com/ergoserv/handbook/blob/master/g
180
179
 
181
180
  ```ruby
182
181
  # app/errors/application_error.rb
183
- class ApplicationCommand < AuxiliaryRails::Application::Error
182
+ class ApplicationError < AuxiliaryRails::Application::Error
184
183
  end
185
184
  ```
186
185
 
@@ -345,7 +344,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/ergose
345
344
 
346
345
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
347
346
 
348
- -------------------------------------------------------------------------------
347
+ ---
349
348
 
350
349
  [![alt text](https://raw.githubusercontent.com/ergoserv/auxiliary_rails/master/assets/ErgoServ_horizontalColor@sign+text+bg.png "ErgoServ - Web and Mobile Development Company")](https://www.ergoserv.com)
351
350
 
@@ -22,6 +22,7 @@ Gem::Specification.new do |spec|
22
22
  raise 'RubyGems 2.0 or newer is required' unless spec.respond_to?(:metadata)
23
23
 
24
24
  spec.metadata['homepage_uri'] = spec.homepage
25
+ spec.metadata['rubygems_mfa_required'] = 'true'
25
26
  spec.metadata['source_code_uri'] = spec.homepage
26
27
  spec.metadata['changelog_uri'] = "#{spec.homepage}/releases"
27
28
 
@@ -35,18 +36,9 @@ Gem::Specification.new do |spec|
35
36
 
36
37
  spec.required_ruby_version = '>= 2.5'
37
38
 
38
- spec.add_development_dependency 'bundler', '~> 2.0'
39
- spec.add_development_dependency 'pry'
40
- spec.add_development_dependency 'rake'
41
- spec.add_development_dependency 'rspec', '~> 3.8'
42
- spec.add_development_dependency 'rubocop', '1.20.0'
43
- spec.add_development_dependency 'rubocop-performance'
44
- spec.add_development_dependency 'rubocop-rake'
45
- spec.add_development_dependency 'rubocop-rspec'
46
-
47
- spec.add_runtime_dependency 'dry-core'
48
- spec.add_runtime_dependency 'dry-initializer'
49
- spec.add_runtime_dependency 'dry-initializer-rails'
50
- spec.add_runtime_dependency 'rails', '>= 5.2'
51
- spec.add_runtime_dependency 'thor'
39
+ spec.add_dependency 'dry-core'
40
+ spec.add_dependency 'dry-initializer'
41
+ spec.add_dependency 'dry-initializer-rails'
42
+ spec.add_dependency 'rails', '>= 5.2'
43
+ spec.add_dependency 'thor'
52
44
  end
@@ -3,24 +3,24 @@ module AuxiliaryRails
3
3
  # @abstract
4
4
  class Error < RuntimeError
5
5
  attr_accessor :context
6
- attr_reader :exception, :severity
6
+ attr_reader :exc, :severity
7
7
 
8
8
  class << self
9
9
  def i18n_scope
10
10
  "errors.#{name.underscore}"
11
11
  end
12
12
 
13
- # @return [self] Wraps exception into a new Application Error object
14
- def wrap(exception, context: {}, severity: nil)
15
- new(exception.message, context: context, exception: exception, severity: severity)
13
+ # @return [self] Wraps exception into a new ApplicationError object
14
+ def wrap(exc, context: {}, severity: nil)
15
+ new(exc.message, context: context, exc: exc, severity: severity)
16
16
  end
17
17
  end
18
18
 
19
- def initialize(message = nil, context: {}, exception: nil, severity: nil)
20
- super message
19
+ def initialize(message = nil, context: {}, exc: nil, severity: nil)
20
+ super(message)
21
21
 
22
22
  self.context = default_context.merge(context || {})
23
- self.exception = exception
23
+ self.exc = exc
24
24
  self.severity = severity&.to_sym || default_severity
25
25
  end
26
26
 
@@ -44,7 +44,7 @@ module AuxiliaryRails
44
44
 
45
45
  protected
46
46
 
47
- attr_writer :exception, :severity
47
+ attr_writer :exc, :severity
48
48
  end
49
49
  end
50
50
  end
@@ -73,19 +73,19 @@ module AuxiliaryRails
73
73
  def ensure_empty_errors!
74
74
  return if errors.empty?
75
75
 
76
- error!("`#{self.class}` contains errors.")
76
+ error!("'#{self.class}' contains errors.")
77
77
  end
78
78
 
79
79
  def ensure_empty_status!
80
80
  return if performable_status.nil?
81
81
 
82
- error!("`#{self.class}` was already executed.")
82
+ error!("'#{self.class}' was already executed.")
83
83
  end
84
84
 
85
85
  def ensure_execution!
86
86
  return if performable_status.present?
87
87
 
88
- error!("`#{self.class}` was not executed yet.")
88
+ error!("'#{self.class}' was not executed yet.")
89
89
  end
90
90
 
91
91
  # Sets command's status to <tt>failure</tt>.
@@ -1,3 +1,3 @@
1
1
  module AuxiliaryRails
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auxiliary_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Babenko
@@ -9,120 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-08-28 00:00:00.000000000 Z
12
+ date: 2023-07-21 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: bundler
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '2.0'
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '2.0'
28
- - !ruby/object:Gem::Dependency
29
- name: pry
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: '0'
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - ">="
40
- - !ruby/object:Gem::Version
41
- version: '0'
42
- - !ruby/object:Gem::Dependency
43
- name: rake
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: rspec
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: '3.8'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: '3.8'
70
- - !ruby/object:Gem::Dependency
71
- name: rubocop
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - '='
75
- - !ruby/object:Gem::Version
76
- version: 1.20.0
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - '='
82
- - !ruby/object:Gem::Version
83
- version: 1.20.0
84
- - !ruby/object:Gem::Dependency
85
- name: rubocop-performance
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: rubocop-rake
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
111
- version: '0'
112
- - !ruby/object:Gem::Dependency
113
- name: rubocop-rspec
114
- requirement: !ruby/object:Gem::Requirement
115
- requirements:
116
- - - ">="
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- requirements:
123
- - - ">="
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
14
  - !ruby/object:Gem::Dependency
127
15
  name: dry-core
128
16
  requirement: !ruby/object:Gem::Requirement
@@ -204,6 +92,9 @@ executables:
204
92
  extensions: []
205
93
  extra_rdoc_files: []
206
94
  files:
95
+ - ".github/workflows/main.yml"
96
+ - ".github/workflows/publish-gpr.yml"
97
+ - ".github/workflows/publish-rubygems.yml"
207
98
  - ".gitignore"
208
99
  - ".gitlab-ci.yml"
209
100
  - ".rspec"
@@ -270,6 +161,7 @@ licenses:
270
161
  - MIT
271
162
  metadata:
272
163
  homepage_uri: https://github.com/ergoserv/auxiliary_rails
164
+ rubygems_mfa_required: 'true'
273
165
  source_code_uri: https://github.com/ergoserv/auxiliary_rails
274
166
  changelog_uri: https://github.com/ergoserv/auxiliary_rails/releases
275
167
  post_install_message:
@@ -287,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
287
179
  - !ruby/object:Gem::Version
288
180
  version: '0'
289
181
  requirements: []
290
- rubygems_version: 3.1.6
182
+ rubygems_version: 3.4.15
291
183
  signing_key:
292
184
  specification_version: 4
293
185
  summary: AuxiliaryRails provides extra layers and utils for helping to build solid