From fd35de6eb53363603b3bab6ab1fe9fb913b9656c Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Sun, 16 Oct 2022 01:00:17 -0400 Subject: [PATCH] Drop support for Ruby 2.6 (reached EoL on 2022-03-31) --- .github/workflows/test.yml | 9 ++------- .rubocop.yml | 2 +- CHANGELOG.md | 1 + README.md | 2 +- paper_trail.gemspec | 2 +- spec/models/widget_spec.rb | 2 +- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e0c604ad..cb1bd54e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: uses: ruby/setup-ruby@v1 with: # See "Lowest supported ruby version" in CONTRIBUTING.md - ruby-version: '2.6' + ruby-version: '2.7' - name: Bundle run: | gem install bundler @@ -66,12 +66,7 @@ jobs: # in case it still produces any deprecation warnings. # # See "Lowest supported ruby version" in CONTRIBUTING.md - ruby: [ '2.6', '2.7', '3.0', '3.1' ] - - exclude: - # rails 7 requires ruby > 2.7 - - ruby: '2.6' - gemfile: 'rails_7.0' + ruby: [ '2.7', '3.0', '3.1' ] steps: - name: Checkout source uses: actions/checkout@v2 diff --git a/.rubocop.yml b/.rubocop.yml index 226b6498..de77138f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -23,7 +23,7 @@ AllCops: NewCops: enable # See "Lowest supported ruby version" in CONTRIBUTING.md - TargetRubyVersion: 2.6 + TargetRubyVersion: 2.7 Layout/ArgumentAlignment: EnforcedStyle: with_fixed_indentation diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ffc1f4c..038292f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/). ### Dependencies - Drop support for Rails 5.2, which reached EoL on 2022-06-01 +- Drop support for Ruby 2.6, which reached EoL on 2022-03-31 ### Added diff --git a/README.md b/README.md index b465f24f..8000d57d 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Choose version: | paper_trail | branch | ruby | activerecord | |-------------|------------|----------|---------------| -| unreleased | master | >= 2.6.0 | >= 6.0, < 7.1 | +| unreleased | master | >= 2.7.0 | >= 6.0, < 7.1 | | 13 | 13-stable | >= 2.6.0 | >= 5.2, < 7.1 | | 12 | 12-stable | >= 2.6.0 | >= 5.2, < 7.1 | | 11 | 11-stable | >= 2.4.0 | >= 5.2, < 6.1 | diff --git a/paper_trail.gemspec b/paper_trail.gemspec index b2f61093..0fad3e9a 100644 --- a/paper_trail.gemspec +++ b/paper_trail.gemspec @@ -43,7 +43,7 @@ has been destroyed. # about 3 years, per https://www.ruby-lang.org/en/downloads/branches/ # # See "Lowest supported ruby version" in CONTRIBUTING.md - s.required_ruby_version = ">= 2.6.0" + s.required_ruby_version = ">= 2.7.0" # We no longer specify a maximum activerecord version. # See discussion in paper_trail/compatibility.rb diff --git a/spec/models/widget_spec.rb b/spec/models/widget_spec.rb index d931a30c..9d8a200d 100644 --- a/spec/models/widget_spec.rb +++ b/spec/models/widget_spec.rb @@ -138,7 +138,7 @@ RSpec.describe Widget, type: :model, versioning: true do it "have versions that are not live" do widget = described_class.create(name: "Henry") widget.update(name: "Harry") - widget.versions.map(&:reify).compact.each do |v| + widget.versions.filter_map(&:reify).each do |v| expect(v.paper_trail).not_to be_live end end