diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 99d6021..6a31f64 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@0dafeac902942906541bc140009cdbf32665b601 # ruby/setup-ruby@v1 see https://github.com/ruby/setup-ruby/tree/v1 with: - ruby-version: '3.3' + ruby-version: '4.0' - name: Install dependencies run: bundle install - name: Run RuboCop against BASE..HEAD changes diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6a71d56..ca8d067 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,13 +8,14 @@ jobs: fail-fast: false matrix: ruby-version: - - '3.2' - '3.3' - '3.4' + - '4.0' gemfile: - gemfiles/Gemfile.rails71 - gemfiles/Gemfile.rails72 - gemfiles/Gemfile.rails80 + - gemfiles/Gemfile.rails81 exclude: # rails 8.0 requires ruby >= 3.2 # https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 57c672d..b79d7c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [Unreleased] ### Fixed * Support Ruby 3.4. Drop support for Rails 7.0, Ruby 3.1 +* Support Ruby 4.0, Rails 8.1. Drop support for Ruby 3.2 ## 0.4.3 / 2024-11-19 ### Added diff --git a/gemfiles/Gemfile.rails81 b/gemfiles/Gemfile.rails81 new file mode 100644 index 0000000..9706eb2 --- /dev/null +++ b/gemfiles/Gemfile.rails81 @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +gemspec path: '..' + +gem 'activerecord', '~> 8.1.0' +gem 'activesupport', '~> 8.1.0' diff --git a/ndr_browser_timings.gemspec b/ndr_browser_timings.gemspec index b382642..7640f7e 100644 --- a/ndr_browser_timings.gemspec +++ b/ndr_browser_timings.gemspec @@ -16,9 +16,9 @@ Gem::Specification.new do |spec| spec.files = `git ls-files -z`.split("\x0"). select { |f| gem_files.include?(f.split('/')[0]) } - spec.add_dependency 'rails', '>= 7.1', '< 8.1' + spec.add_dependency 'rails', '>= 7.1', '< 8.2' - spec.required_ruby_version = '>= 3.2.0' + spec.required_ruby_version = '>= 3.3' spec.add_development_dependency 'mocha' spec.add_development_dependency 'ndr_dev_support', '>= 6.0' diff --git a/test/test_helper.rb b/test/test_helper.rb index 5ab0611..bd3206d 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -17,12 +17,11 @@ Minitest.backtrace_filter = Minitest::BacktraceFilter.new # Load fixtures from the engine -if ActiveSupport::TestCase.respond_to?(:fixture_path=) - ActiveSupport::TestCase.fixture_path = File.expand_path('fixtures', __dir__) - ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path - ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + '/files' - ActiveSupport::TestCase.fixtures :all -end +fixtures_dir = File.expand_path('fixtures', __dir__) +ActiveSupport::TestCase.fixture_paths << fixtures_dir # Rails >= 7.1 +ActionDispatch::IntegrationTest.fixture_paths << fixtures_dir +ActiveSupport::TestCase.file_fixture_path = "#{fixtures_dir}/files" +ActiveSupport::TestCase.fixtures :all ActiveSupport::TestCase.class_eval do def capture_recordings