natural_resource 0.1.4 → 0.1.5
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ea31df94daa5b52a358be08a53bf9cc5dfed896
|
4
|
+
data.tar.gz: 43b4befa5d781b407a5e03209b5783383a4db93f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae3e9e9d293dbf36b1707d11c0c405beebca229254c4e635775aa4abe9e97da3b72c92693f004f65ed54ecd6545f8b20636449c1353555574cc8bd67807f821e
|
7
|
+
data.tar.gz: 20c6a91a90c7275c25c7bca0357ee6353ff947aee18bea5809a98aa4fe777e247067e218b57aa041ca4a37c4a8f03aca3f67e6e9f80b142b733a2436094413b1
|
@@ -0,0 +1,13 @@
|
|
1
|
+
RSpec::Matchers.define :permit_auth do |action|
|
2
|
+
match do |policy|
|
3
|
+
policy.public_send("#{action}?")
|
4
|
+
end
|
5
|
+
|
6
|
+
failure_message do |policy|
|
7
|
+
"#{policy.class} does not permit #{action} on #{policy.record} for #{policy.user.inspect}."
|
8
|
+
end
|
9
|
+
|
10
|
+
failure_message_when_negated do |policy|
|
11
|
+
"#{policy.class} does not forbid #{action} on #{policy.record} for #{policy.user.inspect}."
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: natural_resource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert White
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- lib/generators/natural/install/USAGE
|
136
136
|
- lib/generators/natural/install/install_generator.rb
|
137
137
|
- lib/generators/natural/install/templates/application_policy.rb
|
138
|
+
- lib/generators/natural/install/templates/pundit.rb
|
138
139
|
- lib/generators/natural/resource/USAGE
|
139
140
|
- lib/generators/natural/resource/resource_generator.rb
|
140
141
|
- lib/generators/rspec/policy_generator.rb
|