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 ActiveRecord 8.0.0.alpha #710

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions Gemfile.rails-main
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source "https://rubygems.org"

gemspec

gem "rails", github: "rails/rails", branch: "main"
gem 'sqlite3'
gem 'activerecord-jdbcsqlite3-adapter', platforms: [:jruby]
gem 'activerecord-import'

gem "rspec"
1 change: 1 addition & 0 deletions lib/bullet/active_record_main.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative 'active_record72'
6 changes: 6 additions & 0 deletions lib/bullet/dependency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def active_record_version
'active_record71'
elsif active_record72?
'active_record72'
elsif active_record_main?
'active_record_main'
else
raise "Bullet does not support active_record #{::ActiveRecord::VERSION::STRING} yet"
end
Expand Down Expand Up @@ -76,6 +78,10 @@ def active_record7?
active_record? && ::ActiveRecord::VERSION::MAJOR == 7
end

def active_record_main?
active_record? && ::ActiveRecord::VERSION::MAJOR == 8
end

def active_record40?
active_record4? && ::ActiveRecord::VERSION::MINOR == 0
end
Expand Down
2 changes: 1 addition & 1 deletion lib/bullet/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Bullet
VERSION = '7.2.0'
VERSION = '8.0.0.alpha'
end
1 change: 1 addition & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#bundle update rails && bundle exec rspec spec
#BUNDLE_GEMFILE=Gemfile.mongoid bundle update mongoid && BUNDLE_GEMFILE=Gemfile.mongoid bundle exec rspec spec
BUNDLE_GEMFILE=Gemfile.rails-main bundle && BUNDLE_GEMFILE=Gemfile.rails-main bundle exec rspec spec
BUNDLE_GEMFILE=Gemfile.rails-7.2 bundle && BUNDLE_GEMFILE=Gemfile.rails-7.2 bundle exec rspec spec
BUNDLE_GEMFILE=Gemfile.rails-7.1 bundle && BUNDLE_GEMFILE=Gemfile.rails-7.1 bundle exec rspec spec
BUNDLE_GEMFILE=Gemfile.rails-7.0 bundle && BUNDLE_GEMFILE=Gemfile.rails-7.0 bundle exec rspec spec
Expand Down