api-blocks 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/api_blocks/controller.rb +3 -2
- data/lib/api_blocks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1065347d5b5638755e1591e0f347764fad5ca4960bb844dece4a5e4d3ae672d
|
4
|
+
data.tar.gz: 885a64ab4774959c3bec6d2bcd5a8e731f845466ed15bfb3cdbefc0b26c9b4c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 223b2b77ee3a6583d8b383ed5e0cfa1d7250845489c7fd6c7bb6f92cc8e4d008dc6077740d233b17c89aae824c8d668c98ddfeba739eebe3ce84ad444756bde8
|
7
|
+
data.tar.gz: e76ae3f24886f98cef0404cbd78c65c298733dacf4b738fcccc1e52b33b54992d9e62485dc4cbbd47c23645e845c768e6e74be8537ab3695e289e173bce2fb98
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_litreal: true
|
2
2
|
|
3
3
|
require 'pundit'
|
4
|
+
require 'active_support/core_ext/module'
|
4
5
|
|
5
6
|
# ApiBlocks::Controller provides a set of default configurations for
|
6
7
|
# Ruby on Rails api controllers.
|
@@ -20,6 +21,8 @@ module ApiBlocks::Controller
|
|
20
21
|
extend ActiveSupport::Concern
|
21
22
|
|
22
23
|
included do
|
24
|
+
thread_mattr_accessor :pundit_api_scope
|
25
|
+
|
23
26
|
self.responder = ApiBlocks::Responder
|
24
27
|
|
25
28
|
before_action :verify_request_format!
|
@@ -51,8 +54,6 @@ module ApiBlocks::Controller
|
|
51
54
|
handle_api_error Pundit::NotAuthorizedError do |error|
|
52
55
|
[{ detail: error.message }, :forbidden]
|
53
56
|
end
|
54
|
-
|
55
|
-
thread_mattr_accessor :pundit_api_scope
|
56
57
|
end
|
57
58
|
|
58
59
|
class_methods do
|
data/lib/api_blocks/version.rb
CHANGED