apiphobic-authorization 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/apiphobic/authorization/authorizers/parameters.rb +10 -4
- data/lib/apiphobic/authorization/version.rb +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e58d17605d7ccccd2b7c4f269a0a2e9ce436b823eb932239c0c9fc2e3ae52638
|
4
|
+
data.tar.gz: 6af62fc6a6a279ff1a5d35a93cd47f03ddeb35bd7dc5881a78878d7770d772b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a685c43659747f19cec61d5638b0eb31f585a9f22994180728853269975d302a13dece220a24b863e832ee353e2014b3cd54c05472ab51438c905554c1f873c3
|
7
|
+
data.tar.gz: a12292dfd3e72c1f31bbf12510a9635baabc480ebd4e592b4fd94df310115055cad435ede3d371d8e22e40ea396ce6eabab28aa2588178a81690324bf22a83db
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
@@ -246,7 +246,10 @@ class Parameters
|
|
246
246
|
end
|
247
247
|
|
248
248
|
def ignore_attribute(name:)
|
249
|
-
|
249
|
+
key_match = ->(k, _v) { k.to_s == name.to_s }
|
250
|
+
|
251
|
+
parameters[:data][:attributes] = raw_parameter_attributes.delete_if(&key_match)
|
252
|
+
parameters[:data][:relationships] = raw_parameter_relationships.delete_if(&key_match)
|
250
253
|
end
|
251
254
|
|
252
255
|
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
@@ -301,9 +304,12 @@ class Parameters
|
|
301
304
|
end
|
302
305
|
|
303
306
|
def raw_parameter_relationships
|
304
|
-
@raw_parameter_relationships
|
305
|
-
|
306
|
-
|
307
|
+
@raw_parameter_relationships ||= begin
|
308
|
+
parameters[:data] ||= {}
|
309
|
+
parameters[:data][:relationships] ||= {}
|
310
|
+
|
311
|
+
parameters[:data][:relationships]
|
312
|
+
end
|
307
313
|
end
|
308
314
|
|
309
315
|
def raw_parameter_sorts
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|