Skip to content

Commit

Permalink
Merge pull request #26 from khiav223577/feature/support_rails_7_2
Browse files Browse the repository at this point in the history
Support Ruby 3.2 and Rails 7.2
  • Loading branch information
khiav223577 authored Sep 9, 2024
2 parents 5a63dc7 + 242ece5 commit db3ce9b
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,52 @@ jobs:
- 2.6
- 2.7
- 3.0
- 3.2
gemfile:
- 3.2.gemfile
- 4.2.gemfile
- 5.0.gemfile
- 5.1.gemfile
- 5.2.gemfile
- 6.0.gemfile
- 7.2.gemfile
exclude:
- gemfile: 3.2.gemfile
ruby: 2.6
- gemfile: 3.2.gemfile
ruby: 3.0
- gemfile: 3.2.gemfile
ruby: 3.2
- gemfile: 3.2.gemfile
ruby: 2.7
- gemfile: 4.2.gemfile
ruby: 2.7
- gemfile: 4.2.gemfile
ruby: 3.0
- gemfile: 4.2.gemfile
ruby: 3.2
- gemfile: 5.0.gemfile
ruby: 3.0
- gemfile: 5.0.gemfile
ruby: 3.2
- gemfile: 5.1.gemfile
ruby: 3.0
- gemfile: 5.1.gemfile
ruby: 3.2
- gemfile: 5.2.gemfile
ruby: 3.0
- gemfile: 5.2.gemfile
ruby: 3.2
- gemfile: 6.0.gemfile
ruby: 2.2
- gemfile: 7.2.gemfile
ruby: 2.2
- gemfile: 7.2.gemfile
ruby: 2.6
- gemfile: 7.2.gemfile
ruby: 2.7
- gemfile: 7.2.gemfile
ruby: 3.0
include:
- db: makara_mysql
gemfile: 6.0.gemfile
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
All methods are defined in `Atomically::QueryService` instead of defining in `ActiveRecord` directly, in order not to pollute the model instance.

## Supports
- Ruby 2.2 ~ 2.7, 3.0
- Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0
- Ruby 2.2 ~ 2.7, 3.0, 3.2
- Rails 3.2, 4.2, 5.0, 5.1, 5.2, 6.0, 7.2
- MySQL, PostgreSQL

## Table of contents
Expand Down
1 change: 1 addition & 0 deletions atomically.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pg', '~> 0.18'
spec.add_development_dependency 'pluck_all', '>= 2.0.3'
spec.add_development_dependency 'timecop', '~> 0.9.1'
spec.add_development_dependency 'rails_compatibility', '>= 0.0.8'

spec.add_dependency 'activerecord', '>= 3'
spec.add_dependency 'activerecord-import', '>= 0.27.0'
Expand Down
1 change: 1 addition & 0 deletions gemfiles/3.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ group :test do
gem 'pluck_all', '>= 2.0.3'
gem 'timecop', '~> 0.9.1'
gem 'update_all_scope', '~> 0.1.0'
gem 'rails_compatibility', '>= 0.0.8'
end

gemspec path: '../'
1 change: 1 addition & 0 deletions gemfiles/4.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ group :test do
gem 'pluck_all', '>= 2.0.3'
gem 'timecop', '~> 0.9.1'
gem 'update_all_scope', '~> 0.1.0'
gem 'rails_compatibility', '>= 0.0.8'
end

gemspec path: '../'
1 change: 1 addition & 0 deletions gemfiles/5.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ group :test do
gem 'pluck_all', '>= 2.0.3'
gem 'timecop', '~> 0.9.1'
gem 'update_all_scope', '~> 0.1.0'
gem 'rails_compatibility', '>= 0.0.8'
end

gemspec path: '../'
1 change: 1 addition & 0 deletions gemfiles/5.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ group :test do
gem 'pluck_all', '>= 2.0.3'
gem 'timecop', '~> 0.9.1'
gem 'update_all_scope', '~> 0.1.0'
gem 'rails_compatibility', '>= 0.0.8'
end

gemspec path: '../'
1 change: 1 addition & 0 deletions gemfiles/5.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ group :test do
gem 'pluck_all', '>= 2.0.3'
gem 'timecop', '~> 0.9.1'
gem 'update_all_scope', '~> 0.1.0'
gem 'rails_compatibility', '>= 0.0.8'
end

gemspec path: '../'
1 change: 1 addition & 0 deletions gemfiles/6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ group :test do
gem 'pluck_all', '>= 2.0.4'
gem 'timecop', '~> 0.9.1'
gem 'update_all_scope', '~> 0.1.0'
gem 'rails_compatibility', '>= 0.0.8'
end

gemspec path: '../'
17 changes: 17 additions & 0 deletions gemfiles/7.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
source 'https://rubygems.org'

gem 'activerecord', '~> 7.2.1'

group :test do
gem 'mysql2', '0.5.1' if %w[mysql makara_mysql].include?(ENV['DB'])
gem 'pg', '~> 1.4.6' if %w[pg makara_pg].include?(ENV['DB'])
gem 'makara', '~> 0.4.1' if %w[makara_mysql makara_pg].include?(ENV['DB'])
gem 'simplecov', '< 0.18'
gem 'pluck_all', '>= 2.0.4'
gem 'timecop', '~> 0.9.1'
gem 'update_all_scope', '~> 0.1.0'
gem 'rails_compatibility', '>= 0.0.8'
gem 'zeitwerk', '~> 2.6.18'
end

gemspec path: '../'
5 changes: 3 additions & 2 deletions test/lib/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# frozen_string_literal: true

require 'rails_compatibility/setup_autoload_paths'
RailsCompatibility.setup_autoload_paths [File.expand_path('../models/', __FILE__)]

ActiveRecord::Schema.define do
self.verbose = false

Expand Down Expand Up @@ -27,8 +30,6 @@
end
end

ActiveSupport::Dependencies.autoload_paths << File.expand_path('../models/', __FILE__)

users = User.create([
{ name: 'user_with_bomb_and_water_gun', money: 100, action_point: 3 },
{ name: 'user_with_bomb', money: 200, action_point: 0 },
Expand Down

0 comments on commit db3ce9b

Please sign in to comment.