subroutine 2.3.2 → 3.0.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: c3571693a24dd9d341127e6de4d29cd242d2afc31e5e569728d4dc9101dcd11d
4
- data.tar.gz: 72efb048aa00d5ba7be9c8a5c48fa6dd84c69ca71a6e1544373c96e85b3b0869
3
+ metadata.gz: 1d089cc45475bdb88ee182f34ef6cbfc2fcb4c77d039fce887fd3bd420a2f210
4
+ data.tar.gz: 454b7650e82cccfe16af31d8bb7ca5739763cacdcd1cab4ef810a25634dab480
5
5
  SHA512:
6
- metadata.gz: 97c717c09a9b7a2e8fcc76240c0cb1a928bb9a3407e5442e126a3cf0aa147f03d747c43ed44da1efa8258b0ade53242c3bf064141d51fe612769fe446b87ec5d
7
- data.tar.gz: ee2f52b5c450828495d2e5d5f11458edec8243487768570b6dcd09e5606a40637290222187c79344284353baaee206cf4833022d8983c5b5eb909809f037b1b3
6
+ metadata.gz: 43420206b0becfd866a4ec01aa757d20c780bb939ed666c94878c8c73645561672646b230850aa199652776204f50562c0b675b37973d6efcb9ce831fc3b4d9c
7
+ data.tar.gz: dc313998225594aac7480cbf9df3e5b539589c13ef041adccb39ef97c583f0608d8a5b7b7e55245d58816b98db159a8d4fedd42d39f6b72317add6670a3ac7cc
@@ -0,0 +1 @@
1
+ .github/workflows @guideline-tech/engineering
@@ -0,0 +1,24 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ open-pull-requests-limit: 20
6
+ schedule:
7
+ interval: "daily"
8
+ time: "09:00"
9
+ timezone: "America/New_York"
10
+ commit-message:
11
+ prefix: "[github-actions] "
12
+ - package-ecosystem: "bundler"
13
+ directory: "/"
14
+ schedule:
15
+ interval: "daily"
16
+ time: "08:30"
17
+ timezone: "America/New_York"
18
+ versioning-strategy: increase
19
+ open-pull-requests-limit: 20
20
+ insecure-external-code-execution: deny
21
+ allow:
22
+ - dependency-type: "all"
23
+ commit-message:
24
+ prefix: "[bundler] "
@@ -7,7 +7,7 @@ jobs:
7
7
  strategy:
8
8
  fail-fast: false
9
9
  matrix:
10
- ruby-version: [2.7.5, 2.7.6]
10
+ ruby-version: [2.7.8]
11
11
  experimental: [false]
12
12
  include:
13
13
  - ruby-version: 3.0
@@ -15,7 +15,7 @@ jobs:
15
15
  - ruby-version: 3.1
16
16
  experimental: true
17
17
  steps:
18
- - uses: actions/checkout@v2
18
+ - uses: actions/checkout@v3
19
19
  - uses: ruby/setup-ruby@v1
20
20
  with:
21
21
  ruby-version: ${{ matrix.ruby-version }}
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.5
1
+ 2.7.8
data/CHANGELOG.MD CHANGED
@@ -1,3 +1,7 @@
1
+ ## Subroutine 3.0
2
+
3
+ Add support for Rails 6.1. Drop support for Rails 6.0 and lower.
4
+
1
5
  ## Subroutine 2.2
2
6
 
3
7
  Add `type` validation for Output.
data/Gemfile CHANGED
@@ -5,4 +5,4 @@ source "https://rubygems.org"
5
5
  # Specify your gem's dependencies in subroutine.gemspec
6
6
  gemspec
7
7
 
8
- eval_gemfile "gemfiles/am60.gemfile"
8
+ eval_gemfile "gemfiles/am61.gemfile"
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'activemodel', '~> 6.1.0'
4
+ gem 'actionpack', '~> 6.1.0'
data/lib/subroutine/op.rb CHANGED
@@ -112,9 +112,10 @@ module Subroutine
112
112
  end
113
113
 
114
114
  def inherit_errors(error_object, prefix: nil)
115
- error_object = error_object.errors if error_object.respond_to?(:errors)
115
+ error_object = error_object.errors if error_object.respond_to?(:errors) && !error_object.is_a?(ActiveModel::Errors)
116
116
 
117
- error_object.each do |field_name, error|
117
+ error_object.each do |error|
118
+ field_name = error.attribute
118
119
  field_name = "#{prefix}#{field_name}" if prefix
119
120
  field_name = field_name.to_sym
120
121
 
@@ -125,9 +126,9 @@ module Subroutine
125
126
  end
126
127
 
127
128
  if field_config
128
- errors.add(field_config.field_name, error)
129
+ errors.add(field_config.field_name, error.message)
129
130
  else
130
- errors.add(:base, error_object.full_message(field_name, error))
131
+ errors.add(:base, error_object.full_message(field_name, error.message))
131
132
  end
132
133
  end
133
134
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  module Subroutine
4
4
 
5
- MAJOR = 2
6
- MINOR = 3
7
- PATCH = 2
5
+ MAJOR = 3
6
+ MINOR = 0
7
+ PATCH = 0
8
8
  PRE = nil
9
9
 
10
10
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
data/subroutine.gemspec CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(gemfiles|test)/})
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.add_dependency "activemodel", ">= 4.0.0"
23
- spec.add_dependency "activesupport", ">= 4.0.0"
22
+ spec.add_dependency "activemodel", ">= 6.1"
23
+ spec.add_dependency "activesupport", ">= 6.1"
24
24
 
25
- spec.add_development_dependency "actionpack", ">= 4.0"
25
+ spec.add_development_dependency "actionpack", ">= 6.1"
26
26
  spec.add_development_dependency "bundler"
27
27
  spec.add_development_dependency "byebug"
28
28
  spec.add_development_dependency "m"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subroutine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Nelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-27 00:00:00.000000000 Z
11
+ date: 2023-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.0.0
19
+ version: '6.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.0.0
26
+ version: '6.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 4.0.0
33
+ version: '6.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 4.0.0
40
+ version: '6.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: actionpack
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '4.0'
47
+ version: '6.1'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '4.0'
54
+ version: '6.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -157,6 +157,8 @@ executables: []
157
157
  extensions: []
158
158
  extra_rdoc_files: []
159
159
  files:
160
+ - ".github/CODEOWNERS"
161
+ - ".github/dependabot.yml"
160
162
  - ".github/workflows/build.yml"
161
163
  - ".gitignore"
162
164
  - ".ruby-gemset"
@@ -166,12 +168,7 @@ files:
166
168
  - LICENSE.txt
167
169
  - README.md
168
170
  - Rakefile
169
- - gemfiles/am41.gemfile
170
- - gemfiles/am42.gemfile
171
- - gemfiles/am50.gemfile
172
- - gemfiles/am51.gemfile
173
- - gemfiles/am52.gemfile
174
- - gemfiles/am60.gemfile
171
+ - gemfiles/am61.gemfile
175
172
  - lib/subroutine.rb
176
173
  - lib/subroutine/association_fields.rb
177
174
  - lib/subroutine/association_fields/association_type_mismatch_error.rb
@@ -220,17 +217,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
217
  - !ruby/object:Gem::Version
221
218
  version: '0'
222
219
  requirements: []
223
- rubygems_version: 3.3.23
220
+ rubygems_version: 3.4.10
224
221
  signing_key:
225
222
  specification_version: 4
226
223
  summary: Feature-driven operation objects.
227
224
  test_files:
228
- - gemfiles/am41.gemfile
229
- - gemfiles/am42.gemfile
230
- - gemfiles/am50.gemfile
231
- - gemfiles/am51.gemfile
232
- - gemfiles/am52.gemfile
233
- - gemfiles/am60.gemfile
225
+ - gemfiles/am61.gemfile
234
226
  - test/subroutine/association_test.rb
235
227
  - test/subroutine/auth_test.rb
236
228
  - test/subroutine/base_test.rb
@@ -1,7 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
4
-
5
- gem 'rack'
6
- gem 'activemodel', '~> 4.1.0'
7
- gem 'actionpack', '~> 4.1.0'
@@ -1,7 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
4
-
5
- gem 'rack'
6
- gem 'activemodel', '~> 4.2.0'
7
- gem 'actionpack', '~> 4.2.0'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
4
-
5
- gem 'activemodel', '~> 5.0.0'
6
- gem 'actionpack', '~> 5.0.0'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
4
-
5
- gem 'activemodel', '~> 5.1.0'
6
- gem 'actionpack', '~> 5.1.0'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
4
-
5
- gem 'activemodel', '~> 5.2.0'
6
- gem 'actionpack', '~> 5.2.0'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec :path => '../'
4
-
5
- gem 'activemodel', '~> 6.0.0'
6
- gem 'actionpack', '~> 6.0.0'