authority 2.4.2 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.markdown CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Authority does its best to use [semantic versioning](http://semver.org).
4
4
 
5
+ ## v2.4.3
6
+
7
+ Bugfix for Rails 3.1 - apparently its `class_attribute` method stepped on instance methods even when given `:instance_reader => false`
8
+
5
9
  ## v2.4.2
6
10
 
7
11
  Bugfix - make `authority_resource` inheritable. For instance, if you call `authorize_actions_for Llama` in one controller, a child controller does the same unless told otherwise.
data/README.markdown CHANGED
@@ -6,8 +6,7 @@ Authority will work fine with a standalone app or a single sign-on system. You c
6
6
 
7
7
  It requires that you already have some kind of user object in your application, accessible from all controllers and views via a method like `current_user` (configurable).
8
8
 
9
- <!--[![Build Status](https://secure.travis-ci.org/nathanl/authority.png?branch=master)](http://travis-ci.org/nathanl/authority) -->
10
- <!-- [![Dependency Status](https://gemnasium.com/nathanl/authority.png)](https://gemnasium.com/nathanl/authority) -->
9
+ [![Build Status](https://secure.travis-ci.org/nathanl/authority.png?branch=master)](http://travis-ci.org/nathanl/authority)
11
10
  [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/nathanl/authority)
12
11
 
13
12
  ## Contents
@@ -14,7 +14,7 @@ module Authority
14
14
 
15
15
  included do
16
16
  rescue_from(Authority::SecurityViolation, :with => Authority::Controller.security_violation_callback)
17
- class_attribute :authority_resource, instance_reader: false
17
+ class_attribute :authority_resource, :instance_reader => false
18
18
  end
19
19
 
20
20
  module ClassMethods
@@ -89,10 +89,10 @@ module Authority
89
89
  # The `before_filter` that will be setup to run when the class method
90
90
  # `authorize_actions_for` is called
91
91
  def run_authorization_check
92
- authorize_action_for authority_resource
92
+ authorize_action_for instance_authority_resource
93
93
  end
94
94
 
95
- def authority_resource
95
+ def instance_authority_resource
96
96
  return self.class.authority_resource if self.class.authority_resource.is_a?(Class)
97
97
  send(self.class.authority_resource)
98
98
  rescue NoMethodError => e
@@ -1,3 +1,3 @@
1
1
  module Authority
2
- VERSION = "2.4.2"
2
+ VERSION = "2.4.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authority
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-18 00:00:00.000000000 Z
13
+ date: 2013-02-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
89
  version: '0'
90
90
  segments:
91
91
  - 0
92
- hash: 3595065084412146682
92
+ hash: 4595590261951067039
93
93
  required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  segments:
100
100
  - 0
101
- hash: 3595065084412146682
101
+ hash: 4595590261951067039
102
102
  requirements: []
103
103
  rubyforge_project:
104
104
  rubygems_version: 1.8.24