From 20bae128b842f0f6d50e083e1d45983a732e0410 Mon Sep 17 00:00:00 2001 From: Jonathan Chan Date: Sat, 13 Jul 2024 09:33:58 -0500 Subject: [PATCH] deprecating old versions of ruby/rails; updating tests to support rails 7.1 --- .github/workflows/tests.yml | 25 ++++++++++--------- CHANGES.md | 4 +++ Gemfile | 3 --- rails_email_preview.gemspec | 2 +- shared.gemfile | 3 +++ spec/gemfiles/rails_4_2.gemfile | 6 ----- spec/gemfiles/rails_5_0.gemfile | 6 ----- .../{rails_5_2.gemfile => rails_7_1.gemfile} | 2 +- 8 files changed, 22 insertions(+), 29 deletions(-) delete mode 100644 spec/gemfiles/rails_4_2.gemfile delete mode 100644 spec/gemfiles/rails_5_0.gemfile rename spec/gemfiles/{rails_5_2.gemfile => rails_7_1.gemfile} (79%) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 76833c9..c63941f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 diff --git a/CHANGES.md b/CHANGES.md index 639b35c..1b6db33 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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. diff --git a/Gemfile b/Gemfile index b5d9c88..2fe87ba 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/rails_email_preview.gemspec b/rails_email_preview.gemspec index 572f9c2..43bb282 100644 --- a/rails_email_preview.gemspec +++ b/rails_email_preview.gemspec @@ -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' diff --git a/shared.gemfile b/shared.gemfile index bfdfb46..1422bd1 100644 --- a/shared.gemfile +++ b/shared.gemfile @@ -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' \ No newline at end of file diff --git a/spec/gemfiles/rails_4_2.gemfile b/spec/gemfiles/rails_4_2.gemfile deleted file mode 100644 index 6fc5f89..0000000 --- a/spec/gemfiles/rails_4_2.gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '../..' -eval_gemfile '../../shared.gemfile' - -gem 'rails', '~> 4.2.0' diff --git a/spec/gemfiles/rails_5_0.gemfile b/spec/gemfiles/rails_5_0.gemfile deleted file mode 100644 index 1ce822c..0000000 --- a/spec/gemfiles/rails_5_0.gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://rubygems.org' - -gemspec path: '../..' -eval_gemfile '../../shared.gemfile' - -gem 'rails', '~> 5.0.2' diff --git a/spec/gemfiles/rails_5_2.gemfile b/spec/gemfiles/rails_7_1.gemfile similarity index 79% rename from spec/gemfiles/rails_5_2.gemfile rename to spec/gemfiles/rails_7_1.gemfile index a1443b6..d43f90a 100644 --- a/spec/gemfiles/rails_5_2.gemfile +++ b/spec/gemfiles/rails_7_1.gemfile @@ -3,5 +3,5 @@ source 'https://rubygems.org' gemspec path: '../..' eval_gemfile '../../shared.gemfile' -gem 'rails', '~> 5.2.1' +gem 'rails', '~> 7.1'