Skip to content

Commit

Permalink
Update build, relax AR dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jaynetics committed Nov 15, 2024
1 parent 78082c5 commit d11a9f5
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 53 deletions.
29 changes: 6 additions & 23 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,12 @@ jobs:

strategy:
matrix:
ruby: [ '3.0', '3.1', '3.2', '3.3', 'ruby-head' ]
activerecord: [ '6.1', '7.0', '7.1' ] # rails < 6 crashes on ruby 3 due to kwargs changes
include:
- ruby: '2.6'
activerecord: '5.2'
- ruby: '2.6'
activerecord: '6.1'
# rails >= 7 requires ruby >= 2.7

- ruby: '2.7'
activerecord: '5.2'
- ruby: '2.7'
activerecord: '6.1'
- ruby: '2.7'
activerecord: '7.0'
- ruby: '2.7'
activerecord: '7.1'
ruby: [ '3.1', '3.2', '3.3', 'ruby-head' ]
activerecord: [ '7.1', '7.2', '8.0' ]
exclude:
# rails < 7.1 crashes on ruby >= 3.4 due to the removal of mutex_m
- ruby: 'ruby-head'
activerecord: '6.1'
- ruby: 'ruby-head'
activerecord: '7.0'
# rails >= 8 requires ruby >= 3.2
- ruby: '3.1'
activerecord: '8.0'

steps:
- uses: actions/checkout@v3
Expand All @@ -52,4 +35,4 @@ jobs:
- name: Test with activerecord ${{matrix.activerecord}}
run: BUNDLE_GEMFILE=./gemfiles/activerecord_${{matrix.activerecord}}.gemfile bundle exec rake
- uses: codecov/codecov-action@v3
if: matrix.ruby >= '3.0'
if: matrix.ruby >= '3.3'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bin/*
binstubs/*
bundler_stubs/*
Gemfile.lock
local_secret.txt
log/
!log/.keep
/.bundle/
Expand Down
5 changes: 2 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# after changes, run `bundle exec appraisal install`
%w[
5.2
6.1
7.0
7.1
7.2
8.0
].each do |version|
constraint = [">= #{version}", "< #{version.sub(/\d+\z/, &:succ)}"]
appraise "activerecord-#{version}" do
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gemspec

group :development, :test do
# until fix for https://github.com/thoughtbot/appraisal/issues/199 is released
gem 'appraisal', github: "thoughtbot/appraisal"
gem 'appraisal', '3.0.0.rc1'
end
8 changes: 4 additions & 4 deletions delete_recursively.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Gem::Specification.new do |s|

s.required_ruby_version = '>= 2.1.1'

s.add_dependency 'activerecord', '>= 4.1.14', '< 8.0.0'
s.add_dependency 'activerecord', '>= 4.1.14'

s.add_development_dependency 'appraisal', '~> 2.4'
s.add_development_dependency 'rails', '>= 4.1.14', '< 8.0.0'
s.add_development_dependency 'rails', '>= 4.1.14'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'rspec', '~> 3.10'
s.add_development_dependency 'rspec-rails', '~> 4.0'
s.add_development_dependency 'rspec-rails', '~> 7.1'
s.add_development_dependency 'simplecov-cobertura', '~> 2.1'
s.add_development_dependency 'sqlite3', '~> 1.4'
s.add_development_dependency 'sqlite3', '~> 2.1'
end
11 changes: 0 additions & 11 deletions gemfiles/activerecord_7.0.gemfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

source "https://rubygems.org"

gem "activerecord", [">= 5.2", "< 5.3"]
gem "activerecord", [">= 7.2", "< 7.3"]

group :development, :test do
gem "rails", [">= 5.2", "< 5.3"]
gem "rails", [">= 7.2", "< 7.3"]
end

gemspec path: "../"
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

source "https://rubygems.org"

gem "activerecord", [">= 6.1", "< 6.2"]
gem "activerecord", [">= 8.0", "< 8.1"]

group :development, :test do
gem "rails", [">= 6.1", "< 6.2"]
gem "rails", [">= 8.0", "< 8.1"]
end

gemspec path: "../"
6 changes: 0 additions & 6 deletions spec/dummy_rails_app/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@

module DummyRailsApp
class Application < Rails::Application
# silence warning on rails 7
if (Rails::VERSION::MAJOR >= 7 rescue false)
if Rails::VERSION::MINOR == 0
config.active_record.legacy_connection_handling = false
end
end
end
end

0 comments on commit d11a9f5

Please sign in to comment.