diff --git a/.circleci/config.yml b/.circleci/config.yml index 2c00afb4d..5f0e9948d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,12 +95,12 @@ workflows: requires: [confirm_config_and_documentation] matrix: parameters: - ruby: ['2.4', '2.5', '2.6', '2.7', '3.0'] + ruby: ['2.5', '2.6', '2.7', '3.0'] - rubocop: requires: [confirm_config_and_documentation] matrix: parameters: - ruby: ['2.4', '2.5', '2.6', '2.7', '3.0'] + ruby: ['2.5', '2.6', '2.7', '3.0'] - edge-rubocop: requires: [confirm_config_and_documentation] - jruby diff --git a/.rubocop.yml b/.rubocop.yml index 2e8dcf3a8..25b193902 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -7,7 +7,7 @@ require: AllCops: DisplayCopNames: true - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.5 NewCops: disable Exclude: - 'vendor/**/*' diff --git a/CHANGELOG.md b/CHANGELOG.md index 822894675..361815fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Master (Unreleased) * Allow `RSpec/ContextWording` to accept multi-word prefixes. ([@hosamaly][]) +* Drop support for ruby 2.4. ([@bquorning][]) ## 2.2.0 (2021-02-02) diff --git a/rubocop-rspec.gemspec b/rubocop-rspec.gemspec index 15e6b2f64..1aed73a1e 100644 --- a/rubocop-rspec.gemspec +++ b/rubocop-rspec.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.version = RuboCop::RSpec::Version::STRING spec.platform = Gem::Platform::RUBY - spec.required_ruby_version = '>= 2.4.0' + spec.required_ruby_version = '>= 2.5.0' spec.require_paths = ['lib'] spec.files = Dir[ diff --git a/tasks/cops_documentation.rake b/tasks/cops_documentation.rake index 7b9887eda..391f99ac8 100644 --- a/tasks/cops_documentation.rake +++ b/tasks/cops_documentation.rake @@ -33,17 +33,15 @@ task documentation_syntax_check: :yard_for_generate_documentation do end examples.to_a.each do |example| - begin - buffer = Parser::Source::Buffer.new('', 1) - buffer.source = example.text - parser = Parser::Ruby25.new(RuboCop::AST::Builder.new) - parser.diagnostics.all_errors_are_fatal = true - parser.parse(buffer) - rescue Parser::SyntaxError => e - path = example.object.file - puts "#{path}: Syntax Error in an example. #{e}" - ok = false - end + buffer = Parser::Source::Buffer.new('', 1) + buffer.source = example.text + parser = Parser::Ruby25.new(RuboCop::AST::Builder.new) + parser.diagnostics.all_errors_are_fatal = true + parser.parse(buffer) + rescue Parser::SyntaxError => e + path = example.object.file + puts "#{path}: Syntax Error in an example. #{e}" + ok = false end end abort unless ok