Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f0301b3
Set default target rails version v6.0.0
AnD00 Mar 22, 2021
65b2df1
Add target rails version 6.0.0
AnD00 Mar 23, 2021
9ca1b20
Add ar60_or_later? method to Util
AnD00 Mar 23, 2021
27c0aac
Follow AR::Transaction changes on 6.0.0
AnD00 Mar 22, 2021
d52a1dd
Follow AR::Persistence changes on 6.0.0
AnD00 Mar 23, 2021
1c2e497
Follow AR::LogSubscriber changes on 6.0.0
AnD00 Mar 23, 2021
92a3fb9
Follow AR::SchemaDumper changes on 6.0.0
AnD00 Mar 23, 2021
9c7aad2
Follow AR::AbstractAdapter changes on 6.0.0
AnD00 Mar 23, 2021
dd3eb85
Follow AR::QueryCache changes on 6.0.0
AnD00 Mar 23, 2021
cbf385b
Fix warnings for Ruby2.7, compatible under Ruby2.6.
hirocaster Feb 10, 2023
bf6ffb2
Update Rails version 6.0.4
hirocaster Apr 21, 2023
d5f5118
Support Rails 6.0.4
hirocaster Apr 21, 2023
160f7b9
Add Rails 6.0.4 gemfile
hirocaster Apr 21, 2023
3b9bb50
Update Rails 6.0.6.1
hirocaster Apr 21, 2023
e4efb75
Fix deprecated method, will be removed from Rails 6.1
hirocaster Jun 8, 2023
0011186
Fix: ensure syntax for ruby 2.4
akariiijima Jun 27, 2023
3d4a955
Merge pull request #19 from akariiijima/add-begin-end-for-ruby2.4-ens…
hirocaster Jun 27, 2023
1814a67
Add rails 6.0.1, 6.0.2, 6.0.3, 6.0.5, 6.0.6 gemfiles
akariiijima Jun 27, 2023
a7e1bba
Delete gem minitest because minitest is a testing library built into …
akariiijima Aug 23, 2023
97226a4
Delete gem mocha because of not being used now
akariiijima Aug 23, 2023
79b2a12
Add gem mysql ~> 0.4.4 to rails 5.0.7
akariiijima Aug 23, 2023
1ebf5ab
Add gem mysql ~> 0.5.2 to rails 5.1.6 (mysql 0.5.X is supported for m…
akariiijima Aug 23, 2023
f4052d4
Add rails 5.1.7, 5.2.2, 5.2.3, 5.2.4, 5.2.5, 5.2.6, 5.2.7, 5.2.8 gemf…
akariiijima Aug 23, 2023
04d0cf9
Add gem rails because rails is needed in spec
akariiijima Aug 23, 2023
a3c2cdd
Pin gem nokogiri/loofah version if ruby < 2.5
akariiijima Jun 27, 2023
3e9c3b1
Add gem dalli because dalli is needed in spec
akariiijima Jun 27, 2023
692ed74
Add workflows for ruby 2.4 - 2.7 in GithubActions
akariiijima Jun 27, 2023
1af32dc
Goodbye travisCI because of not being maintained, and use GithubActio…
akariiijima Aug 23, 2023
9673991
Merge pull request #18 from akariiijima/add-ci-for-support-ar6.0.Z
hirocaster Aug 30, 2023
c15915b
Not support Ruby 2.4 in Rails6
hirocaster Aug 31, 2023
bf2c8a0
Merge pull request #20 from mixigroup/fix-ci-matrix
hirocaster Aug 31, 2023
3349dc3
Add compose.yaml for test DB
Mar 15, 2024
0143d48
Add Appraisals
Mar 15, 2024
775cf32
Update README: Add test section
Mar 15, 2024
6663c68
Fix factory_bot version. cf. https://github.com/thoughtbot/factory_bo…
Mar 15, 2024
4b5eaef
Fix bundler version for CI
Mar 15, 2024
e23e1d9
Fix factory_bot version
Mar 15, 2024
7e9e462
Fix ruby 2.4 CI: Add bundler param to setup-ruby
Mar 15, 2024
5ea0751
Update README.md: Add NOTE to run appraisal
winebarrel Apr 1, 2024
7a5d3c5
Fix annotation for appraisal
Apr 2, 2024
0ac704a
Merge pull request #22 from mixigroup/add_docker_compose
hirocaster Apr 8, 2024
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
31 changes: 31 additions & 0 deletions .github/workflows/test_ruby_2_4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Exec Rspec
run-name: Matrix building for ruby 2.4 ✖️ rails 5.0 🚀
on: [push]

jobs:
ruby_2_4:
strategy:
fail-fast: false
matrix:
arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7',
'5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7',
'5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8']
runs-on: ubuntu-22.04
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile
MYSQL_PWD: root
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.4'
bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }}
bundler-cache: true
- name: Start mysql
run: sudo systemctl start mysql.service
- name: Reset DB
run: bundle exec rake turntable:db:reset
- name: Run RSpec
run: bundle exec rake spec
32 changes: 32 additions & 0 deletions .github/workflows/test_ruby_2_5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Exec Rspec
run-name: Matrix building for ruby 2.5 ✖️ 【rails 5.0 - 6.0】 🚀
on: [push]

jobs:
ruby_2_5:
strategy:
fail-fast: false
matrix:
arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7',
'5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7',
'5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8',
'6_0_0', '6_0_1', '6_0_2', '6_0_3', '6_0_4', '6_0_5', '6_0_6']
runs-on: ubuntu-22.04
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile
MYSQL_PWD: root
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.5'
bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }}
bundler-cache: true
- name: Start mysql
run: sudo systemctl start mysql.service
- name: Reset DB
run: bundle exec rake turntable:db:reset
- name: Run RSpec
run: bundle exec rake spec
32 changes: 32 additions & 0 deletions .github/workflows/test_ruby_2_6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Exec Rspec
run-name: Matrix building for ruby 2.6 ✖️ 【rails 5.0 - 6.0】 🚀
on: [push]

jobs:
ruby_2_6:
strategy:
fail-fast: false
matrix:
arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7',
'5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7',
'5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8',
'6_0_0', '6_0_1', '6_0_2', '6_0_3', '6_0_4', '6_0_5', '6_0_6']
runs-on: ubuntu-22.04
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile
MYSQL_PWD: root
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }}
bundler-cache: true
- name: Start mysql
run: sudo systemctl start mysql.service
- name: Reset DB
run: bundle exec rake turntable:db:reset
- name: Run RSpec
run: bundle exec rake spec
32 changes: 32 additions & 0 deletions .github/workflows/test_ruby_2_7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Exec Rspec
run-name: Matrix building for ruby 2.7 ✖️ 【rails 5.0 - 6.0】 🚀
on: [push]

jobs:
ruby_2_7:
strategy:
fail-fast: false
matrix:
arversion: ['5_0_0', '5_0_1', '5_0_2', '5_0_3', '5_0_4', '5_0_5', '5_0_6', '5_0_7',
'5_1_0', '5_1_1', '5_1_2', '5_1_3', '5_1_4', '5_1_5', '5_1_6', '5_1_7',
'5_2_0', '5_2_1', '5_2_2', '5_2_3', '5_2_4', '5_2_5', '5_2_6', '5_2_7', '5_2_8',
'6_0_0', '6_0_1', '6_0_2', '6_0_3', '6_0_4', '6_0_5', '6_0_6']
runs-on: ubuntu-22.04
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails${{ matrix.arversion }}.gemfile
MYSQL_PWD: root
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler: ${{ contains(fromJSON('["5_0_0", "5_0_1", "5_0_2", "5_0_3", "5_0_4", "5_1_0", "5_1_1", "5_1_2"]'), matrix.arversion) && '1.17.3' || 'latest' }}
bundler-cache: true
- name: Start mysql
run: sudo systemctl start mysql.service
- name: Reset DB
run: bundle exec rake turntable:db:reset
- name: Run RSpec
run: RUBYOPT='-W:deprecated' bundle exec rake spec
75 changes: 0 additions & 75 deletions .travis.yml

This file was deleted.

62 changes: 62 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
appraise "rails6_0_0" do
gem "rails", "6.0.0"
gem "railties", "6.0.0"
gem "activerecord", "6.0.0"
gem "activesupport", "6.0.0"
gem "actionview", "6.0.0"
gem "mysql2", "~> 0.5.2"
end

appraise "rails6_0_1" do
gem "rails", "6.0.1"
gem "railties", "6.0.1"
gem "activerecord", "6.0.1"
gem "activesupport", "6.0.1"
gem "actionview", "6.0.1"
gem "mysql2", "~> 0.5.2"
end

appraise "rails6_0_2" do
gem "rails", "6.0.2"
gem "railties", "6.0.2"
gem "activerecord", "6.0.2"
gem "activesupport", "6.0.2"
gem "actionview", "6.0.2"
gem "mysql2", "~> 0.5.2"
end

appraise "rails6_0_3" do
gem "rails", "6.0.3"
gem "railties", "6.0.3"
gem "activerecord", "6.0.3"
gem "activesupport", "6.0.3"
gem "actionview", "6.0.3"
gem "mysql2", "~> 0.5.2"
end

appraise "rails6_0_4" do
gem "rails", "6.0.4"
gem "railties", "6.0.4"
gem "activerecord", "6.0.4"
gem "activesupport", "6.0.4"
gem "actionview", "6.0.4"
gem "mysql2", "~> 0.5.2"
end

appraise "rails6_0_5" do
gem "rails", "6.0.5"
gem "railties", "6.0.5"
gem "activerecord", "6.0.5"
gem "activesupport", "6.0.5"
gem "actionview", "6.0.5"
gem "mysql2", "~> 0.5.2"
end

appraise "rails6_0_6" do
gem "rails", "6.0.6"
gem "railties", "6.0.6"
gem "activerecord", "6.0.6"
gem "activesupport", "6.0.6"
gem "actionview", "6.0.6"
gem "mysql2", "~> 0.5.2"
end
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ source "https://rubygems.org"

gemspec

gem "rails", "5.2.1"
gem "rails", "6.0.6.1"

gem "actionview", "5.2.1"
gem "activerecord", "5.2.1"
gem "activesupport", "5.2.1"
gem "actionview", "6.0.6.1"
gem "activerecord", "6.0.6.1"
gem "activesupport", "6.0.6.1"
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,21 @@ raise_on_not_specified_shard_query true
raise_on_not_specified_shard_update true
```

## Run tests locally

```sh
docker compose up -d
# rbenv shell 2.7.8
bundle install
bundle exec appraisal install
export TEST_MYSQL_HOST=127.0.0.1
export TEST_MYSQL_PORT=13306
bundle exec appraisal rails6_0_6 rake spec
```

> [!note]
> Appraisal does not work on Ruby 2.2 or lower.

## Thanks

ConnectionProxy, Distributed Migration implementation is inspired by Octopus and DataFabric.
Expand Down
7 changes: 4 additions & 3 deletions activerecord-turntable.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.required_ruby_version = ">= 2.2.2"

spec.add_runtime_dependency "activerecord", ">= 5.0", "< 6.0"
spec.add_runtime_dependency "activesupport", ">= 5.0", "< 6.0"
spec.add_runtime_dependency "activerecord", ">= 5.0", "< 7.0"
spec.add_runtime_dependency "activesupport", ">= 5.0", "< 7.0"
spec.add_runtime_dependency "bsearch", "~> 1.5"
spec.add_runtime_dependency "sql_tree", "= 0.2.0"

Expand All @@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "barrage"
spec.add_development_dependency "coveralls"
spec.add_development_dependency "dalli", ">= 2.7"
spec.add_development_dependency "factory_bot"
spec.add_development_dependency "factory_bot", "<= 6.4.4"
spec.add_development_dependency "faker"
spec.add_development_dependency "guard-rspec"
spec.add_development_dependency "guard-rubocop"
Expand Down Expand Up @@ -61,4 +61,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "minitest"
spec.add_development_dependency "mocha"
spec.add_development_dependency "sqlite3", "~> 1.3.6"
spec.add_development_dependency "appraisal", "~> 2.5.0"
end
7 changes: 7 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
services:
mysql:
image: "mysql:8.0"
ports:
- "13306:3306"
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
8 changes: 6 additions & 2 deletions gemfiles/rails5_0_0.gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
source "https://rubygems.org"

gem "rails", "5.0.0"
gem "railties", "5.0.0"
gem "activerecord", "5.0.0"
gem "activesupport", "5.0.0"

gem "actionview", "5.0.0"
gem "mysql2", "~> 0.4.4"

gem "minitest", "< 5.3.4"
gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5
gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5
gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5

gemspec :path => '../'
9 changes: 6 additions & 3 deletions gemfiles/rails5_0_1.gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
source "https://rubygems.org"

gem "rails", "5.0.1"
gem "railties", "5.0.1"
gem "activerecord", "5.0.1"
gem "activesupport", "5.0.1"

gem "actionview", "5.0.1"
gem "mysql2", "~> 0.4.4"

gem "minitest", "< 5.3.4"
gem "mocha", "~> 0.14", require: false
gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5
gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5
gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5

gemspec :path => '../'
9 changes: 6 additions & 3 deletions gemfiles/rails5_0_2.gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
source "https://rubygems.org"

gem "rails", "5.0.2"
gem "railties", "5.0.2"
gem "activerecord", "5.0.2"
gem "activesupport", "5.0.2"

gem "actionview", "5.0.2"
gem "mysql2", "~> 0.4.4"

gem "minitest", "< 5.3.4"
gem "mocha", "~> 0.14", require: false
gem "nokogiri", "~> 1.10" if RUBY_VERSION.to_f < 2.5
gem "loofah", "2.20.0" if RUBY_VERSION.to_f < 2.5
gem "dalli", "~> 2.7" if RUBY_VERSION.to_f < 2.5

gemspec :path => '../'
Loading