guachiman-rails 1.0.0 → 1.0.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: ca694ac3fec1d1179952e41b68a276118b4764e1
4
- data.tar.gz: 27de1eaba78fcfc39d17acb22f274d02462e9941
3
+ metadata.gz: a3cd2e45fb790e37d3c8a18781000d412ab7b61d
4
+ data.tar.gz: 3152d384cb9a4e4fd9f7af9bda1999116eaa6f81
5
5
  SHA512:
6
- metadata.gz: 1fb2084f06f27022c2d3872179c677a9bcc25d89731d32d676e724c6abcc8790c1fa13d8569374cb4f0cdc6a0fe82a4455afa6438260a4096b55f65e640f628e
7
- data.tar.gz: 4d1a43dfc5090efbbefe9994c63c74891f761493d9c565b67085341c36c28073adfe62a1ba85352560327946f8cdc69d58921f5442e558a2bf09a21d92c57984
6
+ metadata.gz: 88e08132f839d072b12b83f1e45358de870583854c8e04316ba95c4551f1838e9cd40ff2cc791aa14906be7b38a6dd4fa8d4a72a903e60d7886cc37e040e4297
7
+ data.tar.gz: 45a3f55a2385cda8d709aa0bddb7f42722ad50166242d55c0a6c9c524bc9d23433228cd07ca3d45d72ad799566b8cf3b5cdb4833af62859e3c876b88feb15266
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- Guachiman for Rails
2
- ===================
1
+ guachiman-rails
2
+ ===============
3
3
 
4
4
  Basic Authorization gem for rails based on [RailsCast #385 Authorization from Scratch][1] by Ryan Bates.
5
5
  Built on top of [guachiman][2].
@@ -64,7 +64,7 @@ Defaults to `false`.
64
64
 
65
65
  ```ruby
66
66
  def skip_authorization?
67
- current_user.admin?
67
+ current_user && current_user.admin?
68
68
  end
69
69
  ```
70
70
 
@@ -21,6 +21,6 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'railties', '~> 4.0', '>= 4.0.0'
22
22
 
23
23
  spec.add_development_dependency 'rake', '~> 10.3', '>= 10.3.0'
24
- spec.add_development_dependency 'minitest', '~> 5.3', '>= 5.3.3'
24
+ spec.add_development_dependency 'minitest', '~> 5.4', '>= 5.4.0'
25
25
  spec.add_development_dependency 'bundler', '~> 1.6', '>= 1.6.0'
26
26
  end
@@ -7,7 +7,11 @@ module Guachiman
7
7
  end
8
8
 
9
9
  def authorization
10
- @authorization ||= Authorization.new(current_user)
10
+ @authorization ||= authorization_class.new(current_user)
11
+ end
12
+
13
+ def authorization_class
14
+ Authorization
11
15
  end
12
16
 
13
17
  def current_user
@@ -1,5 +1,5 @@
1
1
  module Guachiman
2
2
  module Rails
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guachiman-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Rodriguez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-23 00:00:00.000000000 Z
12
+ date: 2014-07-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guachiman
@@ -77,20 +77,20 @@ dependencies:
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '5.3'
80
+ version: '5.4'
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 5.3.3
83
+ version: 5.4.0
84
84
  type: :development
85
85
  prerelease: false
86
86
  version_requirements: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '5.3'
90
+ version: '5.4'
91
91
  - - ">="
92
92
  - !ruby/object:Gem::Version
93
- version: 5.3.3
93
+ version: 5.4.0
94
94
  - !ruby/object:Gem::Dependency
95
95
  name: bundler
96
96
  requirement: !ruby/object:Gem::Requirement