apiphobic-authorization 1.3.0 → 1.3.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: 22e03e3f93abb9cab9ae283ede37575c35c6b3b48c7b47e6dab2075ce5262b14
4
- data.tar.gz: e96790696a7829b175ef4bf0c307a7b7d2f87375958e76057f2752ede74a5cfe
3
+ metadata.gz: b2e52789dfd4bdcb81496f57b65640060f9b5507dfb88dea346e6e4e70a00338
4
+ data.tar.gz: 8b7d3db6a3afd89a0d373957b0441469c1b07f9566e91ccd460cd4ec5aff842a
5
5
  SHA512:
6
- metadata.gz: 869c01c380f6f1b1c8c55ea93c908ad3e726c0b45785cfd27a411c6c36a2cabaf6811585ba3a2086db03d442168fd89f2bca5744c50f11d67f2c188d389ffd1f
7
- data.tar.gz: 463c2b28982c1aaceed7ba1a86967ad6decf251c7cf4e4fd564d8bd6b8c413732d1f860aa9269a1e34d1f356d367b04828b20ebb7d92a422b89fb91697adb850
6
+ metadata.gz: e1e9d81247767c12439d0e168dbdf8369d8a8aeb122b1e53288db5f567f017691d13d45038f265c31a8566178c8fb7fd67ca808d926ce35c85d1a9a3460ef0a6
7
+ data.tar.gz: dff1d9610235548089b9081da50588b46e9c3e0167a7b78511f5e5765d0919816b9f31e257b9a6eeccbc36df3ec98c00dc36ac0ae090479279fc0d7ef7aff807
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -228,7 +228,7 @@ class Parameters
228
228
  embedded_relation = first_relation[:attributes]
229
229
 
230
230
  authorized_parameter_relationships[name] = if relationship_data.nil?
231
- [:data]
231
+ %i{data}
232
232
  elsif embedded_relation
233
233
  {
234
234
  data: [
@@ -115,7 +115,8 @@ module Resource
115
115
 
116
116
  @authorized_resource ||= \
117
117
  ::Apiphobic::Resource::Model
118
- .new(resource: public_send(self.class.singular_underscored_base_resource_name),
118
+ .new(resource: Object.const_get(self.class.singular_resource_class_name),
119
+ id: params[:id],
119
120
  parameters: authorized_parameters)
120
121
  end
121
122
 
@@ -124,7 +125,7 @@ module Resource
124
125
 
125
126
  @authorized_collection ||= \
126
127
  ::Apiphobic::Resource::Collection
127
- .new(resource: public_send(self.class.plural_underscored_base_resource_name),
128
+ .new(resource: authorized_scope,
128
129
  parameters: authorized_parameters)
129
130
  end
130
131
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Apiphobic
4
4
  module Authorization
5
- VERSION = '1.3.0'
5
+ VERSION = '1.3.1'
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.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thegranddesign
@@ -31,7 +31,7 @@ cert_chain:
31
31
  Y2GAoHKstmfIVhc4XHOPpmTd2o/C29O9oaRgjrkfQEhF/KvJ/PhoV5hvokzsCyI5
32
32
  iUeXPfvrGD/itYIBCgk+fnzyQQ4QtE5hTQaWQ3o2
33
33
  -----END CERTIFICATE-----
34
- date: 2018-06-08 00:00:00.000000000 Z
34
+ date: 2018-07-09 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: apiphobic-resource
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  version: '0'
180
180
  requirements: []
181
181
  rubyforge_project:
182
- rubygems_version: 2.7.6
182
+ rubygems_version: 2.7.7
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: Authorization for API Requests
metadata.gz.sig CHANGED
Binary file