Skip to content

Commit d395097

Browse files
authored
Rails 8 compatibility
1 parent 94c7f6a commit d395097

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ on:
88

99
jobs:
1010
sqlite3:
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-latest
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
rails:
16-
- 7-2-stable
16+
- 8-0-stable
17+
- v7.2.2
1718
- v7.1.0
1819
ruby:
1920
- 3.2.2
2021
- 3.1.4
22+
exclude:
23+
- rails: 8-0-stable
24+
ruby: 3.1.4
2125
env:
2226
DB: sqlite3
2327
RAILS: ${{ matrix.rails }}
@@ -32,16 +36,21 @@ jobs:
3236
run: bundle exec rspec
3337

3438
mysql:
35-
runs-on: ubuntu-22.04
39+
runs-on: ubuntu-latest
3640
strategy:
3741
fail-fast: false
3842
matrix:
3943
rails:
44+
- 8-0-stable
4045
- 7-2-stable
4146
- v7.1.0
4247
ruby:
4348
- 3.2.2
4449
- 3.1.4
50+
exclude:
51+
- rails: 8-0-stable
52+
ruby: 3.1.4
53+
4554
env:
4655
DB: mysql
4756
RAILS: ${{ matrix.rails }}
@@ -65,16 +74,20 @@ jobs:
6574
run: bundle exec rspec
6675

6776
postgres:
68-
runs-on: ubuntu-22.04
77+
runs-on: ubuntu-latest
6978
strategy:
7079
fail-fast: false
7180
matrix:
7281
rails:
82+
- 8-0-stable
7383
- 7-2-stable
7484
- v7.1.0
7585
ruby:
7686
- 3.2.2
7787
- 3.1.4
88+
exclude:
89+
- rails: 8-0-stable
90+
ruby: 3.1.4
7891
env:
7992
DB: postgres
8093
RAILS: ${{ matrix.rails }}
@@ -110,7 +123,7 @@ jobs:
110123
run: bundle exec rspec
111124

112125
bug-report-templates:
113-
runs-on: ubuntu-22.04
126+
runs-on: ubuntu-latest
114127
steps:
115128
- uses: actions/checkout@v2
116129
- name: Set up Ruby

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Change Log
22

33
## Unreleased
4-
4+
* Rails 8 compatibility
55
* Drop Rails 6 and 7.0 compatibility
66

77
## 4.2.1 - 2024-8-11

Gemfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ rails_version = case rails
1515
end
1616

1717
gem 'faker'
18-
gem 'sqlite3', '~> 1.4'
18+
if ::Gem::Version.new(rails_version) > ::Gem::Version.new('7.3')
19+
gem 'sqlite3', '>= 2.1'
20+
else
21+
gem 'sqlite3', '~> 1.4'
22+
end
1923
gem 'pg'
2024
gem 'pry'
2125
gem 'byebug'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ There are advanced searching solutions around, like ElasticSearch or Algolia. **
1313

1414
Ready to move beyond the basics? Use **advanced features** like i18n and extensive configuration options.
1515

16-
Ransack is supported for Rails 7.2, 7.1 on Ruby 3.1 and later.
16+
Ransack is supported for Rails 8.0, 7.2, 7.1 on Ruby 3.1 and later.
1717

1818
## Installation
1919

lib/polyamorous/polyamorous.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module Polyamorous
1515
require 'polyamorous/activerecord/join_dependency'
1616
require 'polyamorous/activerecord/reflection'
1717

18-
if ::ActiveRecord.version >= ::Gem::Version.new("7.2") && ::ActiveRecord.version != ::Gem::Version.new("7.2.2.1")
18+
if ::ActiveRecord.version >= ::Gem::Version.new("7.2") && ::ActiveRecord.version < ::Gem::Version.new("7.2.2.1")
1919
require "polyamorous/activerecord/join_association_7_2"
2020
end
2121

0 commit comments

Comments
 (0)