Skip to content

Commit

Permalink
Rails 7.1 support (#51)
Browse files Browse the repository at this point in the history
* Refactor CI matrix to use gemfile interpolation and add rails 7.1
* Remove tests against Rails 5.2 and Ruby 2.5/2.6
* Relax activerecord dependency to allow 7.1
  • Loading branch information
iMacTia authored Oct 10, 2023
1 parent a704003 commit 88774d6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 35 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,14 @@ jobs:
needs: [linting]
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
RAILS_VERSION: '~> ${{ matrix.rails }}'
strategy:
matrix:
ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1', '3.2' ]
gemfile:
- gemfiles/rails_5_2.gemfile
- gemfiles/rails_6_0.gemfile
- gemfiles/rails_6_1.gemfile
- gemfiles/rails_7_0.gemfile
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
rails: [ '6.0.0', '6.1.0', '7.0.0', '7.1.0' ]
exclude:
- ruby: '2.5'
gemfile: gemfiles/rails_7_0.gemfile
- ruby: '2.6'
gemfile: gemfiles/rails_7_0.gemfile
- ruby: '3.2'
gemfile: gemfiles/rails_5_2.gemfile
- ruby: '3.2'
gemfile: gemfiles/rails_6_0.gemfile
rails: '6.0.0'

steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ source 'https://rubygems.org'
# Specify your gem's dependencies in lograge-sql.gemspec
gemspec

install_if -> { ENV.fetch('RAILS_VERSION', nil) } do
gem 'rails', ENV.fetch('RAILS_VERSION', nil)
end

group :development do
gem 'rspec', '~> 3.0'
gem 'simplecov', '~> 0.12'
Expand Down
5 changes: 0 additions & 5 deletions gemfiles/rails_5_2.gemfile

This file was deleted.

5 changes: 0 additions & 5 deletions gemfiles/rails_6_0.gemfile

This file was deleted.

5 changes: 0 additions & 5 deletions gemfiles/rails_6_1.gemfile

This file was deleted.

5 changes: 0 additions & 5 deletions gemfiles/rails_7_0.gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion lograge-sql.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')

spec.add_dependency 'activerecord', '>= 5', '< 7.1'
spec.add_dependency 'activerecord', '>= 5', '< 7.2'
spec.add_dependency 'lograge', '~> 0.11'

spec.add_development_dependency 'rake', '>= 12.3.3'
Expand Down

0 comments on commit 88774d6

Please sign in to comment.