rails_ops 1.8.0 → 1.8.2

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: d983d20a0a0bf3e1b7e967d0dbd16aec64f253c8a7a12e7c6b72f9f6f676b604
4
- data.tar.gz: 00a7b268b2337ba5b2cf57855b9d611a7c9dbe3492cd9484345ad1f7956b2b27
3
+ metadata.gz: 301c49356e3189c3b035d90a9f8bca818b7003172946dd38e90a7f7d68da427e
4
+ data.tar.gz: c8ee69f479cac87ee07a0fa3092db8a8c483681ee4e9bf8398b53f3bb6d48b26
5
5
  SHA512:
6
- metadata.gz: 9a50ef1e82a5a82e1adddb76435389babd2f34a6fe3e4f80c06bf3ec061b26235fa80541cfbfdab6fdc43f253245b388b1b376d8032e090c510fe1a4f2edc591
7
- data.tar.gz: fca76d3c3c65cc564744596dd298e8a52e69320cd0eb5952750e689dc879b21dce5dab13dd6372456108ea367aa536a62e40a58d4c069af5ab78eb214167c3be
6
+ metadata.gz: 53bf09063fb79dc55679975232efbb0e76200b63b1a9573d15e8430e155812c07f4ef17b6664e31a62a54c7f1daa37b281f57edd62d3b4d2b7e57930084a45ba
7
+ data.tar.gz: 5d419519712e506956ad28a53dea7b273f3d2998bb6e5b9cb56f36ed275cd707a278afe49713451afb1a3fcb56371991b944be4c3f0da462c43daeb1ca59ce8e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.8.2 (2026-09-09)
4
+
5
+ * Relax the `schemacop` requirement from `>= 3.0.0`, `<= 3.1` to `>= 3.0.0`,
6
+ `< 4`. `<= 3.1` excluded every release after `3.1.0`, so an application
7
+ could not resolve `schemacop` `3.1.1` alongside RailsOps.
8
+
9
+ ## 1.8.1 (2026-05-27)
10
+
11
+ * Add explicit `**kwargs` forwarding to `schema2` and `schema`. These
12
+ methods never properly supported keyword arguments — it only appeared
13
+ to work under Ruby 2 due to its implicit hash-to-kwargs conversion.
14
+ Calls like `schema2 policy_chain: :on_init do ... end` now work
15
+ correctly on all supported Ruby versions.
16
+
17
+ Internal reference: `#149499`.
18
+
3
19
  ## 1.8.0 (2026-05-07)
4
20
 
5
21
  * `Operation#run` (non-bang) now wraps the call to `run!` in a
data/Gemfile.lock CHANGED
@@ -1,95 +1,91 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_ops (1.8.0)
4
+ rails_ops (1.8.2)
5
5
  active_type (>= 1.3.0)
6
6
  minitest
7
7
  rails (> 4)
8
8
  request_store
9
- schemacop (>= 3.0.0, <= 3.1)
9
+ schemacop (>= 3.0.0, < 4)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actioncable (7.1.5.2)
15
- actionpack (= 7.1.5.2)
16
- activesupport (= 7.1.5.2)
14
+ actioncable (7.2.3.2)
15
+ actionpack (= 7.2.3.2)
16
+ activesupport (= 7.2.3.2)
17
17
  nio4r (~> 2.0)
18
18
  websocket-driver (>= 0.6.1)
19
19
  zeitwerk (~> 2.6)
20
- actionmailbox (7.1.5.2)
21
- actionpack (= 7.1.5.2)
22
- activejob (= 7.1.5.2)
23
- activerecord (= 7.1.5.2)
24
- activestorage (= 7.1.5.2)
25
- activesupport (= 7.1.5.2)
26
- mail (>= 2.7.1)
27
- net-imap
28
- net-pop
29
- net-smtp
30
- actionmailer (7.1.5.2)
31
- actionpack (= 7.1.5.2)
32
- actionview (= 7.1.5.2)
33
- activejob (= 7.1.5.2)
34
- activesupport (= 7.1.5.2)
35
- mail (~> 2.5, >= 2.5.4)
36
- net-imap
37
- net-pop
38
- net-smtp
20
+ actionmailbox (7.2.3.2)
21
+ actionpack (= 7.2.3.2)
22
+ activejob (= 7.2.3.2)
23
+ activerecord (= 7.2.3.2)
24
+ activestorage (= 7.2.3.2)
25
+ activesupport (= 7.2.3.2)
26
+ mail (>= 2.8.0)
27
+ actionmailer (7.2.3.2)
28
+ actionpack (= 7.2.3.2)
29
+ actionview (= 7.2.3.2)
30
+ activejob (= 7.2.3.2)
31
+ activesupport (= 7.2.3.2)
32
+ mail (>= 2.8.0)
39
33
  rails-dom-testing (~> 2.2)
40
- actionpack (7.1.5.2)
41
- actionview (= 7.1.5.2)
42
- activesupport (= 7.1.5.2)
34
+ actionpack (7.2.3.2)
35
+ actionview (= 7.2.3.2)
36
+ activesupport (= 7.2.3.2)
37
+ cgi
43
38
  nokogiri (>= 1.8.5)
44
39
  racc
45
- rack (>= 2.2.4)
40
+ rack (>= 2.2.4, < 3.3)
46
41
  rack-session (>= 1.0.1)
47
42
  rack-test (>= 0.6.3)
48
43
  rails-dom-testing (~> 2.2)
49
44
  rails-html-sanitizer (~> 1.6)
50
- actiontext (7.1.5.2)
51
- actionpack (= 7.1.5.2)
52
- activerecord (= 7.1.5.2)
53
- activestorage (= 7.1.5.2)
54
- activesupport (= 7.1.5.2)
45
+ useragent (~> 0.16)
46
+ actiontext (7.2.3.2)
47
+ actionpack (= 7.2.3.2)
48
+ activerecord (= 7.2.3.2)
49
+ activestorage (= 7.2.3.2)
50
+ activesupport (= 7.2.3.2)
55
51
  globalid (>= 0.6.0)
56
52
  nokogiri (>= 1.8.5)
57
- actionview (7.1.5.2)
58
- activesupport (= 7.1.5.2)
53
+ actionview (7.2.3.2)
54
+ activesupport (= 7.2.3.2)
59
55
  builder (~> 3.1)
56
+ cgi
60
57
  erubi (~> 1.11)
61
58
  rails-dom-testing (~> 2.2)
62
59
  rails-html-sanitizer (~> 1.6)
63
60
  active_type (2.5.0)
64
61
  activerecord (>= 3.2)
65
- activejob (7.1.5.2)
66
- activesupport (= 7.1.5.2)
62
+ activejob (7.2.3.2)
63
+ activesupport (= 7.2.3.2)
67
64
  globalid (>= 0.3.6)
68
- activemodel (7.1.5.2)
69
- activesupport (= 7.1.5.2)
70
- activerecord (7.1.5.2)
71
- activemodel (= 7.1.5.2)
72
- activesupport (= 7.1.5.2)
65
+ activemodel (7.2.3.2)
66
+ activesupport (= 7.2.3.2)
67
+ activerecord (7.2.3.2)
68
+ activemodel (= 7.2.3.2)
69
+ activesupport (= 7.2.3.2)
73
70
  timeout (>= 0.4.0)
74
- activestorage (7.1.5.2)
75
- actionpack (= 7.1.5.2)
76
- activejob (= 7.1.5.2)
77
- activerecord (= 7.1.5.2)
78
- activesupport (= 7.1.5.2)
71
+ activestorage (7.2.3.2)
72
+ actionpack (= 7.2.3.2)
73
+ activejob (= 7.2.3.2)
74
+ activerecord (= 7.2.3.2)
75
+ activesupport (= 7.2.3.2)
79
76
  marcel (~> 1.0)
80
- activesupport (7.1.5.2)
77
+ activesupport (7.2.3.2)
81
78
  base64
82
79
  benchmark (>= 0.3)
83
80
  bigdecimal
84
- concurrent-ruby (~> 1.0, >= 1.0.2)
81
+ concurrent-ruby (~> 1.0, >= 1.3.1)
85
82
  connection_pool (>= 2.2.5)
86
83
  drb
87
84
  i18n (>= 1.6, < 2)
88
85
  logger (>= 1.4.2)
89
- minitest (>= 5.1)
90
- mutex_m
86
+ minitest (>= 5.1, < 6)
91
87
  securerandom (>= 0.3)
92
- tzinfo (~> 2.0)
88
+ tzinfo (~> 2.0, >= 2.0.5)
93
89
  appraisal (2.4.1)
94
90
  bundler
95
91
  rake
@@ -97,29 +93,32 @@ GEM
97
93
  ast (2.4.2)
98
94
  base64 (0.3.0)
99
95
  benchmark (0.5.0)
100
- bigdecimal (4.0.1)
101
- builder (3.2.4)
96
+ bigdecimal (4.1.2)
97
+ builder (3.3.0)
102
98
  cancancan (3.5.0)
99
+ cgi (0.5.2)
103
100
  coderay (1.1.3)
104
- concurrent-ruby (1.3.6)
101
+ concurrent-ruby (1.3.8)
105
102
  connection_pool (3.0.2)
106
- crass (1.0.6)
103
+ crass (1.0.7)
107
104
  date (3.5.1)
108
105
  docile (1.4.0)
109
106
  drb (2.2.3)
110
- erubi (1.12.0)
111
- globalid (1.2.1)
107
+ erubi (1.13.1)
108
+ globalid (1.4.0)
112
109
  activesupport (>= 6.1)
113
- i18n (1.14.8)
110
+ i18n (1.15.2)
114
111
  concurrent-ruby (~> 1.0)
115
112
  io-console (0.7.2)
116
- irb (1.11.2)
117
- rdoc
113
+ irb (1.18.0)
114
+ pp (>= 0.6.0)
115
+ prism (>= 1.3.0)
116
+ rdoc (>= 4.0.0)
118
117
  reline (>= 0.4.2)
119
118
  json (2.9.1)
120
119
  language_server-protocol (3.17.0.3)
121
120
  logger (1.7.0)
122
- loofah (2.22.0)
121
+ loofah (2.25.2)
123
122
  crass (~> 1.0.2)
124
123
  nokogiri (>= 1.12.0)
125
124
  mail (2.8.1)
@@ -127,12 +126,11 @@ GEM
127
126
  net-imap
128
127
  net-pop
129
128
  net-smtp
130
- marcel (1.0.4)
129
+ marcel (1.2.1)
131
130
  method_source (1.0.0)
132
131
  mini_mime (1.1.5)
133
132
  minitest (5.27.0)
134
- mutex_m (0.3.0)
135
- net-imap (0.4.24)
133
+ net-imap (0.5.15)
136
134
  date
137
135
  net-protocol
138
136
  net-pop (0.1.2)
@@ -142,16 +140,20 @@ GEM
142
140
  net-smtp (0.4.0.1)
143
141
  net-protocol
144
142
  nio4r (2.7.0)
145
- nokogiri (1.19.1-arm64-darwin)
143
+ nokogiri (1.19.4-arm64-darwin)
146
144
  racc (~> 1.4)
147
- nokogiri (1.19.1-x86_64-darwin)
145
+ nokogiri (1.19.4-x86_64-darwin)
148
146
  racc (~> 1.4)
149
- nokogiri (1.19.1-x86_64-linux-gnu)
147
+ nokogiri (1.19.4-x86_64-linux-gnu)
150
148
  racc (~> 1.4)
151
149
  parallel (1.26.3)
152
150
  parser (3.3.7.0)
153
151
  ast (~> 2.4.1)
154
152
  racc
153
+ pp (0.6.4)
154
+ prettyprint
155
+ prettyprint (0.2.0)
156
+ prism (1.9.0)
155
157
  pry (0.14.2)
156
158
  coderay (~> 1.1)
157
159
  method_source (~> 1.0)
@@ -162,39 +164,41 @@ GEM
162
164
  rack-session (2.1.2)
163
165
  base64 (>= 0.1.0)
164
166
  rack (>= 3.0.0)
165
- rack-test (2.1.0)
167
+ rack-test (2.2.0)
166
168
  rack (>= 1.3)
167
169
  rackup (2.1.0)
168
170
  rack (>= 3)
169
171
  webrick (~> 1.8)
170
- rails (7.1.5.2)
171
- actioncable (= 7.1.5.2)
172
- actionmailbox (= 7.1.5.2)
173
- actionmailer (= 7.1.5.2)
174
- actionpack (= 7.1.5.2)
175
- actiontext (= 7.1.5.2)
176
- actionview (= 7.1.5.2)
177
- activejob (= 7.1.5.2)
178
- activemodel (= 7.1.5.2)
179
- activerecord (= 7.1.5.2)
180
- activestorage (= 7.1.5.2)
181
- activesupport (= 7.1.5.2)
172
+ rails (7.2.3.2)
173
+ actioncable (= 7.2.3.2)
174
+ actionmailbox (= 7.2.3.2)
175
+ actionmailer (= 7.2.3.2)
176
+ actionpack (= 7.2.3.2)
177
+ actiontext (= 7.2.3.2)
178
+ actionview (= 7.2.3.2)
179
+ activejob (= 7.2.3.2)
180
+ activemodel (= 7.2.3.2)
181
+ activerecord (= 7.2.3.2)
182
+ activestorage (= 7.2.3.2)
183
+ activesupport (= 7.2.3.2)
182
184
  bundler (>= 1.15.0)
183
- railties (= 7.1.5.2)
184
- rails-dom-testing (2.2.0)
185
+ railties (= 7.2.3.2)
186
+ rails-dom-testing (2.3.0)
185
187
  activesupport (>= 5.0.0)
186
188
  minitest
187
189
  nokogiri (>= 1.6)
188
- rails-html-sanitizer (1.6.0)
189
- loofah (~> 2.21)
190
- nokogiri (~> 1.14)
191
- railties (7.1.5.2)
192
- actionpack (= 7.1.5.2)
193
- activesupport (= 7.1.5.2)
194
- irb
190
+ rails-html-sanitizer (1.7.1)
191
+ loofah (~> 2.25, >= 2.25.2)
192
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
193
+ railties (7.2.3.2)
194
+ actionpack (= 7.2.3.2)
195
+ activesupport (= 7.2.3.2)
196
+ cgi
197
+ irb (~> 1.13)
195
198
  rackup (>= 1.0.0)
196
199
  rake (>= 12.2)
197
200
  thor (~> 1.0, >= 1.2.2)
201
+ tsort (>= 0.2)
198
202
  zeitwerk (~> 2.6)
199
203
  rainbow (3.1.1)
200
204
  rake (13.1.0)
@@ -219,9 +223,9 @@ GEM
219
223
  parser (>= 3.3.1.0)
220
224
  ruby-progressbar (1.13.0)
221
225
  ruby2_keywords (0.0.4)
222
- schemacop (3.0.22)
226
+ schemacop (3.1.1)
223
227
  activesupport (>= 4.0)
224
- ruby2_keywords (= 0.0.4)
228
+ ruby2_keywords (>= 0.0.4)
225
229
  securerandom (0.4.1)
226
230
  simplecov (0.22.0)
227
231
  docile (~> 1.1)
@@ -242,13 +246,16 @@ GEM
242
246
  stringio (3.1.0)
243
247
  thor (1.3.1)
244
248
  timeout (0.6.1)
249
+ tsort (0.2.0)
245
250
  tzinfo (2.0.6)
246
251
  concurrent-ruby (~> 1.0)
247
252
  unicode-display_width (3.1.4)
248
253
  unicode-emoji (~> 4.0, >= 4.0.4)
249
254
  unicode-emoji (4.0.4)
255
+ useragent (0.16.11)
250
256
  webrick (1.8.2)
251
- websocket-driver (0.7.6)
257
+ websocket-driver (0.8.2)
258
+ base64
252
259
  websocket-extensions (>= 0.1.0)
253
260
  websocket-extensions (0.1.5)
254
261
  zeitwerk (2.6.13)
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ task :gemspec do
21
21
  spec.add_dependency 'minitest'
22
22
  spec.add_dependency 'rails', '> 4'
23
23
  spec.add_dependency 'request_store'
24
- spec.add_dependency 'schemacop', '>= 3.0.0', '<= 3.1'
24
+ spec.add_dependency 'schemacop', '>= 3.0.0', '< 4'
25
25
  end
26
26
 
27
27
  File.write('rails_ops.gemspec', gemspec.to_ruby.strip)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.0
1
+ 1.8.2
@@ -22,27 +22,44 @@ module RailsOps::Mixins::SchemaValidation
22
22
  # Only one schema can be active at a time. Defining multiple schemata or
23
23
  # defining schemas in a subclass always override previously defined schemas.
24
24
  #
25
- # @param *args [Array] Parameters to pass at schema initialization
25
+ # @param *args [Array] Positional parameters to pass at schema
26
+ # initialization
27
+ # @param **kwargs [Hash] Keyword arguments to pass at schema
28
+ # initialization
26
29
  # @yield Block to pass at schema initialization
27
- def schema2(*args, &block)
28
- if args.any? || block_given?
29
- self._op_schema = Schemacop::Schema.new(*args, &block)
30
+ def schema2(*args, **kwargs, &block)
31
+ if args.any? || kwargs.any? || block_given?
32
+ self._op_schema = Schemacop::Schema.new(*args, **kwargs, &block)
30
33
  else
31
34
  # Define empty schema (not possible with V2 schema).
32
35
  schema3
33
36
  end
34
37
  end
35
38
 
39
+ # @param type [Symbol] Root node type (default: `:hash`)
40
+ # @param *args [Array] Positional parameters to pass at schema
41
+ # initialization
42
+ # @param **kwargs [Hash] Keyword arguments to pass at schema
43
+ # initialization
44
+ # @yield Block to pass at schema initialization
36
45
  def schema3(type = :hash, *args, **kwargs, &block)
37
46
  self._op_schema = Schemacop::Schema3.new(type, *args, **kwargs, &block)
38
47
  end
39
48
 
40
- def schema(*args, &block)
49
+ # Delegates to {#schema2} or {#schema3} based on
50
+ # {RailsOps.config.default_schemacop_version}.
51
+ #
52
+ # @param *args [Array] Positional parameters to pass at schema
53
+ # initialization
54
+ # @param **kwargs [Hash] Keyword arguments to pass at schema
55
+ # initialization
56
+ # @yield Block to pass at schema initialization
57
+ def schema(*args, **kwargs, &block)
41
58
  case RailsOps.config.default_schemacop_version
42
59
  when 2
43
- schema2(*args, &block)
60
+ schema2(*args, **kwargs, &block)
44
61
  when 3
45
- schema3(*args, &block)
62
+ schema3(*args, **kwargs, &block)
46
63
  else
47
64
  fail 'Schemacop schema versions supported are 2 and 3.'
48
65
  end
data/rails_ops.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: rails_ops 1.8.0 ruby lib
2
+ # stub: rails_ops 1.8.2 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "rails_ops".freeze
6
- s.version = "1.8.0"
6
+ s.version = "1.8.2"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Sitrox".freeze]
11
- s.date = "2026-05-07"
11
+ s.date = "2026-09-09"
12
12
  s.files = [".github/workflows/rubocop.yml".freeze, ".github/workflows/ruby.yml".freeze, ".gitignore".freeze, ".releaser_config".freeze, ".rubocop.yml".freeze, "Appraisals".freeze, "CHANGELOG.md".freeze, "CLAUDE.md".freeze, "Gemfile".freeze, "Gemfile.lock".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "gemfiles/rails_6.0.gemfile".freeze, "gemfiles/rails_6.1.gemfile".freeze, "gemfiles/rails_7.0.gemfile".freeze, "gemfiles/rails_7.1.gemfile".freeze, "gemfiles/rails_7.2.gemfile".freeze, "gemfiles/rails_8.0.gemfile".freeze, "lib/generators/operation/USAGE".freeze, "lib/generators/operation/operation_generator.rb".freeze, "lib/generators/operation/templates/controller.erb".freeze, "lib/generators/operation/templates/controller_wrapper.erb".freeze, "lib/generators/operation/templates/create.erb".freeze, "lib/generators/operation/templates/destroy.erb".freeze, "lib/generators/operation/templates/load.erb".freeze, "lib/generators/operation/templates/update.erb".freeze, "lib/generators/operation/templates/view.erb".freeze, "lib/rails_ops.rb".freeze, "lib/rails_ops/authorization_backend/abstract.rb".freeze, "lib/rails_ops/authorization_backend/can_can_can.rb".freeze, "lib/rails_ops/configuration.rb".freeze, "lib/rails_ops/context.rb".freeze, "lib/rails_ops/controller_mixin.rb".freeze, "lib/rails_ops/exceptions.rb".freeze, "lib/rails_ops/hooked_job.rb".freeze, "lib/rails_ops/hookup.rb".freeze, "lib/rails_ops/hookup/dsl.rb".freeze, "lib/rails_ops/hookup/dsl_validator.rb".freeze, "lib/rails_ops/hookup/hook.rb".freeze, "lib/rails_ops/log_subscriber.rb".freeze, "lib/rails_ops/mixins.rb".freeze, "lib/rails_ops/mixins/authorization.rb".freeze, "lib/rails_ops/mixins/log_settings.rb".freeze, "lib/rails_ops/mixins/model.rb".freeze, "lib/rails_ops/mixins/model/authorization.rb".freeze, "lib/rails_ops/mixins/model/nesting.rb".freeze, "lib/rails_ops/mixins/param_authorization.rb".freeze, "lib/rails_ops/mixins/policies.rb".freeze, "lib/rails_ops/mixins/require_context.rb".freeze, "lib/rails_ops/mixins/routes.rb".freeze, "lib/rails_ops/mixins/schema_validation.rb".freeze, "lib/rails_ops/mixins/sub_ops.rb".freeze, "lib/rails_ops/model_mixins.rb".freeze, "lib/rails_ops/model_mixins/ar_extension.rb".freeze, "lib/rails_ops/model_mixins/marshalling.rb".freeze, "lib/rails_ops/model_mixins/parent_op.rb".freeze, "lib/rails_ops/model_mixins/sti_fixes.rb".freeze, "lib/rails_ops/model_mixins/virtual_attributes.rb".freeze, "lib/rails_ops/model_mixins/virtual_attributes/virtual_column_wrapper.rb".freeze, "lib/rails_ops/model_mixins/virtual_has_one.rb".freeze, "lib/rails_ops/model_mixins/virtual_model_name.rb".freeze, "lib/rails_ops/operation.rb".freeze, "lib/rails_ops/operation/model.rb".freeze, "lib/rails_ops/operation/model/create.rb".freeze, "lib/rails_ops/operation/model/destroy.rb".freeze, "lib/rails_ops/operation/model/load.rb".freeze, "lib/rails_ops/operation/model/update.rb".freeze, "lib/rails_ops/profiler.rb".freeze, "lib/rails_ops/profiler/node.rb".freeze, "lib/rails_ops/railtie.rb".freeze, "lib/rails_ops/scoped_env.rb".freeze, "lib/rails_ops/virtual_model.rb".freeze, "rails_ops.gemspec".freeze, "test/db/models.rb".freeze, "test/db/schema.rb".freeze, "test/dummy/Rakefile".freeze, "test/dummy/app/assets/config/manifest.js".freeze, "test/dummy/app/assets/images/.keep".freeze, "test/dummy/app/assets/javascripts/application.js".freeze, "test/dummy/app/assets/javascripts/cable.js".freeze, "test/dummy/app/assets/javascripts/channels/.keep".freeze, "test/dummy/app/assets/stylesheets/application.css".freeze, "test/dummy/app/channels/application_cable/channel.rb".freeze, "test/dummy/app/channels/application_cable/connection.rb".freeze, "test/dummy/app/controllers/application_controller.rb".freeze, "test/dummy/app/controllers/concerns/.keep".freeze, "test/dummy/app/controllers/group_controller.rb".freeze, "test/dummy/app/helpers/application_helper.rb".freeze, "test/dummy/app/jobs/application_job.rb".freeze, "test/dummy/app/mailers/application_mailer.rb".freeze, "test/dummy/app/models/ability.rb".freeze, "test/dummy/app/models/animal.rb".freeze, "test/dummy/app/models/application_record.rb".freeze, "test/dummy/app/models/bird.rb".freeze, "test/dummy/app/models/cat.rb".freeze, "test/dummy/app/models/computer.rb".freeze, "test/dummy/app/models/concerns/.keep".freeze, "test/dummy/app/models/cpu.rb".freeze, "test/dummy/app/models/dog.rb".freeze, "test/dummy/app/models/flower.rb".freeze, "test/dummy/app/models/group.rb".freeze, "test/dummy/app/models/mainboard.rb".freeze, "test/dummy/app/models/nightingale.rb".freeze, "test/dummy/app/models/phoenix.rb".freeze, "test/dummy/app/models/user.rb".freeze, "test/dummy/app/views/layouts/application.html.erb".freeze, "test/dummy/app/views/layouts/mailer.html.erb".freeze, "test/dummy/app/views/layouts/mailer.text.erb".freeze, "test/dummy/bin/bundle".freeze, "test/dummy/bin/rails".freeze, "test/dummy/bin/rake".freeze, "test/dummy/bin/setup".freeze, "test/dummy/bin/update".freeze, "test/dummy/bin/yarn".freeze, "test/dummy/config.ru".freeze, "test/dummy/config/application.rb".freeze, "test/dummy/config/boot.rb".freeze, "test/dummy/config/cable.yml".freeze, "test/dummy/config/database.yml".freeze, "test/dummy/config/environment.rb".freeze, "test/dummy/config/environments/development.rb".freeze, "test/dummy/config/environments/production.rb".freeze, "test/dummy/config/environments/test.rb".freeze, "test/dummy/config/hookup.rb".freeze, "test/dummy/config/initializers/application_controller_renderer.rb".freeze, "test/dummy/config/initializers/assets.rb".freeze, "test/dummy/config/initializers/backtrace_silencers.rb".freeze, "test/dummy/config/initializers/cookies_serializer.rb".freeze, "test/dummy/config/initializers/filter_parameter_logging.rb".freeze, "test/dummy/config/initializers/inflections.rb".freeze, "test/dummy/config/initializers/mime_types.rb".freeze, "test/dummy/config/initializers/rails_ops.rb".freeze, "test/dummy/config/initializers/wrap_parameters.rb".freeze, "test/dummy/config/locales/en.yml".freeze, "test/dummy/config/puma.rb".freeze, "test/dummy/config/routes.rb".freeze, "test/dummy/config/secrets.yml".freeze, "test/dummy/config/spring.rb".freeze, "test/dummy/db/schema.rb".freeze, "test/dummy/lib/assets/.keep".freeze, "test/dummy/log/.keep".freeze, "test/dummy/package.json".freeze, "test/dummy/public/404.html".freeze, "test/dummy/public/422.html".freeze, "test/dummy/public/500.html".freeze, "test/dummy/public/apple-touch-icon-precomposed.png".freeze, "test/dummy/public/apple-touch-icon.png".freeze, "test/dummy/public/favicon.ico".freeze, "test/dummy/tmp/.keep".freeze, "test/test_helper.rb".freeze, "test/unit/rails_ops/generators/operation_generator_test.rb".freeze, "test/unit/rails_ops/hookup_test.rb".freeze, "test/unit/rails_ops/mixins/controller_test.rb".freeze, "test/unit/rails_ops/mixins/model/deep_nesting_test.rb".freeze, "test/unit/rails_ops/mixins/model/marshalling_test.rb".freeze, "test/unit/rails_ops/mixins/param_authorization_test.rb".freeze, "test/unit/rails_ops/mixins/policies_test.rb".freeze, "test/unit/rails_ops/operation/auth_test.rb".freeze, "test/unit/rails_ops/operation/model/create_test.rb".freeze, "test/unit/rails_ops/operation/model/destroy_test.rb".freeze, "test/unit/rails_ops/operation/model/load_test.rb".freeze, "test/unit/rails_ops/operation/model/sti_test.rb".freeze, "test/unit/rails_ops/operation/model/update_test.rb".freeze, "test/unit/rails_ops/operation/model_test.rb".freeze, "test/unit/rails_ops/operation/update_lazy_auth_test.rb".freeze, "test/unit/rails_ops/operation_test.rb".freeze, "test/unit/rails_ops/profiler_test.rb".freeze, "test/unit/rails_ops/railtie_test.rb".freeze]
13
13
  s.homepage = "https://github.com/sitrox/rails_ops".freeze
14
14
  s.licenses = ["MIT".freeze]
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
22
22
  s.add_runtime_dependency(%q<minitest>.freeze, [">= 0"])
23
23
  s.add_runtime_dependency(%q<rails>.freeze, ["> 4"])
24
24
  s.add_runtime_dependency(%q<request_store>.freeze, [">= 0"])
25
- s.add_runtime_dependency(%q<schemacop>.freeze, [">= 3.0.0", "<= 3.1"])
25
+ s.add_runtime_dependency(%q<schemacop>.freeze, [">= 3.0.0", "< 4"])
26
26
  end
@@ -450,6 +450,79 @@ class RailsOps::OperationTest < ActiveSupport::TestCase
450
450
  end
451
451
  end
452
452
 
453
+ def test_schema2_with_kwargs
454
+ op = Class.new(RailsOps::Operation) do
455
+ schema2 policy_chain: :on_init do
456
+ req :id, :integer
457
+ end
458
+ def perform; end
459
+ end
460
+
461
+ op.run!(id: 1)
462
+ assert_raises Schemacop::Exceptions::ValidationError do
463
+ op.run!(id: 'not_an_integer')
464
+ end
465
+ end
466
+
467
+ def test_schema2_with_kwargs_only
468
+ op = Class.new(RailsOps::Operation) do
469
+ schema2 policy_chain: :on_init
470
+ def perform; end
471
+ end
472
+
473
+ assert op._op_schema.is_a?(Schemacop::Schema2)
474
+ end
475
+
476
+ def test_schema3_with_kwargs
477
+ op = Class.new(RailsOps::Operation) do
478
+ schema3 :hash, title: 'test' do
479
+ int! :id
480
+ end
481
+ def perform; end
482
+ end
483
+
484
+ op.run!(id: 1)
485
+ assert_raises Schemacop::Exceptions::ValidationError do
486
+ op.run!(id: 'not_an_integer')
487
+ end
488
+ end
489
+
490
+ def test_schema_default_v2_with_kwargs
491
+ original = RailsOps.config.default_schemacop_version
492
+ RailsOps.config.default_schemacop_version = 2
493
+ op = Class.new(RailsOps::Operation) do
494
+ schema policy_chain: :on_init do
495
+ req :id, :integer
496
+ end
497
+ def perform; end
498
+ end
499
+
500
+ op.run!(id: 1)
501
+ assert_raises Schemacop::Exceptions::ValidationError do
502
+ op.run!(id: 'not_an_integer')
503
+ end
504
+ ensure
505
+ RailsOps.config.default_schemacop_version = original
506
+ end
507
+
508
+ def test_schema_default_v3_with_kwargs
509
+ original = RailsOps.config.default_schemacop_version
510
+ RailsOps.config.default_schemacop_version = 3
511
+ op = Class.new(RailsOps::Operation) do
512
+ schema title: 'test' do
513
+ int! :id
514
+ end
515
+ def perform; end
516
+ end
517
+
518
+ op.run!(id: 1)
519
+ assert_raises Schemacop::Exceptions::ValidationError do
520
+ op.run!(id: 'not_an_integer')
521
+ end
522
+ ensure
523
+ RailsOps.config.default_schemacop_version = original
524
+ end
525
+
453
526
  def test_op_with_schema_default
454
527
  RailsOps.config.default_schemacop_version = 3
455
528
  test_op_with_schema3(use_default: true)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_ops
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sitrox
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-05-07 00:00:00.000000000 Z
10
+ date: 2026-09-09 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: active_type
@@ -72,9 +72,9 @@ dependencies:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: 3.0.0
75
- - - "<="
75
+ - - "<"
76
76
  - !ruby/object:Gem::Version
77
- version: '3.1'
77
+ version: '4'
78
78
  type: :runtime
79
79
  prerelease: false
80
80
  version_requirements: !ruby/object:Gem::Requirement
@@ -82,9 +82,9 @@ dependencies:
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
84
  version: 3.0.0
85
- - - "<="
85
+ - - "<"
86
86
  - !ruby/object:Gem::Version
87
- version: '3.1'
87
+ version: '4'
88
88
  executables: []
89
89
  extensions: []
90
90
  extra_rdoc_files: []
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
277
  - !ruby/object:Gem::Version
278
278
  version: '0'
279
279
  requirements: []
280
- rubygems_version: 4.0.2
280
+ rubygems_version: 4.0.8
281
281
  specification_version: 4
282
282
  summary: An operations service layer for rails projects.
283
283
  test_files: