permission_policy 0.0.5 → 0.0.6

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: cadbc4ee32c7e36250e69cd96ed2bce398e78576
4
- data.tar.gz: de595ace7d5f9b59a673f7f321cc30c170c32fbe
3
+ metadata.gz: d197b0a408448eb634f15c4229434f643229daca
4
+ data.tar.gz: a3861829e10f0738d884080167e91f76cb802736
5
5
  SHA512:
6
- metadata.gz: a008f46a93ce18c0e4362ab3bc1df6c333ef5f15cf54203e7fbcd366a4e7a2038b8a060b544fc9dbba8df3a7a1866c34d715bab826c8d66022681c7fa567b124
7
- data.tar.gz: 4141460cc62059eadc6f25b4fdc3f20c2de89e74e950bcbf313e543a2d2159aaa1e0190059a9f274ff65549779a81d5ea21fc245ff723c3da82a64304a5cbf03
6
+ metadata.gz: aa90267b5878dbdad8f3140a0ac8f5e08a2db1e8aa06e8d6e742eb36d07491a4fc91989d23a7b6844e7bf9fb42f73a4019ba1e620c105fff55624bb69405ca88
7
+ data.tar.gz: 12974cc8b86fabea2530d79872816bcd1bc94810d9fcbc1270f2fe193921b0b7f92ba93d6bae8938cd2b126b3befa36cc8b0468769522c062402169c774a6cd7
data/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ # 0.0.6
3
+
4
+ * [ENHANCEMENT] moar convenience with `skip_verify_authorization`
5
+ * [BUGFIX] `@permission_policy` might be `nil`
6
+
2
7
  # 0.0.5
3
8
 
4
9
  * [REVERT] the logger was a good idea, but I'm not happy with the implementation
@@ -7,8 +7,12 @@ module PermissionPolicy
7
7
  PermissionPolicy.authorize_with(*args)
8
8
  end
9
9
 
10
- def verify_authorization!(setting = true)
11
- PermissionPolicy.verify_authorization!(setting)
10
+ def verify_authorization!
11
+ PermissionPolicy.verify_authorization!(true)
12
+ end
13
+
14
+ def skip_verify_authorization
15
+ PermissionPolicy.verify_authorization!(false)
12
16
  end
13
17
  end
14
18
 
@@ -27,7 +31,7 @@ module PermissionPolicy
27
31
  end
28
32
 
29
33
  def verify_authorization
30
- raise PermissionPolicy::NotVerified unless @permission_policy.verified
34
+ raise PermissionPolicy::NotVerified unless permission_policy.verified
31
35
  end
32
36
  end
33
37
  end
@@ -1,3 +1,3 @@
1
1
  module PermissionPolicy
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: permission_policy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Schaden