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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2e52789dfd4bdcb81496f57b65640060f9b5507dfb88dea346e6e4e70a00338
4
- data.tar.gz: 8b7d3db6a3afd89a0d373957b0441469c1b07f9566e91ccd460cd4ec5aff842a
3
+ metadata.gz: e58d17605d7ccccd2b7c4f269a0a2e9ce436b823eb932239c0c9fc2e3ae52638
4
+ data.tar.gz: 6af62fc6a6a279ff1a5d35a93cd47f03ddeb35bd7dc5881a78878d7770d772b3
5
5
  SHA512:
6
- metadata.gz: e1e9d81247767c12439d0e168dbdf8369d8a8aeb122b1e53288db5f567f017691d13d45038f265c31a8566178c8fb7fd67ca808d926ce35c85d1a9a3460ef0a6
7
- data.tar.gz: dff1d9610235548089b9081da50588b46e9c3e0167a7b78511f5e5765d0919816b9f31e257b9a6eeccbc36df3ec98c00dc36ac0ae090479279fc0d7ef7aff807
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
- raw_parameter_attributes.delete(name)
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 ||= parameters
305
- .fetch(:data, {})
306
- .fetch(:relationships, {})
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Apiphobic
4
4
  module Authorization
5
- VERSION = '1.3.1'
5
+ VERSION = '1.4.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiphobic-authorization
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thegranddesign
metadata.gz.sig CHANGED
Binary file