From a94fd0c70e73a79f4c9a4fa6d203f7717cdcf786 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Tue, 18 Apr 2023 11:31:08 +0900 Subject: [PATCH] Drop Ruby 2.6 support Follow up https://github.com/rubocop/rubocop/pull/11791. This PR drops Ruby 2.6 support. And JRuby has been dropped from the CI matrix because no JRuby-specific issues have been found and prevents the following build error: ```console #!/bin/bash -eo pipefail bundle install Fetching https://github.com/rubocop/rubocop.git You need to install git to be able to use gems from git repositories. For help installing git, please refer to GitHub's tutorial at https://help.github.com/articles/set-up-git Exited with code exit status 11 CircleCI received exit code 11 ``` https://app.circleci.com/pipelines/github/rubocop/rubocop-minitest/926/workflows/68776b54-5856-4acd-a99a-f41df114634d/jobs/6034 This does not mean no support for JRuby. RuboCop Rails will continue to support JRuby 9.4+. --- .circleci/config.yml | 6 ------ .rubocop.yml | 2 +- changelog/change_drop_ruby_2_6_support.md | 1 + rubocop-rails.gemspec | 2 +- tasks/changelog.rb | 5 ----- 5 files changed, 3 insertions(+), 13 deletions(-) create mode 100644 changelog/change_drop_ruby_2_6_support.md diff --git a/.circleci/config.yml b/.circleci/config.yml index 659e0233b3..d0339eec53 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,9 +35,6 @@ workflows: build: jobs: - documentation-checks - - rake_default: - name: Ruby 2.6 - image: cimg/ruby:2.6 - rake_default: name: Ruby 2.7 image: cimg/ruby:2.7 @@ -53,6 +50,3 @@ workflows: - rake_default: name: Ruby HEAD image: rubocophq/circleci-ruby-snapshot:latest # Nightly snapshot build - - rake_default: - name: JRuby 9.3 - image: circleci/jruby:9.3 diff --git a/.rubocop.yml b/.rubocop.yml index d0201a8404..86f6a45df6 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,7 +13,7 @@ AllCops: - 'vendor/**/*' - 'spec/fixtures/**/*' - 'tmp/**/*' - TargetRubyVersion: 2.6 + TargetRubyVersion: 2.7 SuggestExtensions: false InternalAffairs/NodeMatcherDirective: diff --git a/changelog/change_drop_ruby_2_6_support.md b/changelog/change_drop_ruby_2_6_support.md new file mode 100644 index 0000000000..b6b81a0abd --- /dev/null +++ b/changelog/change_drop_ruby_2_6_support.md @@ -0,0 +1 @@ +* [#986](https://github.com/rubocop/rubocop-rails/pull/986): **(Breaking)** Drop Ruby 2.6 support. ([@koic][]) diff --git a/rubocop-rails.gemspec b/rubocop-rails.gemspec index 9d226903b0..5467c0db16 100644 --- a/rubocop-rails.gemspec +++ b/rubocop-rails.gemspec @@ -8,7 +8,7 @@ Gem::Specification.new do |s| s.name = 'rubocop-rails' s.version = RuboCop::Rails::Version::STRING s.platform = Gem::Platform::RUBY - s.required_ruby_version = '>= 2.6.0' + s.required_ruby_version = '>= 2.7.0' s.authors = ['Bozhidar Batsov', 'Jonas Arvidsson', 'Yuji Nakayama'] s.description = <<~DESCRIPTION Automatic Rails code style checking tool. diff --git a/tasks/changelog.rb b/tasks/changelog.rb index 7bd49d848d..3581b17b51 100644 --- a/tasks/changelog.rb +++ b/tasks/changelog.rb @@ -1,10 +1,5 @@ # frozen_string_literal: true -if RUBY_VERSION < '2.6' - puts 'Changelog utilities available only for Ruby 2.6+' - exit(1) -end - # Changelog utility class Changelog ENTRIES_PATH = 'changelog/'