stronger_parameters 2.13.0 → 2.14.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca4cebd1c17a7cb7e68ae01c2fa676c492ab16cbf11998e563e0520c7c0f3bc5
|
4
|
+
data.tar.gz: 5a2b40548e74d16db1cdc99426bc44db551c2430a1c1bad8e2425566e18cff43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13c0e6268b1a9e6567f874c131a038b947047f277db0f581d8f775da9da23ff2170fc1a3a8df8bcd1bedb21cfbbb030f89a4ec55685956be3e4e48176ee20f72
|
7
|
+
data.tar.gz: 0eee3ab73de87a06429c6a86242261fc3344d267de36aa26c2921c594aeed36866ac939b303254927cafd284edca2f05408a81b04ea2393fbc89621dd9a07a19
|
@@ -15,9 +15,7 @@ module StrongerParameters
|
|
15
15
|
when Array
|
16
16
|
ActionController::Parameters.array(*value.map { |v| sugar(v) })
|
17
17
|
when Hash
|
18
|
-
constraints = value.
|
19
|
-
memo[key] = sugar(v)
|
20
|
-
end
|
18
|
+
constraints = value.transform_values { |v| sugar(v) }
|
21
19
|
ActionController::Parameters.map(constraints)
|
22
20
|
else
|
23
21
|
value
|
@@ -63,8 +61,7 @@ module StrongerParameters
|
|
63
61
|
return :skip if for_action == :skip
|
64
62
|
|
65
63
|
# FYI: we should be able to call sugar on the result of deep_merge, but it breaks tests
|
66
|
-
permit_parameters[:all].deep_merge(for_action).
|
67
|
-
each_with_object({}) { |(k, v), a| a[k] = PermittedParameters.sugar(v) }
|
64
|
+
permit_parameters[:all].deep_merge(for_action).transform_values { |v| PermittedParameters.sugar(v) }
|
68
65
|
end
|
69
66
|
|
70
67
|
private
|
@@ -139,9 +139,8 @@ module StrongerParameters
|
|
139
139
|
|
140
140
|
hash_filter_without_stronger_parameters(params, other_filter)
|
141
141
|
|
142
|
-
stronger_filter.
|
142
|
+
stronger_filter.each_key do |key|
|
143
143
|
value = fetch(key, nil)
|
144
|
-
result = nil
|
145
144
|
|
146
145
|
if value.nil? && self.class.allow_nil_for_everything
|
147
146
|
params[key] = nil if key?(key)
|
@@ -198,5 +197,5 @@ module StrongerParameters
|
|
198
197
|
end
|
199
198
|
end
|
200
199
|
|
201
|
-
ActionController::Parameters.
|
202
|
-
ActionController::Base.
|
200
|
+
ActionController::Parameters.include StrongerParameters::Parameters
|
201
|
+
ActionController::Base.include StrongerParameters::ControllerSupport
|
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.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mick Staugaard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: minitest
|
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
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: minitest-rails
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,7 +53,7 @@ dependencies:
|
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
56
|
+
name: maxitest
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
72
58
|
requirements:
|
73
59
|
- - ">="
|
@@ -81,7 +67,7 @@ dependencies:
|
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '0'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
70
|
+
name: bump
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
86
72
|
requirements:
|
87
73
|
- - ">="
|
@@ -95,7 +81,7 @@ dependencies:
|
|
95
81
|
- !ruby/object:Gem::Version
|
96
82
|
version: '0'
|
97
83
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
84
|
+
name: single_cov
|
99
85
|
requirement: !ruby/object:Gem::Requirement
|
100
86
|
requirements:
|
101
87
|
- - ">="
|
@@ -109,7 +95,7 @@ dependencies:
|
|
109
95
|
- !ruby/object:Gem::Version
|
110
96
|
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
98
|
+
name: rubocop
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
114
100
|
requirements:
|
115
101
|
- - ">="
|
@@ -123,7 +109,7 @@ dependencies:
|
|
123
109
|
- !ruby/object:Gem::Version
|
124
110
|
version: '0'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
112
|
+
name: mocha
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
128
114
|
requirements:
|
129
115
|
- - ">="
|
@@ -137,7 +123,7 @@ dependencies:
|
|
137
123
|
- !ruby/object:Gem::Version
|
138
124
|
version: '0'
|
139
125
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
126
|
+
name: forking_test_runner
|
141
127
|
requirement: !ruby/object:Gem::Requirement
|
142
128
|
requirements:
|
143
129
|
- - ">="
|
@@ -220,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
206
|
- !ruby/object:Gem::Version
|
221
207
|
version: '0'
|
222
208
|
requirements: []
|
223
|
-
rubygems_version: 3.
|
209
|
+
rubygems_version: 3.0.3.1
|
224
210
|
signing_key:
|
225
211
|
specification_version: 4
|
226
212
|
summary: Type checking and type casting of parameters for Action Pack
|