action_policy 0.4.1 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +230 -172
- data/LICENSE.txt +1 -1
- data/README.md +7 -11
- data/lib/.rbnext/2.7/action_policy/behaviours/policy_for.rb +62 -0
- data/lib/.rbnext/2.7/action_policy/i18n.rb +56 -0
- data/lib/.rbnext/2.7/action_policy/policy/cache.rb +101 -0
- data/lib/.rbnext/2.7/action_policy/policy/pre_check.rb +162 -0
- data/lib/.rbnext/2.7/action_policy/rspec/be_authorized_to.rb +89 -0
- data/lib/.rbnext/2.7/action_policy/rspec/have_authorized_scope.rb +124 -0
- data/lib/.rbnext/2.7/action_policy/utils/pretty_print.rb +159 -0
- data/lib/.rbnext/3.0/action_policy/behaviour.rb +115 -0
- data/lib/.rbnext/3.0/action_policy/behaviours/policy_for.rb +62 -0
- data/lib/.rbnext/3.0/action_policy/behaviours/scoping.rb +35 -0
- data/lib/.rbnext/3.0/action_policy/behaviours/thread_memoized.rb +59 -0
- data/lib/.rbnext/3.0/action_policy/ext/policy_cache_key.rb +72 -0
- data/lib/.rbnext/3.0/action_policy/policy/aliases.rb +69 -0
- data/lib/.rbnext/3.0/action_policy/policy/authorization.rb +87 -0
- data/lib/.rbnext/3.0/action_policy/policy/cache.rb +101 -0
- data/lib/.rbnext/3.0/action_policy/policy/core.rb +161 -0
- data/lib/.rbnext/3.0/action_policy/policy/defaults.rb +31 -0
- data/lib/.rbnext/3.0/action_policy/policy/execution_result.rb +37 -0
- data/lib/.rbnext/3.0/action_policy/policy/pre_check.rb +162 -0
- data/lib/.rbnext/3.0/action_policy/policy/reasons.rb +210 -0
- data/lib/.rbnext/3.0/action_policy/policy/scoping.rb +160 -0
- data/lib/.rbnext/3.0/action_policy/rspec/be_authorized_to.rb +89 -0
- data/lib/.rbnext/3.0/action_policy/rspec/have_authorized_scope.rb +124 -0
- data/lib/.rbnext/3.0/action_policy/utils/pretty_print.rb +159 -0
- data/lib/.rbnext/3.0/action_policy/utils/suggest_message.rb +19 -0
- data/lib/action_policy.rb +7 -1
- data/lib/action_policy/behaviour.rb +22 -16
- data/lib/action_policy/behaviours/policy_for.rb +10 -3
- data/lib/action_policy/behaviours/scoping.rb +2 -1
- data/lib/action_policy/behaviours/thread_memoized.rb +1 -3
- data/lib/action_policy/ext/module_namespace.rb +1 -6
- data/lib/action_policy/ext/policy_cache_key.rb +15 -33
- data/lib/action_policy/ext/{symbol_classify.rb → symbol_camelize.rb} +6 -6
- data/lib/action_policy/i18n.rb +1 -1
- data/lib/action_policy/lookup_chain.rb +41 -21
- data/lib/action_policy/policy/aliases.rb +7 -12
- data/lib/action_policy/policy/authorization.rb +14 -17
- data/lib/action_policy/policy/cache.rb +34 -18
- data/lib/action_policy/policy/core.rb +25 -12
- data/lib/action_policy/policy/defaults.rb +3 -9
- data/lib/action_policy/policy/execution_result.rb +3 -9
- data/lib/action_policy/policy/pre_check.rb +19 -58
- data/lib/action_policy/policy/reasons.rb +30 -20
- data/lib/action_policy/policy/scoping.rb +5 -6
- data/lib/action_policy/rails/controller.rb +6 -1
- data/lib/action_policy/rails/ext/active_record.rb +7 -0
- data/lib/action_policy/rails/policy/instrumentation.rb +1 -1
- data/lib/action_policy/rspec/be_authorized_to.rb +5 -9
- data/lib/action_policy/rspec/dsl.rb +3 -3
- data/lib/action_policy/rspec/have_authorized_scope.rb +5 -7
- data/lib/action_policy/testing.rb +1 -12
- data/lib/action_policy/utils/pretty_print.rb +21 -24
- data/lib/action_policy/utils/suggest_message.rb +1 -3
- data/lib/action_policy/version.rb +1 -1
- data/lib/generators/action_policy/install/templates/{application_policy.rb → application_policy.rb.tt} +1 -1
- data/lib/generators/action_policy/policy/policy_generator.rb +4 -1
- data/lib/generators/action_policy/policy/templates/{policy.rb → policy.rb.tt} +0 -0
- data/lib/generators/rspec/templates/{policy_spec.rb → policy_spec.rb.tt} +0 -0
- data/lib/generators/test_unit/templates/{policy_test.rb → policy_test.rb.tt} +0 -0
- metadata +55 -119
- data/.gitattributes +0 -2
- data/.github/FUNDING.yml +0 -1
- data/.github/ISSUE_TEMPLATE.md +0 -18
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -29
- data/.gitignore +0 -15
- data/.rubocop.yml +0 -54
- data/.tidelift.yml +0 -6
- data/.travis.yml +0 -31
- data/Gemfile +0 -22
- data/Rakefile +0 -27
- data/action_policy.gemspec +0 -44
- data/benchmarks/namespaced_lookup_cache.rb +0 -71
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/docs/.nojekyll +0 -0
- data/docs/CNAME +0 -1
- data/docs/README.md +0 -77
- data/docs/_sidebar.md +0 -27
- data/docs/aliases.md +0 -122
- data/docs/assets/docsify-search.js +0 -364
- data/docs/assets/docsify.min.js +0 -3
- data/docs/assets/fonts/FiraCode-Medium.woff +0 -0
- data/docs/assets/fonts/FiraCode-Regular.woff +0 -0
- data/docs/assets/images/banner.png +0 -0
- data/docs/assets/images/cache.png +0 -0
- data/docs/assets/images/cache.svg +0 -70
- data/docs/assets/images/layer.png +0 -0
- data/docs/assets/images/layer.svg +0 -35
- data/docs/assets/prism-ruby.min.js +0 -1
- data/docs/assets/styles.css +0 -347
- data/docs/assets/vue.min.css +0 -1
- data/docs/authorization_context.md +0 -92
- data/docs/behaviour.md +0 -113
- data/docs/caching.md +0 -273
- data/docs/controller_action_aliases.md +0 -109
- data/docs/custom_lookup_chain.md +0 -48
- data/docs/custom_policy.md +0 -53
- data/docs/debugging.md +0 -55
- data/docs/decorators.md +0 -27
- data/docs/favicon.ico +0 -0
- data/docs/graphql.md +0 -302
- data/docs/i18n.md +0 -44
- data/docs/index.html +0 -43
- data/docs/instrumentation.md +0 -84
- data/docs/lookup_chain.md +0 -17
- data/docs/namespaces.md +0 -77
- data/docs/non_rails.md +0 -28
- data/docs/pre_checks.md +0 -57
- data/docs/pundit_migration.md +0 -80
- data/docs/quick_start.md +0 -118
- data/docs/rails.md +0 -120
- data/docs/reasons.md +0 -120
- data/docs/scoping.md +0 -255
- data/docs/testing.md +0 -333
- data/docs/writing_policies.md +0 -107
- data/gemfiles/jruby.gemfile +0 -8
- data/gemfiles/rails42.gemfile +0 -8
- data/gemfiles/rails6.gemfile +0 -8
- data/gemfiles/railsmaster.gemfile +0 -6
- data/lib/action_policy/ext/string_match.rb +0 -14
- data/lib/action_policy/ext/yield_self_then.rb +0 -25
@@ -50,7 +50,7 @@ if defined?(::RSpec)
|
|
50
50
|
::RSpec.shared_context "action_policy:policy_context" do
|
51
51
|
let(:record) { nil }
|
52
52
|
let(:context) { {} }
|
53
|
-
let(:policy) { described_class.new(record, context) }
|
53
|
+
let(:policy) { described_class.new(record, **context) }
|
54
54
|
end
|
55
55
|
|
56
56
|
::RSpec.shared_context "action_policy:policy_rule_context" do |policy_rule, *args, method: "describe", block: nil|
|
@@ -68,7 +68,7 @@ if defined?(::RSpec)
|
|
68
68
|
|
69
69
|
::RSpec.shared_examples_for "action_policy:policy_rule_example" do |success, the_caller|
|
70
70
|
if success
|
71
|
-
specify do
|
71
|
+
specify "is allowed" do
|
72
72
|
next if subject.success?
|
73
73
|
raise(
|
74
74
|
RSpec::Expectations::ExpectationNotMetError,
|
@@ -77,7 +77,7 @@ if defined?(::RSpec)
|
|
77
77
|
)
|
78
78
|
end
|
79
79
|
else
|
80
|
-
specify do
|
80
|
+
specify "is denied" do
|
81
81
|
next if subject.fail?
|
82
82
|
raise(
|
83
83
|
RSpec::Expectations::ExpectationNotMetError,
|
@@ -21,7 +21,7 @@ module ActionPolicy
|
|
21
21
|
#
|
22
22
|
class HaveAuthorizedScope < ::RSpec::Matchers::BuiltIn::BaseMatcher
|
23
23
|
attr_reader :type, :name, :policy, :scope_options, :actual_scopes,
|
24
|
-
|
24
|
+
:target_expectations
|
25
25
|
|
26
26
|
def initialize(type)
|
27
27
|
@type = type
|
@@ -56,7 +56,7 @@ module ActionPolicy
|
|
56
56
|
|
57
57
|
@actual_scopes = ActionPolicy::Testing::AuthorizeTracker.scopings
|
58
58
|
|
59
|
-
matching_scopes = actual_scopes.select {
|
59
|
+
matching_scopes = actual_scopes.select { _1.matches?(policy, type, name, scope_options) }
|
60
60
|
|
61
61
|
return false if matching_scopes.empty?
|
62
62
|
|
@@ -75,9 +75,7 @@ module ActionPolicy
|
|
75
75
|
raise "This matcher doesn't support negation"
|
76
76
|
end
|
77
77
|
|
78
|
-
def supports_block_expectations?
|
79
|
-
true
|
80
|
-
end
|
78
|
+
def supports_block_expectations?() = true
|
81
79
|
|
82
80
|
def failure_message
|
83
81
|
"expected a scoping named :#{name} for type :#{type} " \
|
@@ -109,8 +107,8 @@ module ActionPolicy
|
|
109
107
|
end
|
110
108
|
|
111
109
|
def formatted_scopings
|
112
|
-
actual_scopes.map do
|
113
|
-
" - #{
|
110
|
+
actual_scopes.map do
|
111
|
+
" - #{_1.inspect}"
|
114
112
|
end.join("\n")
|
115
113
|
end
|
116
114
|
end
|
@@ -3,17 +3,6 @@
|
|
3
3
|
module ActionPolicy
|
4
4
|
# Testing utils
|
5
5
|
module Testing
|
6
|
-
# Hack to match both classes and composed matchers:
|
7
|
-
# be_authorized_to(:create?, User)
|
8
|
-
# be_authorized_to(:maanage?, an_instance_of(User))
|
9
|
-
using(Module.new do
|
10
|
-
refine Module do
|
11
|
-
def ===(other)
|
12
|
-
self == other
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end)
|
16
|
-
|
17
6
|
# Collects all Authorizer calls
|
18
7
|
module AuthorizeTracker
|
19
8
|
class Call # :nodoc:
|
@@ -26,7 +15,7 @@ module ActionPolicy
|
|
26
15
|
|
27
16
|
def matches?(policy_class, actual_rule, target)
|
28
17
|
policy_class == policy.class &&
|
29
|
-
target === policy.record &&
|
18
|
+
(target.is_a?(Class) ? target == policy.record : target === policy.record) &&
|
30
19
|
rule == actual_rule
|
31
20
|
end
|
32
21
|
|
@@ -16,10 +16,7 @@ ensure
|
|
16
16
|
end
|
17
17
|
|
18
18
|
module ActionPolicy
|
19
|
-
|
20
|
-
require "action_policy/ext/yield_self_then"
|
21
|
-
using ActionPolicy::Ext::YieldSelfThen
|
22
|
-
end
|
19
|
+
using RubyNext
|
23
20
|
|
24
21
|
# Takes the object and a method name,
|
25
22
|
# and returns the "annotated" source code for the method:
|
@@ -41,7 +38,7 @@ module ActionPolicy
|
|
41
38
|
# #=> AND
|
42
39
|
# #=> access_feed? #=> true
|
43
40
|
module PrettyPrint
|
44
|
-
TRUE =
|
41
|
+
TRUE = "\e[32mtrue\e[0m"
|
45
42
|
FALSE = "\e[31mfalse\e[0m"
|
46
43
|
|
47
44
|
class Visitor
|
@@ -71,7 +68,7 @@ module ActionPolicy
|
|
71
68
|
|
72
69
|
def expression_with_result(sexp)
|
73
70
|
expression = Unparser.unparse(sexp)
|
74
|
-
"#{expression} #=> #{colorize(eval_exp(expression))}"
|
71
|
+
"#{expression} #=> #{PrettyPrint.colorize(eval_exp(expression))}"
|
75
72
|
end
|
76
73
|
|
77
74
|
def eval_exp(exp)
|
@@ -124,39 +121,39 @@ module ActionPolicy
|
|
124
121
|
|
125
122
|
# Some lines should not be evaled
|
126
123
|
def ignore_exp?(exp)
|
127
|
-
exp.match?(
|
128
|
-
end
|
129
|
-
|
130
|
-
def colorize(val)
|
131
|
-
return val unless $stdout.isatty
|
132
|
-
return TRUE if val.eql?(true)
|
133
|
-
return FALSE if val.eql?(false)
|
134
|
-
val
|
124
|
+
PrettyPrint.ignore_expressions.any? { exp.match?(_1) }
|
135
125
|
end
|
136
126
|
end
|
137
127
|
|
138
128
|
class << self
|
129
|
+
attr_accessor :ignore_expressions
|
130
|
+
|
139
131
|
if defined?(::Unparser) && defined?(::MethodSource)
|
140
|
-
def available?
|
141
|
-
true
|
142
|
-
end
|
132
|
+
def available?() = true
|
143
133
|
|
144
134
|
def print_method(object, method_name)
|
145
|
-
ast = object.method(method_name).source.then(&Unparser
|
135
|
+
ast = object.method(method_name).source.then(&Unparser.:parse)
|
146
136
|
# outer node is a method definition itself
|
147
137
|
body = ast.children[2]
|
148
138
|
|
149
139
|
Visitor.new(object).collect(body)
|
150
140
|
end
|
151
141
|
else
|
152
|
-
def available?
|
153
|
-
false
|
154
|
-
end
|
142
|
+
def available?() = false
|
155
143
|
|
156
|
-
def print_method(_, _)
|
157
|
-
|
158
|
-
|
144
|
+
def print_method(_, _) = ""
|
145
|
+
end
|
146
|
+
|
147
|
+
def colorize(val)
|
148
|
+
return val unless $stdout.isatty
|
149
|
+
return TRUE if val.eql?(true)
|
150
|
+
return FALSE if val.eql?(false)
|
151
|
+
val
|
159
152
|
end
|
160
153
|
end
|
154
|
+
|
155
|
+
self.ignore_expressions = [
|
156
|
+
/^\s*binding\.(pry|irb)\s*$/s
|
157
|
+
]
|
161
158
|
end
|
162
159
|
end
|
@@ -5,7 +5,7 @@ class ApplicationPolicy < ActionPolicy::Base
|
|
5
5
|
#
|
6
6
|
# authorize :account, optional: true
|
7
7
|
#
|
8
|
-
# Read more about
|
8
|
+
# Read more about authorization context: https://actionpolicy.evilmartians.io/#/authorization_context
|
9
9
|
|
10
10
|
private
|
11
11
|
|
@@ -8,7 +8,10 @@ module ActionPolicy
|
|
8
8
|
source_root File.expand_path("templates", __dir__)
|
9
9
|
|
10
10
|
def run_install_if_needed
|
11
|
-
|
11
|
+
in_root do
|
12
|
+
return if File.exist?("app/policies/application_policy.rb")
|
13
|
+
end
|
14
|
+
|
12
15
|
generate "action_policy:install"
|
13
16
|
end
|
14
17
|
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_policy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ruby-next-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.10.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.10.3
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: ammeter
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,72 +70,30 @@ dependencies:
|
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '13.0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
82
|
+
version: '13.0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rspec
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '3.3'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '3.3'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 0.67.0
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 0.67.0
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-md
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0.2'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0.2'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: standard
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
87
|
+
- - ">="
|
116
88
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
89
|
+
version: '3.9'
|
118
90
|
type: :development
|
119
91
|
prerelease: false
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
121
93
|
requirements:
|
122
|
-
- - "
|
94
|
+
- - ">="
|
123
95
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
96
|
+
version: '3.9'
|
125
97
|
- !ruby/object:Gem::Dependency
|
126
98
|
name: benchmark-ips
|
127
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -157,68 +129,34 @@ executables: []
|
|
157
129
|
extensions: []
|
158
130
|
extra_rdoc_files: []
|
159
131
|
files:
|
160
|
-
- ".gitattributes"
|
161
|
-
- ".github/FUNDING.yml"
|
162
|
-
- ".github/ISSUE_TEMPLATE.md"
|
163
|
-
- ".github/PULL_REQUEST_TEMPLATE.md"
|
164
|
-
- ".gitignore"
|
165
|
-
- ".rubocop.yml"
|
166
|
-
- ".tidelift.yml"
|
167
|
-
- ".travis.yml"
|
168
132
|
- CHANGELOG.md
|
169
|
-
- Gemfile
|
170
133
|
- LICENSE.txt
|
171
134
|
- README.md
|
172
|
-
-
|
173
|
-
- action_policy.
|
174
|
-
-
|
175
|
-
-
|
176
|
-
-
|
177
|
-
-
|
178
|
-
-
|
179
|
-
-
|
180
|
-
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
184
|
-
-
|
185
|
-
-
|
186
|
-
-
|
187
|
-
-
|
188
|
-
-
|
189
|
-
-
|
190
|
-
-
|
191
|
-
-
|
192
|
-
-
|
193
|
-
-
|
194
|
-
-
|
195
|
-
-
|
196
|
-
-
|
197
|
-
- docs/controller_action_aliases.md
|
198
|
-
- docs/custom_lookup_chain.md
|
199
|
-
- docs/custom_policy.md
|
200
|
-
- docs/debugging.md
|
201
|
-
- docs/decorators.md
|
202
|
-
- docs/favicon.ico
|
203
|
-
- docs/graphql.md
|
204
|
-
- docs/i18n.md
|
205
|
-
- docs/index.html
|
206
|
-
- docs/instrumentation.md
|
207
|
-
- docs/lookup_chain.md
|
208
|
-
- docs/namespaces.md
|
209
|
-
- docs/non_rails.md
|
210
|
-
- docs/pre_checks.md
|
211
|
-
- docs/pundit_migration.md
|
212
|
-
- docs/quick_start.md
|
213
|
-
- docs/rails.md
|
214
|
-
- docs/reasons.md
|
215
|
-
- docs/scoping.md
|
216
|
-
- docs/testing.md
|
217
|
-
- docs/writing_policies.md
|
218
|
-
- gemfiles/jruby.gemfile
|
219
|
-
- gemfiles/rails42.gemfile
|
220
|
-
- gemfiles/rails6.gemfile
|
221
|
-
- gemfiles/railsmaster.gemfile
|
135
|
+
- lib/.rbnext/2.7/action_policy/behaviours/policy_for.rb
|
136
|
+
- lib/.rbnext/2.7/action_policy/i18n.rb
|
137
|
+
- lib/.rbnext/2.7/action_policy/policy/cache.rb
|
138
|
+
- lib/.rbnext/2.7/action_policy/policy/pre_check.rb
|
139
|
+
- lib/.rbnext/2.7/action_policy/rspec/be_authorized_to.rb
|
140
|
+
- lib/.rbnext/2.7/action_policy/rspec/have_authorized_scope.rb
|
141
|
+
- lib/.rbnext/2.7/action_policy/utils/pretty_print.rb
|
142
|
+
- lib/.rbnext/3.0/action_policy/behaviour.rb
|
143
|
+
- lib/.rbnext/3.0/action_policy/behaviours/policy_for.rb
|
144
|
+
- lib/.rbnext/3.0/action_policy/behaviours/scoping.rb
|
145
|
+
- lib/.rbnext/3.0/action_policy/behaviours/thread_memoized.rb
|
146
|
+
- lib/.rbnext/3.0/action_policy/ext/policy_cache_key.rb
|
147
|
+
- lib/.rbnext/3.0/action_policy/policy/aliases.rb
|
148
|
+
- lib/.rbnext/3.0/action_policy/policy/authorization.rb
|
149
|
+
- lib/.rbnext/3.0/action_policy/policy/cache.rb
|
150
|
+
- lib/.rbnext/3.0/action_policy/policy/core.rb
|
151
|
+
- lib/.rbnext/3.0/action_policy/policy/defaults.rb
|
152
|
+
- lib/.rbnext/3.0/action_policy/policy/execution_result.rb
|
153
|
+
- lib/.rbnext/3.0/action_policy/policy/pre_check.rb
|
154
|
+
- lib/.rbnext/3.0/action_policy/policy/reasons.rb
|
155
|
+
- lib/.rbnext/3.0/action_policy/policy/scoping.rb
|
156
|
+
- lib/.rbnext/3.0/action_policy/rspec/be_authorized_to.rb
|
157
|
+
- lib/.rbnext/3.0/action_policy/rspec/have_authorized_scope.rb
|
158
|
+
- lib/.rbnext/3.0/action_policy/utils/pretty_print.rb
|
159
|
+
- lib/.rbnext/3.0/action_policy/utils/suggest_message.rb
|
222
160
|
- lib/action_policy.rb
|
223
161
|
- lib/action_policy/authorizer.rb
|
224
162
|
- lib/action_policy/base.rb
|
@@ -233,10 +171,8 @@ files:
|
|
233
171
|
- lib/action_policy/ext/module_namespace.rb
|
234
172
|
- lib/action_policy/ext/policy_cache_key.rb
|
235
173
|
- lib/action_policy/ext/string_constantize.rb
|
236
|
-
- lib/action_policy/ext/string_match.rb
|
237
174
|
- lib/action_policy/ext/string_underscore.rb
|
238
|
-
- lib/action_policy/ext/
|
239
|
-
- lib/action_policy/ext/yield_self_then.rb
|
175
|
+
- lib/action_policy/ext/symbol_camelize.rb
|
240
176
|
- lib/action_policy/i18n.rb
|
241
177
|
- lib/action_policy/lookup_chain.rb
|
242
178
|
- lib/action_policy/policy/aliases.rb
|
@@ -269,14 +205,14 @@ files:
|
|
269
205
|
- lib/action_policy/version.rb
|
270
206
|
- lib/generators/action_policy/install/USAGE
|
271
207
|
- lib/generators/action_policy/install/install_generator.rb
|
272
|
-
- lib/generators/action_policy/install/templates/application_policy.rb
|
208
|
+
- lib/generators/action_policy/install/templates/application_policy.rb.tt
|
273
209
|
- lib/generators/action_policy/policy/USAGE
|
274
210
|
- lib/generators/action_policy/policy/policy_generator.rb
|
275
|
-
- lib/generators/action_policy/policy/templates/policy.rb
|
211
|
+
- lib/generators/action_policy/policy/templates/policy.rb.tt
|
276
212
|
- lib/generators/rspec/policy_generator.rb
|
277
|
-
- lib/generators/rspec/templates/policy_spec.rb
|
213
|
+
- lib/generators/rspec/templates/policy_spec.rb.tt
|
278
214
|
- lib/generators/test_unit/policy_generator.rb
|
279
|
-
- lib/generators/test_unit/templates/policy_test.rb
|
215
|
+
- lib/generators/test_unit/templates/policy_test.rb.tt
|
280
216
|
homepage: https://github.com/palkan/action_policy
|
281
217
|
licenses:
|
282
218
|
- MIT
|
@@ -294,7 +230,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
294
230
|
requirements:
|
295
231
|
- - ">="
|
296
232
|
- !ruby/object:Gem::Version
|
297
|
-
version: 2.
|
233
|
+
version: 2.5.0
|
298
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
235
|
requirements:
|
300
236
|
- - ">="
|