Skip to content

Commit

Permalink
deprecating old versions of ruby/rails; updating tests to support rai…
Browse files Browse the repository at this point in the history
…ls 7.1
  • Loading branch information
Jonathan Chan committed Jul 13, 2024
1 parent d6b11c4 commit d01bd0f
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 29 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,32 @@ jobs:
strategy:
matrix:
include:
- ruby_version: '2.7'
gemfile: rails_7_0
- ruby_version: '3.3'
gemfile: rails_7_1
upload_coverage: true
- ruby_version: '2.5'
- ruby_version: '3.2'
gemfile: rails_7_1
# - ruby_version: '3.1'
# gemfile: rails_7_1
- ruby_version: '3.3'
gemfile: rails_7_0
- ruby_version: '3.3'
gemfile: rails_6_1
- ruby_version: '2.3'
gemfile: rails_5_0
- ruby_version: '2.3'
gemfile: rails_4_2
bundler: '1'
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
CI: 1
BUNDLE_GEMFILE: ${{ github.workspace }}/spec/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- name: "Determine whether to upload coverage"
if: ${{ env.CC_TEST_REPORTER_ID && matrix.upload_coverage }}
run: echo COVERAGE=1 >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby_version }} and ${{ matrix.gemfile }}.gemfile
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby_version }}
bundler: ${{ matrix.bundler || 'Gemfile.lock' }}
bundler-cache: true
cache-version: 1000
- name: Run tests
if: ${{ !env.COVERAGE }}
run: bundle exec rspec --format d
Expand All @@ -47,11 +48,11 @@ jobs:
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/spec/gemfiles/i18n-tasks.gemfile
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby and i18n-tasks.gemfile
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
ruby-version: 3.3
bundler-cache: true
- name: Run i18n-tasks
run: bundle exec i18n-tasks health
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Remove explicit dependency on `sassc-rails`. Allow the use of this gem with either:
`dartsass-sprockets`, `sassc-rails`, `dartsass-rails`, or `cssbundling-rails`
* Drop support for EOL ruby and rails versions (rails >6.1, ruby >3.1)

## v2.2.3

* Fixes Rails 7 compatibility.
Expand Down
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,4 @@ gemspec
gem 'rails'
gem 'i18n-tasks'

# For development; when running as a library, you can pick your own sass compiler
gem 'dartsass-sprockets'

eval_gemfile './shared.gemfile'
2 changes: 1 addition & 1 deletion rails_email_preview.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.metadata = { 'issue_tracker' => 'https://github.com/glebm/rails_email_preview' }
end

s.add_dependency 'rails', '>= 4.2'
s.add_dependency 'rails', '>= 6.1'
s.add_dependency 'turbolinks'
s.add_dependency 'request_store'

Expand Down
3 changes: 3 additions & 0 deletions shared.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ if ENV['COVERAGE']
gem 'simplecov', require: false
end
end

# For development/testing; when running as a library, you can pick your own sass compiler
gem 'dartsass-sprockets'
6 changes: 0 additions & 6 deletions spec/gemfiles/rails_4_2.gemfile

This file was deleted.

6 changes: 0 additions & 6 deletions spec/gemfiles/rails_5_0.gemfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ source 'https://rubygems.org'
gemspec path: '../..'
eval_gemfile '../../shared.gemfile'

gem 'rails', '~> 5.2.1'
gem 'rails', '~> 7.1'

0 comments on commit d01bd0f

Please sign in to comment.