ae_declarative_authorization 0.12.0 → 0.12.1.tim1

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: 751cbedf8879b1cc01f1353a5048e48253a2803b8d41a2acff126c0c39ddff42
4
- data.tar.gz: a841b726d3501e12f7abed9143122ebf0325619498567ff044f996efc0a9f972
3
+ metadata.gz: dff06fa9d8ff036d7582d582f34f09865a68faf2e7be458a3f0424cecdee3f89
4
+ data.tar.gz: 1055f0f6748d60ab7f8355b04ef5381a5b63f1d4a7b17595594f985eb9032f82
5
5
  SHA512:
6
- metadata.gz: d7572bb84e51d701713e1216d48b1d6d578cd99e5bad6e3f77e9e2f1158df46ac7d8b40c87ab034022c39e3301e6912d663a19b4cd4decb6f15208de6bb4210d
7
- data.tar.gz: 955ca7bf9f17d9188ff372ae959ff7cbd95655025daf98cef65e31da1a965c654232f381ec584cccd28846c924f09d4bc84bd8619cf0a277555a3a5895e2b672
6
+ metadata.gz: 667443e834bdead0de53a90a140d7f096723661ae108b12b2e247d35baa0604a33199805e61eeca296b9a4442038e8680ff855e99b80563636a33f0f4199a62f
7
+ data.tar.gz: 74369200c33c9a93a830919a03dfcf81d2e2f01161d5c19b40dbb5b1f22cbdb58b850b53935bb2807934657cab0ddbf5d0bc749718c57f9c5c27156358e16fb1
@@ -155,8 +155,14 @@ module DeclarativeAuthorization
155
155
  alias :access_tests_not_required :this_is_an_abstract_controller_so_it_needs_no_access_tests
156
156
 
157
157
  def all_public_actions
158
- actions = controller_class.public_instance_methods(false)
159
- actions += controller_class.superclass.public_instance_methods(false)
158
+ actions = []
159
+ if defined?(Grape) && [Grape::API, Grape::API::Instance].any? { |base| controller_class < base }
160
+ actions += controller_class.routes.map { |api| "#{api.request_method} #{api.origin}" }
161
+ else
162
+ actions += controller_class.public_instance_methods(false)
163
+ actions += controller_class.superclass.public_instance_methods(false)
164
+ end
165
+
160
166
  actions.reject! do |method|
161
167
  method =~ /^_/ ||
162
168
  method =~ /^rescue_action/ ||
@@ -1,3 +1,3 @@
1
1
  module DeclarativeAuthorization
2
- VERSION = '0.12.0'.freeze
2
+ VERSION = '0.12.1.tim1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ae_declarative_authorization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1.tim1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AppFolio
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-02-13 00:00:00.000000000 Z
12
+ date: 2020-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: blockenspiel
@@ -99,11 +99,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - ">="
102
+ - - ">"
103
103
  - !ruby/object:Gem::Version
104
- version: '0'
104
+ version: 1.3.1
105
105
  requirements: []
106
- rubygems_version: 3.0.6
106
+ rubygems_version: 3.1.4
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: ae_declarative_authorization is a Rails gem for maintainable authorization