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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08f7fbaf510502c324917559ee5bea3177bc04abb9c93ed59e408d772fcbee32'
|
4
|
+
data.tar.gz: a655970b866a445f811b4cba4a26eaab7fe580f0b670cbcd762fa9807e52b7dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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.
|
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-
|
11
|
+
date: 2023-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|