you_shall_not_pass 0.3.0 → 0.3.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ebad4de4047910ba8bc2684832012f9669ad584
|
4
|
+
data.tar.gz: 644514d9430543ac82fc12156b1c788e7742b806
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3f670c878377f76dd39e58971eace445b2f176ffc59160c41d526d2799e6922f95f06b2e8cf14e9e653defc1da346ec31172f41947e9bc352575d63297e9138
|
7
|
+
data.tar.gz: b3a1b8c9c9a550372727581bdafe217c58be3930d2db122a1e1ad1c54267be948cd59a92f913881b2d6a7f523f6dc607077338101802f9ec4e5ea01d4abb3e8d
|
@@ -207,7 +207,7 @@ scope YouShallNotPass::Authorizator do
|
|
207
207
|
@i_can = true
|
208
208
|
end
|
209
209
|
|
210
|
-
|
210
|
+
@i_can
|
211
211
|
end
|
212
212
|
end
|
213
213
|
|
@@ -456,7 +456,10 @@ scope YouShallNotPass::Authorizator do
|
|
456
456
|
policy(:true) { true }
|
457
457
|
policy(:false) { false }
|
458
458
|
|
459
|
-
policy(:login) { user == pass}
|
459
|
+
policy(:login) { |user:, pass:| user == pass}
|
460
|
+
|
461
|
+
policy(:use_args) { |**args| args.all? { |k, v| k == v } }
|
462
|
+
|
460
463
|
end
|
461
464
|
|
462
465
|
let(:authorizator) { DslAuthorizator.new(user: "fede", pass: "fede") }
|
@@ -470,7 +473,11 @@ scope YouShallNotPass::Authorizator do
|
|
470
473
|
end
|
471
474
|
|
472
475
|
spec do
|
473
|
-
authorizator.can?(:login)
|
476
|
+
authorizator.can?(:login, user: "u", pass: "u")
|
477
|
+
end
|
478
|
+
|
479
|
+
spec "creates with params" do
|
480
|
+
authorizator.can?(:use_args, a: :a, b: :b)
|
474
481
|
end
|
475
482
|
|
476
483
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: you_shall_not_pass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Iachetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|