action_policy 0.4.0 → 0.4.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 +4 -0
- data/lib/action_policy/testing.rb +11 -0
- data/lib/action_policy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da3eeea696df1575a8760726735ecc8a904e1740424dbf0c808689f0411be7a6
|
4
|
+
data.tar.gz: 9bbe91fcf1c0ce50ae029ceeca533c93a7d686777b7d2dc64556790e0adde9b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b7899a9c61c1c61178b3d2cb5c5bd57f526518ffab96211e747edcba7e8f88a1c8d35452416551331d7e78cca87639bd90f34508f3ebb6edda66a8efe0fab42
|
7
|
+
data.tar.gz: 95029c9883cbe100b9fdc0368446184f9487075923e8151eba0ba02dd5c9da6cc11b31e96b2053ff2f034fcaed200bfc157c6b7eab1c60e38553403113205b6f
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
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
|
+
|
6
17
|
# Collects all Authorizer calls
|
7
18
|
module AuthorizeTracker
|
8
19
|
class Call # :nodoc:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: action_policy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.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: 2019-12-
|
11
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ammeter
|