api-blocks 0.6.0 → 0.7.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: 708af1617ee8a83ca0ac12f4d5269a3156ee21afab5fa9a0c2b114e03678acb0
4
- data.tar.gz: 57829eef7e027faa83408359e08ea2a1be36b7672078ba0aca8f39e8548718e2
3
+ metadata.gz: d75318555853ecc826f701851966802312197cdd96df8db360727ea962c27dc0
4
+ data.tar.gz: aeab6992d7a5849d6c8cd95f19217a2ca26a7f17342d9b4953d0790ace882707
5
5
  SHA512:
6
- metadata.gz: eaf5aa0a72c25c515acb4d0202c32e8cb12c30586244b631f3a2d5c4a1d75f71fde69ed2774818e5e555c94bc22fe1a85a4f976332bd87fce1332899357bc873
7
- data.tar.gz: 18fef502d3c1a334036209b6531bc34dc13196ef4c31350116057cbcfe927553870e6d02afd060148ecc5e98f6bb444789d6e552d65d8d7362a93fda0e11b300
6
+ metadata.gz: 283db07ca95c270badcffe63a92861dbc2f4adac6eb7fcf4115ef2285ce2dbb945637292dfdfab71a5906a8b39913939f24813ee088cb8941066f855cffd5f2a
7
+ data.tar.gz: c6d8718960fde579ab983e6e69c2aab7fa6e3a7c364be1c89e6caa1f058b70b7e1ee099eae34dfceabf2c96e942f0b09b100dec8697e0abdd2b26791fccc5848
@@ -35,18 +35,18 @@ module ApiBlocks::Controller
35
35
 
36
36
  # Override policy_scope to lookup pundit policies under the `scope`
37
37
  # namespace
38
- def policy_scope(scope)
38
+ def policy_scope(scope, policy_scope_class: nil)
39
39
  api_scope = self.class.inherited_pundit_api_scope || []
40
40
 
41
- super(api_scope + [scope])
41
+ super(api_scope + [scope], policy_scope_class: policy_scope_class)
42
42
  end
43
43
 
44
44
  # Override authorize to lookup pundit policies under the `scope`
45
45
  # namespace
46
- def authorize(record, query = nil)
46
+ def authorize(record, query = nil, policy_class: nil)
47
47
  api_scope = self.class.inherited_pundit_api_scope || []
48
48
 
49
- super(api_scope + [record], query)
49
+ super(api_scope + [record], query, policy_class: policy_class)
50
50
  end
51
51
 
52
52
  handle_api_error Pundit::NotAuthorizedError do |error|
@@ -2,5 +2,5 @@
2
2
 
3
3
  module ApiBlocks
4
4
  # Current version of ApiBlocks
5
- VERSION = "0.6.0"
5
+ VERSION = "0.7.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-blocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul d'Hubert
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - '='
228
228
  - !ruby/object:Gem::Version
229
- version: 0.81.0
229
+ version: 0.82.0
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - '='
235
235
  - !ruby/object:Gem::Version
236
- version: 0.81.0
236
+ version: 0.82.0
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: yard
239
239
  requirement: !ruby/object:Gem::Requirement