Skip to content

Commit

Permalink
Merge branch 'release/2.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
coorasse committed Jan 16, 2018
2 parents aef8e47 + 47bf5d9 commit b602439
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ cache: bundler
sudo: false
rvm:
- 2.2.0
- 2.2.7
- 2.3.4
- 2.4.1
- 2.2.8
- 2.3.5
- 2.4.2
- jruby-9.0.5.0
- jruby-9.1.8.0
- jruby-9.1.9.0
gemfile:
- gemfiles/activerecord_4.2.gemfile
- gemfiles/activerecord_5.0.2.gemfile
Expand All @@ -27,11 +27,11 @@ matrix:
gemfile: gemfiles/activerecord_5.1.0.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/activerecord_5.0.2.gemfile
- rvm: jruby-9.1.8.0
- rvm: jruby-9.1.9.0
gemfile: gemfiles/activerecord_5.0.2.gemfile
- rvm: jruby-9.0.5.0
gemfile: gemfiles/activerecord_5.1.0.gemfile
- rvm: jruby-9.1.8.0
- rvm: jruby-9.1.9.0
gemfile: gemfiles/activerecord_5.1.0.gemfile
notifications:
email:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ Unreleased

* Removed support for dynamic finders (coorasse)

2.1.3 (Jan 16th, 2018)

* Fix compatibility with Rails 5 API (Eric-Guo)

2.1.2 (Nov 22th, 2017)

* Various bugfixes on version 2.1.0
Expand Down
2 changes: 1 addition & 1 deletion cancancan.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.files = `git ls-files lib init.rb cancancan.gemspec`.split($INPUT_RECORD_SEPARATOR)
s.require_paths = ['lib']

s.required_ruby_version = '>= 2.0.0'
s.required_ruby_version = '>= 2.2.0'

s.add_development_dependency 'bundler', '~> 1.3'
s.add_development_dependency 'rubocop', '~> 0.48.1'
Expand Down
11 changes: 7 additions & 4 deletions lib/cancan/controller_additions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,12 @@ def cannot?(*args)
end
end

if defined? ActionController
%w[Base API].each do |klass|
next unless ActionController.const_defined?(klass)
ActionController.const_get(klass).class_eval { include CanCan::ControllerAdditions }
if defined? ActionController::Base
ActionController::Base.class_eval do
include CanCan::ControllerAdditions
end
elsif defined? ActionController::API
ActionController::API.class_eval do
include CanCan::ControllerAdditions
end
end
2 changes: 1 addition & 1 deletion lib/cancan/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module CanCan
VERSION = '2.1.2'.freeze
VERSION = '2.1.3'.freeze
end

0 comments on commit b602439

Please sign in to comment.