Skip to content

Commit c0c6fb4

Browse files
committed
ActiveRecord 7.2 support
1 parent 583ed2b commit c0c6fb4

File tree

13 files changed

+36
-68
lines changed

13 files changed

+36
-68
lines changed

.github/workflows/ci.yml

+5-25
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,11 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
ruby-version: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2']
23-
gemfile: [ar_52, ar_60, ar_61, ar_70, ar_next]
24-
exclude:
25-
- ruby-version: '3.2'
26-
gemfile: ar_52
27-
- ruby-version: '3.2'
28-
gemfile: ar_60
29-
- ruby-version: '3.2'
30-
gemfile: ar_61
31-
- ruby-version: '3.1'
32-
gemfile: ar_52
33-
- ruby-version: '3.1'
34-
gemfile: ar_60
35-
- ruby-version: '3.1'
36-
gemfile: ar_61
37-
- ruby-version: '3.0'
38-
gemfile: ar_52
39-
- ruby-version: '2.6'
40-
gemfile: ar_next
41-
- ruby-version: '2.6'
42-
gemfile: ar_70
43-
- ruby-version: '2.5'
44-
gemfile: ar_next
45-
- ruby-version: '2.5'
46-
gemfile: ar_70
22+
ruby-version: ['3.1', '3.2', '3.3']
23+
gemfile: [ar_70, ar_71, ar_72, ar_next]
24+
# exclude:
25+
# - ruby-version: '3.2'
26+
# gemfile: ar_60
4727
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
4828
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
4929
steps:

.github/workflows/lint.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818

1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222
- name: Set up Ruby
2323
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
2424
# change this to (see https://github.com/ruby/setup-ruby#versioning):
2525
uses: ruby/setup-ruby@v1
2626
# uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
2727
with:
28-
ruby-version: 2.7
28+
ruby-version: 3.1
2929
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
3030
- name: Run rubocop
3131
run: bundle exec rubocop

.github/workflows/rubygem.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
contents: read
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222
- name: Set up Ruby
2323
uses: ruby/setup-ruby@v1
2424
with:
25-
ruby-version: 2.7
25+
ruby-version: 3.1
2626
- run: bundle install
2727
- name: Publish to RubyGems
2828
env:

.rubocop.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ require:
55
inherit_from: .rubocop_todo.yml
66

77
AllCops:
8-
TargetRubyVersion: 2.5
8+
TargetRubyVersion: 3.1
99
NewCops: enable
1010
SuggestExtensions: false
1111

Appraisals

+9-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
11
# frozen_string_literal: true
22

3-
appraise 'ar-52' do
4-
gem 'activerecord', '~> 5.2.0'
5-
gem 'activesupport', '~> 5.2.0'
6-
end
7-
8-
appraise 'ar-60' do
9-
gem 'activerecord', '~> 6.0.0'
10-
gem 'activesupport', '~> 6.0.0'
3+
appraise 'ar-70' do
4+
gem 'activerecord', '~> 7.0'
5+
gem 'activesupport', '~> 7.0'
116
end
127

13-
appraise 'ar-61' do
14-
gem 'activerecord', '~> 6.1.0'
15-
gem 'activesupport', '~> 6.1.0'
8+
appraise 'ar-71' do
9+
gem 'activerecord', '~> 7.1'
10+
gem 'activesupport', '~> 7.1'
1611
end
1712

18-
appraise 'ar-70' do
19-
gem 'activerecord', '~> 7.0'
20-
gem 'activesupport', '~> 7.0'
13+
appraise 'ar-72' do
14+
gem 'activerecord', '~> 7.2'
15+
gem 'activesupport', '~> 7.2'
2116
end
2217

2318
appraise 'ar-next' do

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
### Version 4.0.0
2+
- ADD: Support for Rails 7.2
3+
- BREAKING: Dropped support for Rails < 7
4+
- BREAKING: Dropped support old Rubies < 3.1
5+
16
### Version 3.5.0
27
- Added :dependent option for setting explicit deletion behaviour (issue #31)
38
- Added automatic cycle detection when supported (currently only PostgresSQL 14+) (issue #22)

README.md

+3-7
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@ Luckily, there is already a SQL standard that makes it very easy to retrieve dat
1414

1515
## Supported environments
1616
ActsAsRecursiveTree currently supports following ActiveRecord versions and is tested for compatibility:
17-
* ActiveRecord 5.2.x
18-
* ActiveRecord 6.0.x
19-
* ActiveRecord 6.1.x
2017
* ActiveRecord 7.0.x
2118
* ActiveRecord 7.1.x
19+
* ActiveRecord 7.2.x
20+
* ActiveRecord NEXT (from git)
2221

2322
## Supported Rubies
2423
ActsAsRecursiveTree is tested with following rubies:
25-
* MRuby 2.5
26-
* MRuby 2.6
27-
* MRuby 2.7
28-
* MRuby 3.0
2924
* MRuby 3.1
3025
* MRuby 3.2
26+
* MRuby 3.3
3127

3228
Other Ruby implementations are not tested, but should also work.
3329

acts_as_recursive_tree.gemspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ Gem::Specification.new do |spec|
1818
'bug_tracker_uri' => 'https://github.com/1and1/acts_as_recursive_tree/issues',
1919
'changelog_uri' => 'https://github.com/1and1/acts_as_recursive_tree/blob/main/CHANGELOG.md'
2020
}
21-
spec.required_ruby_version = '>= 2.5.0'
21+
spec.required_ruby_version = '>= 3.1.0'
2222
spec.files = `git ls-files -z`.split("\x0")
2323
spec.test_files = spec.files.grep(%r{^spec/})
2424
spec.require_paths = ['lib']
2525

26-
spec.add_runtime_dependency 'activerecord', '>= 5.2.0', '< 8'
27-
spec.add_runtime_dependency 'activesupport', '>= 5.2.0', '< 8'
26+
spec.add_runtime_dependency 'activerecord', '>= 7.0.0', '< 8'
27+
spec.add_runtime_dependency 'activesupport', '>= 7.0.0', '< 8'
2828
spec.add_runtime_dependency 'zeitwerk', '>= 2.4'
2929

3030
spec.add_development_dependency 'appraisal', '~> 2.4'

gemfiles/ar_61.gemfile

-8
This file was deleted.

gemfiles/ar_52.gemfile gemfiles/ar_71.gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source "https://rubygems.org"
44

5-
gem "activerecord", "~> 5.2.0"
6-
gem "activesupport", "~> 5.2.0"
5+
gem "activerecord", "~> 7.1"
6+
gem "activesupport", "~> 7.1"
77

88
gemspec path: "../"

gemfiles/ar_60.gemfile gemfiles/ar_72.gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
source "https://rubygems.org"
44

5-
gem "activerecord", "~> 6.0.0"
6-
gem "activesupport", "~> 6.0.0"
5+
gem "activerecord", "~> 7.2"
6+
gem "activesupport", "~> 7.2"
77

88
gemspec path: "../"

lib/acts_as_recursive_tree/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module ActsAsRecursiveTree
4-
VERSION = '3.5.0'
4+
VERSION = '4.0.0'
55
end

spec/spec_helper.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
# Requires supporting ruby files with custom matchers and macros, etc,
1515
# in spec/support/ and its subdirectories.
16-
Dir[File.join(__dir__, 'support/**/*.rb')].sort.each { |f| require f }
16+
Dir[File.join(__dir__, 'support/**/*.rb')].each { |f| require f }
1717

1818
# This file was generated by the `rspec --init` command. Conventionally, all
1919
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.

0 commit comments

Comments
 (0)