Skip to content

Commit

Permalink
Merge pull request #1140 from rubocop/drop-ruby-2.4
Browse files Browse the repository at this point in the history
Drop support for Ruby 2.4
  • Loading branch information
bquorning committed Apr 14, 2021
2 parents a8101ae + 5c2da78 commit b375a8f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Expand Up @@ -7,7 +7,7 @@ require:

AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
NewCops: disable
Exclude:
- 'vendor/**/*'
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion rubocop-rspec.gemspec
Expand Up @@ -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[
Expand Down
20 changes: 9 additions & 11 deletions tasks/cops_documentation.rake
Expand Up @@ -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('<code>', 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('<code>', 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
Expand Down

0 comments on commit b375a8f

Please sign in to comment.