Skip to content

Commit d67ca2b

Browse files
authored
feat: last version before major version bump, with_advisory_lock will stop supporting sqlite3 and has api change (#448)
1 parent 4996264 commit d67ca2b

14 files changed

+23
-123
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ on:
88
pull_request:
99
branches:
1010
- master
11-
concurrency:
12-
group: ci-${{ github.head_ref }}
13-
cancel-in-progress: true
11+
1412

1513
jobs:
1614
rspec:
@@ -41,26 +39,15 @@ jobs:
4139
matrix:
4240
ruby:
4341
- '3.3'
44-
- '3.2'
45-
- '3.1'
46-
- '3.0'
4742
rails:
43+
- activerecord_8.0
4844
- activerecord_7.2
4945
- activerecord_7.1
50-
- activerecord_7.0
51-
- activerecord_6.1
5246
- activerecord_edge
5347
adapter:
5448
- 'sqlite3:///:memory:'
5549
- mysql2://root:root@0/closure_tree_test
5650
- postgres://closure_tree:closure_tree@0/closure_tree_test
57-
exclude:
58-
- ruby: '3.0'
59-
rails: activerecord_edge
60-
- ruby: '3.1'
61-
rails: activerecord_edge
62-
- ruby: '3.0'
63-
rails: activerecord_7.2
6451

6552
steps:
6653
- name: Checkout

.github/workflows/ci_jruby.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ jobs:
4040
fail-fast: false
4141
matrix:
4242
rails:
43-
- activerecord_7.0
44-
- activerecord_6.1
43+
- activerecord_7.1
4544
adapter:
4645
- 'sqlite3:///:memory:'
4746
- mysql2://root:root@0/closure_tree_test

.github/workflows/ci_truffleruby.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ jobs:
4242
ruby:
4343
- truffleruby
4444
rails:
45-
- activerecord_7.0
46-
- activerecord_6.1
45+
- activerecord_7.1
4746
adapter:
4847
- 'sqlite3:///:memory:'
4948
- mysql2://root:root@0/closure_tree_test

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.2.2
1+
ruby 3.4.4

Appraisals

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
# frozen_string_literal: true
22

3-
appraise 'activerecord-6.1' do
4-
gem 'activerecord', '~> 6.1.0'
5-
platforms :ruby do
6-
gem 'mysql2'
7-
gem 'pg'
8-
gem 'sqlite3', '< 2.0'
9-
end
10-
11-
platforms :jruby do
12-
gem 'activerecord-jdbcmysql-adapter'
13-
gem 'activerecord-jdbcpostgresql-adapter'
14-
gem 'activerecord-jdbcsqlite3-adapter'
15-
end
16-
end
17-
18-
appraise 'activerecord-7.0' do
19-
gem 'activerecord', '~> 7.0.0'
20-
platforms :ruby do
3+
appraise 'activerecord-7.1' do
4+
gem 'activerecord', '~> 7.1.0'
5+
platforms :ruby, :truffleruby do
216
gem 'mysql2'
227
gem 'pg'
238
gem 'sqlite3', '< 2.0'
@@ -30,12 +15,12 @@ appraise 'activerecord-7.0' do
3015
end
3116
end
3217

33-
appraise 'activerecord-7.1' do
34-
gem 'activerecord', '~> 7.1.0'
18+
appraise 'activerecord-7.2' do
19+
gem 'activerecord', '~> 7.2.0'
3520
platforms :ruby do
3621
gem 'mysql2'
3722
gem 'pg'
38-
gem 'sqlite3', '< 2.0'
23+
gem 'sqlite3'
3924
end
4025

4126
platforms :jruby do
@@ -45,8 +30,8 @@ appraise 'activerecord-7.1' do
4530
end
4631
end
4732

48-
appraise 'activerecord-7.2' do
49-
gem 'activerecord', '~> 7.2.0'
33+
appraise 'activerecord-8.0' do
34+
gem 'activerecord', '~> 8.0.0'
5035
platforms :ruby do
5136
gem 'mysql2'
5237
gem 'pg'

Gemfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,3 @@ source 'https://rubygems.org'
44

55
gemspec
66

7-
platform :mri do
8-
group :development do
9-
gem 'bump', '~> 0.10.0'
10-
gem 'github_changelog_generator', '~> 1.16'
11-
end
12-
end

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ closure_tree has some great features:
2424
* 2 SQL INSERTs on node creation
2525
* 3 SQL INSERT/UPDATEs on node reparenting
2626
* __Support for [concurrency](#concurrency)__ (using [with_advisory_lock](https://github.com/ClosureTree/with_advisory_lock))
27-
* __Tested against ActiveRecord 6.0+ with Ruby 2.7+__
27+
* __Tested against ActiveRecord 7.1+ with Ruby 3.3+__
2828
* Support for reparenting children (and all their descendants)
2929
* Support for [single-table inheritance (STI)](#sti) within the hierarchy
3030
* ```find_or_create_by_path``` for [building out heterogeneous hierarchies quickly and conveniently](#find_or_create_by_path)
@@ -52,7 +52,7 @@ for a description of different tree storage algorithms.
5252

5353
## Installation
5454

55-
Note that closure_tree only supports ActiveRecord 6.0 and later, and has test coverage for MySQL, PostgreSQL, and SQLite.
55+
Note that closure_tree only supports ActiveRecord 7.1 and later, and has test coverage for MySQL, PostgreSQL, and SQLite.
5656

5757
1. Add `gem 'closure_tree'` to your Gemfile
5858

@@ -662,8 +662,8 @@ end
662662
663663
Closure tree is [tested under every valid combination](https://github.com/ClosureTree/closure_tree/blob/master/.github/workflows/ci.yml) of
664664
665-
* Ruby 2.7+
666-
* ActiveRecord 6.0+
665+
* Ruby 3.3+
666+
* ActiveRecord 7.1+
667667
* PostgreSQL, MySQL, and SQLite. Concurrency tests are only run with MySQL and PostgreSQL.
668668
669669
```shell

Rakefile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,4 @@ Rake::TestTask.new do |t|
2929
t.verbose = true
3030
end
3131

32-
if RUBY_ENGINE == 'ruby'
33-
require 'github_changelog_generator/task'
34-
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
35-
config.user = 'ClosureTree'
36-
config.project = 'closure_tree'
37-
config.issues = false
38-
config.future_release = '5.2.0'
39-
config.since_tag = 'v7.4.0'
40-
end
41-
end
4232
task default: 'spec:all'

closure_tree.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Gem::Specification.new do |gem|
2525
end
2626

2727
gem.test_files = gem.files.grep(%r{^spec/})
28-
gem.required_ruby_version = '>= 3.0.0'
28+
gem.required_ruby_version = '>= 3.3.0'
2929

30-
gem.add_runtime_dependency 'activerecord', '>= 6.1.0'
31-
gem.add_runtime_dependency 'with_advisory_lock', '>= 5.0.0'
30+
gem.add_runtime_dependency 'activerecord', '>= 7.1.0'
31+
gem.add_runtime_dependency 'with_advisory_lock', '>= 5.0.0', '< 6.0.0'
3232

3333
gem.add_development_dependency 'appraisal'
3434
gem.add_development_dependency 'database_cleaner'

gemfiles/activerecord_7.0.gemfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

gemfiles/activerecord_7.1.gemfile

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@ source "https://rubygems.org"
44

55
gem "activerecord", "~> 7.1.0"
66

7-
platforms :mri do
8-
group :development do
9-
gem "bump", "~> 0.10.0"
10-
gem "github_changelog_generator", "~> 1.16"
11-
end
12-
end
13-
14-
platforms :ruby do
7+
platforms :ruby, :truffleruby do
158
gem "mysql2"
169
gem "pg"
1710
gem "sqlite3", "< 2.0"

gemfiles/activerecord_7.2.gemfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ source "https://rubygems.org"
44

55
gem "activerecord", "~> 7.2.0"
66

7-
platforms :mri do
8-
group :development do
9-
gem "bump", "~> 0.10.0"
10-
gem "github_changelog_generator", "~> 1.16"
11-
end
12-
end
13-
147
platforms :ruby do
158
gem "mysql2"
169
gem "pg"

gemfiles/activerecord_6.1.gemfile renamed to gemfiles/activerecord_8.0.gemfile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,12 @@
22

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

5-
gem "activerecord", "~> 6.1.0"
6-
7-
platforms :mri do
8-
group :development do
9-
gem "bump", "~> 0.10.0"
10-
gem "github_changelog_generator", "~> 1.16"
11-
end
12-
end
5+
gem "activerecord", "~> 8.0.0"
136

147
platforms :ruby do
158
gem "mysql2"
169
gem "pg"
17-
gem "sqlite3", "< 2.0"
10+
gem "sqlite3"
1811
end
1912

2013
platforms :jruby do

gemfiles/activerecord_edge.gemfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ source "https://rubygems.org"
44

55
gem "activerecord", github: "rails/rails"
66

7-
platforms :mri do
8-
group :development do
9-
gem "bump", "~> 0.10.0"
10-
gem "github_changelog_generator", "~> 1.16"
11-
end
12-
end
13-
147
platforms :ruby do
158
gem "mysql2"
169
gem "pg"

0 commit comments

Comments
 (0)