stronger_parameters 2.20.0 → 2.21.1

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: f186917c03263aba1f50d3e3ac7ff3acd4926655f8e9112b7385b34918fdb099
4
- data.tar.gz: 863fc50ff7e443536ad62de00470439b3b4cfa4288174100db0e154bba9064c9
3
+ metadata.gz: '08f7fbaf510502c324917559ee5bea3177bc04abb9c93ed59e408d772fcbee32'
4
+ data.tar.gz: a655970b866a445f811b4cba4a26eaab7fe580f0b670cbcd762fa9807e52b7dc
5
5
  SHA512:
6
- metadata.gz: ccafbf30f5050cc5eb2f3d9340d295197cffe2e183e382a2c16f3acd291f4529695ed5ef110fa742f9e19e3ce6ab950fa8a4364fc5557808c16b3635791a8418
7
- data.tar.gz: b1bbeb6bb9368094ed661f35eb2d4fbabe719ee81e004b7a6abf40b2dd7d45de4904a1d2ebd52ed780ba230c2c50db6e094a7f50b0cdeb6a009de4ca045e1b91
6
+ metadata.gz: 41de802ed59bf10a2393ede678806de86b10fdc29c58776d2c688b2b83425edce379e519d19a0f6132524f15638662c492868e63307489e8832c19700bc1e3e4
7
+ data.tar.gz: 01607efd231b10b2a9d903c5187d1df681b1d049be4568afbf9139ead17b1d5ec0b00682b7cfa5acf78d57405617613f887581d49d016b7731798bff07d2dcbc
@@ -4,7 +4,7 @@ require 'stronger_parameters/constraint'
4
4
  module StrongerParameters
5
5
  class HexConstraint < Constraint
6
6
  def value(v)
7
- return v if v =~ /\A[a-f0-9]+\z/i
7
+ return v if v.is_a?(String) && v.match?(/\A[a-f0-9]+\z/i)
8
8
 
9
9
  InvalidValue.new(v, 'must be a hexadecimal string')
10
10
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module StrongerParameters
3
- VERSION = '2.20.0'
3
+ VERSION = '2.21.1'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stronger_parameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.20.0
4
+ version: 2.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mick Staugaard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-03 00:00:00.000000000 Z
11
+ date: 2023-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler