Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Rails 7.1 #63

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading