stronger_parameters 2.23.1 → 2.24.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: b2dbf842e3f1bb52a9c860ba5c55cc7604aeee74111650be5943a4a6e8d20141
4
- data.tar.gz: 7d3ae37786f765317397fed2e54dd33c2fd0875a58cd3ae33c61af3329be6b95
3
+ metadata.gz: dfece47c383e52651b401e4824136fef8f47f70b544974d68f1a400a8e668de4
4
+ data.tar.gz: b8152048a720046f234879c05a065b9388ca72f01a4fe57b86d16c4f9620f645
5
5
  SHA512:
6
- metadata.gz: 02d3ab03fcbaecc0bcefce902f813abd04f6440da15ab74fe6c6e3a9a317933688c80c5111ccd405ddb83941adb80871391c11ec955f97751b9680d6e3bb8e49
7
- data.tar.gz: 837f6c2b476486d9ae46f298aac91e5762d92829fab8ed59a08f8fb79f9566fe5e74f55538fece0c272306c40bb9312adb275630ef042ae3ded645ab558ef403
6
+ metadata.gz: c7af70683fdf5117260e2409c24476cb31550ed06605decf262bbd35e977ec991dff24f8386847a4fce772486ec63b1ce05024fda5f706f704ece20b96a712d9
7
+ data.tar.gz: 9b1046ac05d0df91b69ce6543030238518344e458d49e6ade738f73d50009a817e14ed8bb43fba1968cedd479a86be8210ea722a048871ca76247fc6210a2814
data/README.md CHANGED
@@ -53,6 +53,32 @@ params.permit(
53
53
  )
54
54
  ```
55
55
 
56
+ ### Rejecting empty values
57
+
58
+ Use `Parameters.present` to reject empty values without enforcing a type:
59
+
60
+ ```ruby
61
+ params.permit(
62
+ value: Parameters.present
63
+ )
64
+ ```
65
+
66
+ This checks `value.present?`, so whitespace-only strings, empty collections, `nil`,
67
+ and `false` are rejected. Accepted values are returned unchanged. Parameters may
68
+ still be omitted; use `Parameters.present.required` to also require a key.
69
+
70
+ To also enforce a type, combine it with another constraint:
71
+
72
+ ```ruby
73
+ params.permit(
74
+ name: Parameters.string & Parameters.present,
75
+ tags: Parameters.array(Parameters.string) & Parameters.present
76
+ )
77
+ ```
78
+
79
+ Use `(Parameters.string & Parameters.present).required` to require a nonempty
80
+ string and its key.
81
+
56
82
  ## Nested Parameters
57
83
 
58
84
  ```ruby
@@ -245,6 +271,8 @@ curl -I 'http://localhost/api/users/1.json' -X POST -d '{ "user": { "id": 1 } }'
245
271
  | Syntax | (Simplified) Definition |
246
272
  |--------------------------------|--------------------------------------------------------------------------------------------|
247
273
  | Parameters.string | value.is_a?(String) |
274
+ | Parameters.size(1..10) | Array with a size covered by the given range; combine with Parameters.array(type) |
275
+ | Parameters.csv(type) | Comma separated string converted to an array using the item constraint |
248
276
  | Parameters.integer | value.is_a?(Fixnum) or '-1' |
249
277
  | Parameters.float | value.is_a?(Float) or '-1.2' |
250
278
  | Parameters.date | value.is_a?(Date) or '2014-05-13' or '13.05.2014' |
@@ -259,6 +287,7 @@ curl -I 'http://localhost/api/users/1.json' -X POST -d '{ "user": { "id": 1 } }'
259
287
  | Parameters.lte(10) | value <= 10 |
260
288
  | Parameters.gt(0) | value > 0 |
261
289
  | Parameters.gte(0) | value >= 0 |
290
+ | Parameters.present | value.present? |
262
291
  | Parameters.integer32 | Parameters.integer & Parameters.lt(2 ** 31) & Parameters.gte(-2 ** 31) |
263
292
  | Parameters.integer64 | Parameters.integer & Parameters.lt(2 ** 63) & Parameters.gte(-2 ** 63) |
264
293
  | Parameters.id | Parameters.integer & Parameters.lt(2 ** 31) & Parameters.gte(0) |
@@ -273,17 +302,49 @@ curl -I 'http://localhost/api/users/1.json' -X POST -d '{ "user": { "id": 1 } }'
273
302
  | Parameters.hex | value is a String that matches the hexadecimal format |
274
303
  | Parameters.ulid | value is a String of length 26 with only Crockford Base32 symbols |
275
304
 
276
- ## Development
305
+ ## Date, time, and datetime formats
277
306
 
278
- ### Releasing a new version
307
+ `Parameters.date`, `Parameters.time`, and `Parameters.datetime` accept an optional
308
+ `format:` keyword:
279
309
 
280
- ```
281
- git checkout master && git fetch origin && git reset --hard origin/master
282
- bundle exec rake bump:<patch|minor|major>
283
- # -> manually edit changelog
284
- git commit -a --amend --no-edit
285
- bundle exec rake release
310
+ ```ruby
311
+ Parameters.date(format: :iso8601)
312
+ Parameters.date(format: :rfc3339)
313
+ Parameters.time(format: :iso8601)
314
+ Parameters.time(format: :rfc3339)
315
+ Parameters.datetime(format: :iso8601)
316
+ Parameters.datetime(format: :rfc3339)
286
317
  ```
287
318
 
288
- - [github action](.github/workflows/ruby-gem-publication.yml) will release a new version to rubygems.org
289
- - approve the new version [here](https://github.com/zendesk/stronger_parameters/actions/workflows/ruby-gem-publication.yml)
319
+ Supported formats are `nil` (the default), `:iso8601`, and `:rfc3339`. With no
320
+ format specified, parsing remains permissive. An explicit format selects Ruby's
321
+ corresponding parser; RFC3339 requires both a time and an explicit timezone
322
+ offset. Unsupported formats raise `ArgumentError` when constructing a constraint.
323
+
324
+ Existing `Date`, `Time`, and `DateTime` values pass through their respective
325
+ constraints unchanged, regardless of the selected format. These options control
326
+ string parsing. Each `*_iso8601` shorthand delegates to its corresponding
327
+ constraint with `format: :iso8601`, including passing through existing typed
328
+ values.
329
+
330
+ `Parameters.date(format: :rfc3339)` requires a full timestamp with an offset and
331
+ returns its calendar date, without converting it to another timezone. A date-only
332
+ string such as `"2018-04-12"` is accepted by `format: :iso8601`, but rejected by
333
+ `format: :rfc3339`.
334
+
335
+ ## Development
336
+
337
+ ### Releasing a new version
338
+ A new version is published to RubyGems.org every time a change to `version.rb` is pushed to the `main` branch.
339
+ In short, follow these steps:
340
+ 1. Update `version.rb`,
341
+ 2. update version in all `Gemfile.lock` files,
342
+ 3. merge this change into `main`, and
343
+ 4. look at [the action](https://github.com/zendesk/stronger_parameters/actions/workflows/publish.yml) for output.
344
+
345
+ To create a pre-release from a non-main branch:
346
+ 1. change the version in `version.rb` to something like `1.2.0.pre.1` or `2.0.0.beta.2`,
347
+ 2. push this change to your branch,
348
+ 3. go to [Actions → “Publish to RubyGems.org” on GitHub](https://github.com/zendesk/stronger_parameters/actions/workflows/publish.yml),
349
+ 4. click the “Run workflow” button,
350
+ 5. pick your branch from a dropdown.
@@ -8,7 +8,7 @@ module StrongerParameters
8
8
  FALSE_VALUES = [false, "false", "0", 0].freeze
9
9
 
10
10
  def value(v)
11
- v = v.downcase if v.is_a? String
11
+ v = v.downcase if v.is_a?(String)
12
12
 
13
13
  return true if TRUE_VALUES.include?(v)
14
14
 
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "stronger_parameters/constraint"
4
+
5
+ module StrongerParameters
6
+ class CommaSeparatedValuesConstraint < StrongerParameters::Constraint
7
+ def initialize(item_constraint)
8
+ @item_constraint = item_constraint
9
+ end
10
+
11
+ def value(input)
12
+ return StrongerParameters::InvalidValue.new(input, "must be a string with comma separated values") unless input.is_a?(String)
13
+
14
+ input.split(/,\s*/).map do |item|
15
+ result = @item_constraint.value(item)
16
+ return result if result.is_a?(StrongerParameters::InvalidValue)
17
+
18
+ result
19
+ end
20
+ end
21
+ end
22
+ end
@@ -4,14 +4,28 @@ require "stronger_parameters/constraint"
4
4
 
5
5
  module StrongerParameters
6
6
  class DateConstraint < Constraint
7
+ def initialize(format: nil)
8
+ unless [nil, :iso8601, :rfc3339].include?(format)
9
+ raise ArgumentError, "Unsupported date format: #{format.inspect}"
10
+ end
11
+
12
+ @format = format
13
+ end
14
+
7
15
  def value(v)
8
16
  return v if v.is_a?(Date)
9
17
 
10
- begin
11
- Date.parse v
12
- rescue ArgumentError, TypeError
13
- StrongerParameters::InvalidValue.new(v, "must be a date")
18
+ case @format
19
+ when :iso8601
20
+ Date.iso8601(v)
21
+ when :rfc3339
22
+ Date.rfc3339(v)
23
+ else
24
+ Date.parse(v)
14
25
  end
26
+ rescue ArgumentError, TypeError
27
+ message = @format ? "must be an #{@format} date" : "must be a date"
28
+ StrongerParameters::InvalidValue.new(v, message)
15
29
  end
16
30
  end
17
31
  end
@@ -1,13 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "stronger_parameters/constraint"
3
+ require "stronger_parameters/constraints/date_constraint"
4
4
 
5
5
  module StrongerParameters
6
- class DateIso8601Constraint < Constraint
7
- def value(v)
8
- Date.iso8601 v
9
- rescue ArgumentError, TypeError
10
- StrongerParameters::InvalidValue.new(v, "must be an iso8601 date")
11
- end
6
+ class DateIso8601Constraint < DateConstraint
7
+ def initialize = super(format: :iso8601)
12
8
  end
13
9
  end
@@ -4,14 +4,28 @@ require "stronger_parameters/constraint"
4
4
 
5
5
  module StrongerParameters
6
6
  class DateTimeConstraint < Constraint
7
+ def initialize(format: nil)
8
+ unless [nil, :iso8601, :rfc3339].include?(format)
9
+ raise ArgumentError, "Unsupported datetime format: #{format.inspect}"
10
+ end
11
+
12
+ @format = format
13
+ end
14
+
7
15
  def value(v)
8
16
  return v if v.is_a?(DateTime)
9
17
 
10
- begin
11
- DateTime.parse v
12
- rescue ArgumentError, TypeError
13
- StrongerParameters::InvalidValue.new(v, "must be a datetime")
18
+ case @format
19
+ when :iso8601
20
+ DateTime.iso8601(v)
21
+ when :rfc3339
22
+ DateTime.rfc3339(v)
23
+ else
24
+ DateTime.parse(v)
14
25
  end
26
+ rescue ArgumentError, TypeError
27
+ message = @format ? "must be an #{@format} datetime" : "must be a datetime"
28
+ StrongerParameters::InvalidValue.new(v, message)
15
29
  end
16
30
  end
17
31
  end
@@ -1,13 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "stronger_parameters/constraint"
3
+ require "stronger_parameters/constraints/date_time_constraint"
4
4
 
5
5
  module StrongerParameters
6
- class DateTimeIso8601Constraint < Constraint
7
- def value(v)
8
- DateTime.iso8601 v
9
- rescue ArgumentError, TypeError
10
- StrongerParameters::InvalidValue.new(v, "must be an iso8601 datetime")
11
- end
6
+ class DateTimeIso8601Constraint < DateTimeConstraint
7
+ def initialize = super(format: :iso8601)
12
8
  end
13
9
  end
@@ -7,7 +7,7 @@ module StrongerParameters
7
7
  def value(v)
8
8
  if v.is_a?(Float)
9
9
  return v
10
- elsif v.is_a?(String) && v =~ /\A-?\d+\.\d+\Z/
10
+ elsif v.is_a?(String) && v.match?(/\A-?\d+\.\d+\Z/)
11
11
  return v.to_f
12
12
  end
13
13
 
@@ -7,7 +7,7 @@ module StrongerParameters
7
7
  def value(v)
8
8
  if v.is_a?(Integer)
9
9
  return v
10
- elsif v.is_a?(String) && v.strip =~ /\A-?\d+\Z/
10
+ elsif v.is_a?(String) && v.strip.match?(/\A-?\d+\Z/)
11
11
  return v.to_i
12
12
  end
13
13
 
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "active_support/core_ext/object/blank"
4
+ require "stronger_parameters/constraint"
5
+
6
+ module StrongerParameters
7
+ class PresentConstraint < Constraint
8
+ def value(v)
9
+ return v if v.present?
10
+
11
+ InvalidValue.new(v, "must not be empty")
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "stronger_parameters/constraint"
4
+
5
+ module StrongerParameters
6
+ class SizeConstraint < StrongerParameters::Constraint
7
+ def initialize(range)
8
+ @range = range
9
+ end
10
+
11
+ def value(input)
12
+ return StrongerParameters::InvalidValue.new(input, "must be an array") unless input.is_a?(Array)
13
+
14
+ return input if @range.cover?(input.size)
15
+
16
+ if @range.begin && @range.end
17
+ if @range.begin == @range.end
18
+ StrongerParameters::InvalidValue.new(input, "must have exactly #{@range.begin} #{"element".pluralize(@range.begin)}")
19
+ else
20
+ StrongerParameters::InvalidValue.new(input, "must have between #{@range.begin} and #{@range.end} elements")
21
+ end
22
+ elsif @range.begin
23
+ StrongerParameters::InvalidValue.new(input, "must have at least #{@range.begin} #{"element".pluralize(@range.begin)}")
24
+ else
25
+ StrongerParameters::InvalidValue.new(input, "must have at most #{@range.end} #{"element".pluralize(@range.end)}")
26
+ end
27
+ end
28
+ end
29
+ end
@@ -4,14 +4,28 @@ require "stronger_parameters/constraint"
4
4
 
5
5
  module StrongerParameters
6
6
  class TimeConstraint < Constraint
7
+ def initialize(format: nil)
8
+ unless [nil, :iso8601, :rfc3339].include?(format)
9
+ raise ArgumentError, "Unsupported time format: #{format.inspect}"
10
+ end
11
+
12
+ @format = format
13
+ end
14
+
7
15
  def value(v)
8
16
  return v if v.is_a?(Time)
9
17
 
10
- begin
11
- Time.parse v
12
- rescue ArgumentError, TypeError
13
- StrongerParameters::InvalidValue.new(v, "must be a time")
18
+ case @format
19
+ when :iso8601
20
+ Time.iso8601(v)
21
+ when :rfc3339
22
+ Time.rfc3339(v)
23
+ else
24
+ Time.parse(v)
14
25
  end
26
+ rescue ArgumentError, TypeError
27
+ message = @format ? "must be an #{@format} time" : "must be a time"
28
+ StrongerParameters::InvalidValue.new(v, message)
15
29
  end
16
30
  end
17
31
  end
@@ -1,13 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "stronger_parameters/constraint"
3
+ require "stronger_parameters/constraints/time_constraint"
4
4
 
5
5
  module StrongerParameters
6
- class TimeIso8601Constraint < Constraint
7
- def value(v)
8
- Time.iso8601 v
9
- rescue ArgumentError, TypeError
10
- StrongerParameters::InvalidValue.new(v, "must be an iso8601 time")
11
- end
6
+ class TimeIso8601Constraint < TimeConstraint
7
+ def initialize = super(format: :iso8601)
12
8
  end
13
9
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "stronger_parameters/constraint"
4
+ require "stronger_parameters/constraints/present_constraint"
4
5
  require "stronger_parameters/constraints/string_constraint"
5
6
  require "stronger_parameters/constraints/float_constraint"
6
7
  require "stronger_parameters/constraints/date_constraint"
@@ -22,3 +23,5 @@ require "stronger_parameters/constraints/file_constraint"
22
23
  require "stronger_parameters/constraints/decimal_constraint"
23
24
  require "stronger_parameters/constraints/hex_constraint"
24
25
  require "stronger_parameters/constraints/ulid_constraint"
26
+ require "stronger_parameters/constraints/comma_separated_values_constraint"
27
+ require "stronger_parameters/constraints/size_constraint"
@@ -13,6 +13,8 @@ module StrongerParameters
13
13
  module Parameters
14
14
  extend ActiveSupport::Concern
15
15
 
16
+ ABSENT = BasicObject.new
17
+
16
18
  included do
17
19
  alias_method :hash_filter_without_stronger_parameters, :hash_filter
18
20
  alias_method :hash_filter, :hash_filter_with_stronger_parameters
@@ -25,6 +27,10 @@ module StrongerParameters
25
27
  Constraint.new
26
28
  end
27
29
 
30
+ def present
31
+ PresentConstraint.new
32
+ end
33
+
28
34
  def nil
29
35
  NilConstraint.new
30
36
  end
@@ -98,6 +104,14 @@ module StrongerParameters
98
104
  ArrayConstraint.new(item_constraint)
99
105
  end
100
106
 
107
+ def size(range)
108
+ SizeConstraint.new(range)
109
+ end
110
+
111
+ def csv(item_constraint)
112
+ CommaSeparatedValuesConstraint.new(item_constraint)
113
+ end
114
+
101
115
  def map(constraints = nil)
102
116
  HashConstraint.new(constraints)
103
117
  end
@@ -106,28 +120,28 @@ module StrongerParameters
106
120
  NilStringConstraint.new
107
121
  end
108
122
 
109
- def date
110
- DateConstraint.new
123
+ def date(format: nil)
124
+ DateConstraint.new(format:)
111
125
  end
112
126
 
113
127
  def date_iso8601
114
- DateIso8601Constraint.new
128
+ date(format: :iso8601)
115
129
  end
116
130
 
117
- def time
118
- TimeConstraint.new
131
+ def time(format: nil)
132
+ TimeConstraint.new(format:)
119
133
  end
120
134
 
121
135
  def time_iso8601
122
- TimeIso8601Constraint.new
136
+ time(format: :iso8601)
123
137
  end
124
138
 
125
- def datetime
126
- DateTimeConstraint.new
139
+ def datetime(format: nil)
140
+ DateTimeConstraint.new(format:)
127
141
  end
128
142
 
129
143
  def datetime_iso8601
130
- DateTimeIso8601Constraint.new # uncovered
144
+ datetime(format: :iso8601)
131
145
  end
132
146
 
133
147
  def file
@@ -161,22 +175,18 @@ module StrongerParameters
161
175
 
162
176
  hash_filter_without_stronger_parameters(params, other_filter, **kwargs)
163
177
 
164
- stronger_filter.each_key do |key|
165
- value = fetch(key, nil)
166
-
167
- if value.nil? && self.class.allow_nil_for_everything
168
- params[key] = nil if key?(key)
169
- next
170
- end
178
+ stronger_filter.each do |key, constraint|
179
+ value = fetch(key, ABSENT)
171
180
 
172
- constraint = stronger_filter[key]
173
-
174
- if key?(key)
175
- result = constraint.value(value)
176
- elsif constraint.required?
177
- result = InvalidValue.new(nil, "must be present")
181
+ result = if value.equal?(ABSENT)
182
+ next if self.class.allow_nil_for_everything || !constraint.required?
183
+ InvalidValue.new(value = nil, "must be present")
178
184
  else
179
- next # uncovered
185
+ if value.nil? && self.class.allow_nil_for_everything
186
+ params[key] = nil
187
+ next
188
+ end
189
+ constraint.value(value)
180
190
  end
181
191
 
182
192
  if result.is_a?(InvalidValue)
@@ -195,10 +205,23 @@ module StrongerParameters
195
205
  raise ArgumentError, "Unsupported value in action_on_invalid_parameters: #{action}"
196
206
  end
197
207
 
198
- params[key] = value
199
- else
200
- params[key] = result
208
+ result = value
201
209
  end
210
+
211
+ params[key] = result
212
+ # Rails marks only the parent permitted; custom nested results need their own permissions.
213
+ permit_constraint_value(params[key])
214
+ end
215
+ end
216
+
217
+ private
218
+
219
+ def permit_constraint_value(value)
220
+ case value
221
+ when ActionController::Parameters
222
+ value.permit! unless value.permitted?
223
+ when Array
224
+ value.each { |item| permit_constraint_value(item) }
202
225
  end
203
226
  end
204
227
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module StrongerParameters
4
- VERSION = "2.23.1"
4
+ VERSION = "2.24.0"
5
5
  end
metadata CHANGED
@@ -1,142 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stronger_parameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.1
4
+ version: 2.24.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mick Staugaard
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-16 00:00:00.000000000 Z
11
+ date: 2026-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest-rails
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: maxitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: bump
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: single_cov
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: standard
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: forking_test_runner
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
13
  - !ruby/object:Gem::Dependency
126
14
  name: actionpack
127
15
  requirement: !ruby/object:Gem::Requirement
128
16
  requirements:
129
17
  - - ">="
130
18
  - !ruby/object:Gem::Version
131
- version: '5.0'
19
+ version: '7.1'
132
20
  type: :runtime
133
21
  prerelease: false
134
22
  version_requirements: !ruby/object:Gem::Requirement
135
23
  requirements:
136
24
  - - ">="
137
25
  - !ruby/object:Gem::Version
138
- version: '5.0'
139
- description:
26
+ version: '7.1'
27
+ description:
140
28
  email:
141
29
  - mick@zendesk.com
142
30
  executables: []
@@ -149,6 +37,7 @@ files:
149
37
  - lib/stronger_parameters/constraints.rb
150
38
  - lib/stronger_parameters/constraints/array_constraint.rb
151
39
  - lib/stronger_parameters/constraints/boolean_constraint.rb
40
+ - lib/stronger_parameters/constraints/comma_separated_values_constraint.rb
152
41
  - lib/stronger_parameters/constraints/comparison_constraints.rb
153
42
  - lib/stronger_parameters/constraints/date_constraint.rb
154
43
  - lib/stronger_parameters/constraints/date_iso8601_constraint.rb
@@ -163,7 +52,9 @@ files:
163
52
  - lib/stronger_parameters/constraints/integer_constraint.rb
164
53
  - lib/stronger_parameters/constraints/nil_constraint.rb
165
54
  - lib/stronger_parameters/constraints/nil_string_constraint.rb
55
+ - lib/stronger_parameters/constraints/present_constraint.rb
166
56
  - lib/stronger_parameters/constraints/regexp_constraint.rb
57
+ - lib/stronger_parameters/constraints/size_constraint.rb
167
58
  - lib/stronger_parameters/constraints/string_constraint.rb
168
59
  - lib/stronger_parameters/constraints/time_constraint.rb
169
60
  - lib/stronger_parameters/constraints/time_iso8601_constraint.rb
@@ -177,7 +68,7 @@ licenses:
177
68
  - Apache License Version 2.0
178
69
  metadata:
179
70
  rubygems_mfa_required: 'true'
180
- post_install_message:
71
+ post_install_message:
181
72
  rdoc_options: []
182
73
  require_paths:
183
74
  - lib
@@ -185,15 +76,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
76
  requirements:
186
77
  - - ">="
187
78
  - !ruby/object:Gem::Version
188
- version: 2.7.0
79
+ version: '3.3'
189
80
  required_rubygems_version: !ruby/object:Gem::Requirement
190
81
  requirements:
191
82
  - - ">="
192
83
  - !ruby/object:Gem::Version
193
84
  version: '0'
194
85
  requirements: []
195
- rubygems_version: 3.5.16
196
- signing_key:
86
+ rubygems_version: 3.5.22
87
+ signing_key:
197
88
  specification_version: 4
198
89
  summary: Type checking and type casting of parameters for Action Pack
199
90
  test_files: []