Skip to content

Commit

Permalink
Merge pull request #63 from khiav223577/feature/support_rails_7_1
Browse files Browse the repository at this point in the history
Support Rails 7.1
  • Loading branch information
khiav223577 authored Dec 24, 2023
2 parents 54ab569 + c212740 commit 5ca4700
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- active_record_60.gemfile
- active_record_61.gemfile
- active_record_70.gemfile
- active_record_71.gemfile
- mongoid_54.gemfile
- mongoid_64.gemfile
- mongoid_73.gemfile
Expand Down Expand Up @@ -91,6 +92,12 @@ jobs:
ruby: 2.6
- gemfile: active_record_70.gemfile
orm: MONGOID
- gemfile: active_record_71.gemfile
ruby: 2.3
- gemfile: active_record_71.gemfile
ruby: 2.6
- gemfile: active_record_71.gemfile
orm: MONGOID
- gemfile: mongoid_54.gemfile
ruby: 2.7
- gemfile: mongoid_54.gemfile
Expand Down
19 changes: 19 additions & 0 deletions gemfiles/active_record_71.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
source 'https://rubygems.org'

# Specify your gem's dependencies in pluck_all.gemspec

gem 'sqlite3', '~> 1.4.1'
gem 'zeitwerk'
gem 'activerecord', '~> 7.1.2'
gem 'rails_compatibility', '~> 0.0.7'

gem 'carrierwave', '~> 0.11.0'
gem 'mimemagic', '< 0.4.3' # Used by carrierwave gem

# gem 'globalize', '~> 6.0.1' # TODO: wait for globalize to support Rails 7.

group :test do
gem 'simplecov', '< 0.18'
end

gemspec path: '../'
7 changes: 6 additions & 1 deletion test/active_record/carrierwave_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ def test_pluck_without_carrierwave

def test_pluck_without_cast_need_columns
error = assert_raises(ActiveModel::MissingAttributeError){ @users.pluck_all(:name, :pet_pic) }
assert_equal 'missing attribute: name', error.message

if Gem::Version.new(ActiveRecord::VERSION::STRING) >= Gem::Version.new('7.1.0')
assert_equal "missing attribute 'name' for User", error.message
else
assert_equal 'missing attribute: name', error.message
end
end

def test_pluck_with_carrierwave_and_join
Expand Down

0 comments on commit 5ca4700

Please sign in to comment.