Skip to content

Commit

Permalink
Update for Rails 5 Beta 2
Browse files Browse the repository at this point in the history
  • Loading branch information
craig1410 committed Feb 24, 2016
1 parent 54c18bd commit 9090f1a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ appraise "activerecord_4.2" do
end

appraise "activerecord_5.0" do
gem "activerecord", "~> 5.0.0.beta1", :require => "active_record"
gem 'activesupport', '~> 5.0.0.beta1', :require => 'active_support/all'
gem "activerecord", "~> 5.0.0.beta2", :require => "active_record"
gem 'activesupport', '~> 5.0.0.beta2', :require => 'active_support/all'

gemfile.platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter"
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/activerecord_5.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

source "https://rubygems.org"

gem "activerecord", "~> 5.0.0.beta1", :require => "active_record"
gem "activesupport", "~> 5.0.0.beta1", :require => "active_support/all"
gem "activerecord", "~> 5.0.0.beta2", :require => "active_record"
gem "activesupport", "~> 5.0.0.beta2", :require => "active_support/all"

platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter"
Expand Down
2 changes: 1 addition & 1 deletion lib/cancan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

if defined? ActiveRecord
require 'cancan/model_adapters/active_record_adapter'
if ActiveRecord.respond_to?(:version) && ActiveRecord.version >= Gem::Version.new("5.0.0.beta1")
if ActiveRecord.respond_to?(:version) && ActiveRecord.version >= Gem::Version.new("5.0.0.beta2")
require 'cancan/model_adapters/active_record_5_adapter'
elsif ActiveRecord.respond_to?(:version) && ActiveRecord.version >= Gem::Version.new("4")
require 'cancan/model_adapters/active_record_4_adapter'
Expand Down
2 changes: 1 addition & 1 deletion spec/cancan/model_adapters/active_record_adapter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class User < ActiveRecord::Base

it "is for only active record classes" do
if ActiveRecord.respond_to?(:version) &&
ActiveRecord.version >= Gem::Version.new("5.0.0.beta1")
ActiveRecord.version >= Gem::Version.new("5.0.0.beta2")
expect(CanCan::ModelAdapters::ActiveRecord5Adapter).to_not be_for_class(Object)
expect(CanCan::ModelAdapters::ActiveRecord5Adapter).to be_for_class(Article)
expect(CanCan::ModelAdapters::AbstractAdapter.adapter_class(Article)).to eq(CanCan::ModelAdapters::ActiveRecord5Adapter)
Expand Down

0 comments on commit 9090f1a

Please sign in to comment.