papers_please 0.0.2.beta → 0.0.3.beta

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
  SHA256:
3
- metadata.gz: d12ab3dd8981fb3a6fb74a02b0f34e917438792c2151562c9945a04c79d50d9d
4
- data.tar.gz: 694b9b96b9057e122392a2382488bfbecc877b881cf681e07dcb066091d2bd8c
3
+ metadata.gz: dfc4c5fd0a8edd23d0befb5b369c2c87247927230893534ddd338d504eccf72f
4
+ data.tar.gz: aa89dd7a72410900567bbd3b44f7ea7cd57abd44821d478499310fd8b99b7cd0
5
5
  SHA512:
6
- metadata.gz: 80a53cd2301779d6a332c1c01d495f54035886d64a5d3d23e3434de008b5fac367e9a351eb96ef1a842b9c1ae4207045c28c739a43d0f3e78def7e7836f65680
7
- data.tar.gz: cc6193a203effc3bff3f3351359550ac71fcf4ca83bd1d1f0cd31ed918f2a083c410638e9c6c2e2e1fd2ea21da3cb7555c57a34f3118bf8c5472a5d35e72abdb
6
+ metadata.gz: a427adc6461f8d3e3641afcb1778e737811404bac92dd5637d621c88c9dc7c3d4b52d4fd745d9272fc5e5a2848a2e8c24c2302527921bf4e5013ad9acdf14cfb
7
+ data.tar.gz: ae00489c552cf58bfaa20555fcde4e0d84b9356b8d835d2e9d015bcfd683afce7f57dcb2f1880d801137f1aab443e2dbdca39938cc4907b42224b991d0623a23
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- papers_please (0.0.1.beta)
4
+ papers_please (0.0.3.beta)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -9,7 +9,7 @@ A roles and permissions gem from Apsis Labs.
9
9
  ```ruby
10
10
  # app/policies/access_policy.rb
11
11
  class AccessPolicy < PapersPlease::Policy
12
- config do
12
+ def configure
13
13
  # Define a role in a block
14
14
  role :admin, (proc { |u| u.admin? }) do
15
15
  grant [:manage, :archive], Post
@@ -12,7 +12,7 @@ module PapersPlease
12
12
  end
13
13
 
14
14
  def configure
15
- raise NotImplementedError
15
+ raise NotImplementedError, "The #configure method of the access policy was not implemented"
16
16
  end
17
17
 
18
18
  # Add a role to the Policy
@@ -43,7 +43,7 @@ module PapersPlease
43
43
  end
44
44
 
45
45
  def authorize!(action, subject)
46
- raise AccessDenied.new(action, subject) if cannot?(action, subject)
46
+ raise AccessDenied.new("Access denied for #{action} on #{subject}") if cannot?(action, subject)
47
47
  subject
48
48
  end
49
49
 
@@ -1,3 +1,3 @@
1
1
  module PapersPlease
2
- VERSION = "0.0.2.beta"
2
+ VERSION = "0.0.3.beta"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papers_please
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.beta
4
+ version: 0.0.3.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apsis Labs