authority 3.2.1 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6807a134d4eaf6379becb0f913924baa5f03e396
4
- data.tar.gz: 2cf81ed57c186516dd26a6bfc63394e1b0784400
3
+ metadata.gz: 209f70400ce02fb82c4ecb564e7f21607d48be15
4
+ data.tar.gz: 9175a6345c96dbe3dd3f18278b35679f4a061677
5
5
  SHA512:
6
- metadata.gz: 7f09a2d8e2bbf1107fcbb641fc3449073312ddf869f2d0ab4eed34c0a2d407a932e9160db59bacf7dd25a7cc66742227595a974d2aaab1b5f1db4443e37c4786
7
- data.tar.gz: d51cf95c7d1c6353faa3843194a1824ace890c38125f2b9c08b0ee7bf9cb3e4a127478c507669b9df2b25c41892dcd183f4644da833cc7fc233a4c3e434bd4ca
6
+ metadata.gz: 270796016add52f4a991b33de28b1f835b84fa66ae4c1f38bf3d5996d352b640d2ada5d700a38e6a5c6617391886b948620ca6123ffdfeaa9daec560bcce5109
7
+ data.tar.gz: 0836bfb4004649c65c47bfb09558d2e91f954e235a157364519852502288083df11a675b008dcf634dc086314e9d59e965ac3a6a3ca599ffe0f8de1e2a4946e2
@@ -2,6 +2,14 @@
2
2
 
3
3
  Authority does its best to use [semantic versioning](http://semver.org).
4
4
 
5
+ ## Unreleased
6
+
7
+ (nothing)
8
+
9
+ ## 3.2.2
10
+
11
+ - [Fix Rails 5 `after_filter` deprecation warning](https://github.com/nathanl/authority/pull/115), thanks to [Erik Axel Nielsen](https://github.com/erikaxel))
12
+
5
13
  ## 3.2.1
6
14
 
7
15
  - Allow supplying extra arguments to authorizers in `authorize_actions_for` via the `:args` parameter.
@@ -77,9 +77,15 @@ module Authority
77
77
 
78
78
  # Convenience wrapper for instance method
79
79
  def ensure_authorization_performed(options = {})
80
- after_filter(options.slice(:only, :except)) do |controller_instance|
81
- controller_instance.ensure_authorization_performed(options)
82
- end
80
+ if respond_to? :after_action
81
+ after_action(options.slice(:only, :except)) do |controller_instance|
82
+ controller_instance.ensure_authorization_performed(options)
83
+ end
84
+ else
85
+ after_filter(options.slice(:only, :except)) do |controller_instance|
86
+ controller_instance.ensure_authorization_performed(options)
87
+ end
88
+ end
83
89
  end
84
90
 
85
91
  # The controller action to authority action map used for determining
@@ -1,3 +1,3 @@
1
1
  module Authority
2
- VERSION = "3.2.1"
2
+ VERSION = "3.2.2"
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: 3.2.1
4
+ version: 3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Long
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-10-05 00:00:00.000000000 Z
12
+ date: 2016-12-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport