From c090c43beae9b8eeec48c3680e464700e8adccef Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Mon, 1 Jan 2024 12:36:16 -0300 Subject: [PATCH] Remove support for EOL Ruby and Rails --- .github/workflows/test.yml | 18 +++++------------- .rubocop.yml | 7 ++++++- CHANGELOG.md | 1 + Dockerfile | 10 +++++----- README.md | 10 ++++------ departure.gemspec | 2 +- 6 files changed, 22 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7e1e5975..0ac37af8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,20 +8,12 @@ jobs: fail-fast: false matrix: ruby: - - 2.5 - - 2.6 - - 2.7 + - 3.0 + - 3.1 + - 3.2 rails: - - 5.2.0 - - 6.0.0 - - 6.1.0 - include: - - ruby: 2.4 - rails: 5.2.0 - - ruby: 2.7 - rails: 7.0.1 - - ruby: 3.0 - rails: 6.1.0 + - 6.1.7.6 + - 7.0.8 env: PERCONA_DB_USER: root PERCONA_DB_PASSWORD: root diff --git a/.rubocop.yml b/.rubocop.yml index ba5f8e47..8c6f8f6a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,4 +1,7 @@ --- +AllCops: + TargetRubyVersion: 3.0 + Metrics/AbcSize: Enabled: false @@ -44,6 +47,9 @@ Style/CommandLiteral: Style/Documentation: Enabled: false +Style/FrozenStringLiteralComment: + Enabled: false # We never ended up being forced to do this for Ruby 3.x + Style/MultilineBlockChain: Exclude: - 'spec/integration_spec.rb' @@ -57,4 +63,3 @@ Style/SymbolArray: Style/UnneededPercentQ: Exclude: - 'departure.gemspec' - diff --git a/CHANGELOG.md b/CHANGELOG.md index 543d6111..27d60123 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Please follow the format in [Keep a Changelog](http://keepachangelog.com/) ## [Unreleased] - Fix support for Rails 6.0 and ForAlter `remove_index` . +- Remove support for EOL Ruby (< 3.0) and Rails (< 6.1) ## [6.5.0] - 2023-01-24 diff --git a/Dockerfile b/Dockerfile index cf6096ec..a6c17e0f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.3.4 +FROM ruby:3.3.0 MAINTAINER muffinista@gmail.com # Install apt based dependencies required to run Rails as @@ -14,11 +14,11 @@ RUN apt-get update && apt-get install -y \ RUN mkdir -p /app /app/lib/departure WORKDIR /app -# Copy the Gemfile as well as the Gemfile.lock and install -# the RubyGems. This is a separate step so the dependencies -# will be cached unless changes to one of those two files +# Copy the Gemfile as well as the Gemfile.lock and install +# the RubyGems. This is a separate step so the dependencies +# will be cached unless changes to one of those two files # are made. -COPY departure.gemspec Gemfile ./ +COPY departure.gemspec Gemfile ./ COPY lib/departure/version.rb ./lib/departure/ RUN gem install bundler && bundle install --jobs 20 --retry 5 diff --git a/README.md b/README.md index c10ea53f..3c5eb254 100644 --- a/README.md +++ b/README.md @@ -149,11 +149,11 @@ It's strongly recommended to name it after this gems name, such as ### Disable on per-migration basis -Departure gem is enabled by default. +Departure gem is enabled by default. In order to disable it on a particular migration the method `disable_departure!` should be used. ```ruby -class UseDepartureMigration < ActiveRecord::Migration[5.2] +class UseDepartureMigration < ActiveRecord::Migration[6.0] disable_departure! def up @@ -170,7 +170,7 @@ If you wish to only have Departure enabled per-migration, set `config.enabled_by Then, add a `uses_departure!` statement in migrations where Departure should be used: ```ruby -class UseDepartureMigration < ActiveRecord::Migration[5.2] +class UseDepartureMigration < ActiveRecord::Migration[6.0] uses_departure! def up @@ -226,8 +226,7 @@ git commits and tags, and push the `.gem` file to ## Contributing Bug reports and pull requests are welcome on GitHub at -https://github.com/departurerb/departure. They need to be opened against -`master` or `v3.2` only if the changes fix a bug in Rails 3.2 apps. +https://github.com/departurerb/departure. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. @@ -245,4 +244,3 @@ License](http://opensource.org/licenses/MIT). ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/departurerb/departure?style=for-the-badge) ![GitHub issues](https://img.shields.io/github/issues/departurerb/departure?style=for-the-badge) - diff --git a/departure.gemspec b/departure.gemspec index 49ddeddb..aa280638 100644 --- a/departure.gemspec +++ b/departure.gemspec @@ -7,7 +7,7 @@ require 'departure/version' # This environment variable is set on CI to facilitate testing with multiple # versions of Rails. -RAILS_DEPENDENCY_VERSION = ENV.fetch('RAILS_VERSION', ['>= 5.2.0', '!= 7.0.0', '< 7.1']) +RAILS_DEPENDENCY_VERSION = ENV.fetch('RAILS_VERSION', ['>= 6.1.0', '!= 7.0.0', '< 7.1']) Gem::Specification.new do |spec| spec.name = 'departure'