Skip to content

Commit

Permalink
Drop Ruby 2.7 support, and take advantage of Ruby 3.0 (#485)
Browse files Browse the repository at this point in the history
* Bump cucumber, minitest, mocha, parser, rake, reek, rubocop, and ruby_parser dependencies

Also address Lint/UselessAssignment and Style/MapIntoArray warnings that newer versions of rubocop will complain about on newer versions of Ruby.

prep for ruby 3


---------

Co-authored-by: Nuno Silva <[email protected]>
  • Loading branch information
faisal and nunosilva800 authored Apr 15, 2024
1 parent 26adfb2 commit 034d612
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
Expand Down Expand Up @@ -59,7 +58,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
Expand Down Expand Up @@ -89,7 +87,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
Expand Down Expand Up @@ -119,7 +116,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AllCops:
- 'tmp/**/*'
- 'vendor/**/*'
- 'gemfiles/*'
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0

Metrics/BlockLength:
Enabled: false
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# main [(unreleased)](https://github.com/whitesmith/rubycritic/compare/v4.9.1...main)

* [CHANGE] Drop support for Ruby 2.7.x (by [@faisal][])

# v4.9.1 / 2024-04-14 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.9.0...v4.9.1)

* [CHANGE] Bump cucumber, minitest, parser, rake, reek, rubocop, and ruby_parser dependencies (by [@faisal][])
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ RubyCritic is supporting Ruby versions:
| 2.7 | [v4.9.x](https://github.com/whitesmith/rubycritic/tree/v4.9.1) |
| 3.0 | latest |
| 3.1 | latest |
| 3.2 | latest |
| 3.3 | latest |

## Improving RubyCritic

Expand Down
4 changes: 2 additions & 2 deletions lib/rubycritic/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def self.build_mode?
!Config.no_browser && %i[compare_branches ci].include?(Config.mode)
end

def self.method_missing(method, *args, &block)
def self.method_missing(method, ...)
if configuration.respond_to?(method)
configuration.public_send(method, *args, &block)
configuration.public_send(method, ...)
else
super
end
Expand Down
8 changes: 4 additions & 4 deletions rubycritic.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.summary = 'RubyCritic is a Ruby code quality reporter'
spec.homepage = 'https://github.com/whitesmith/rubycritic'
spec.license = 'MIT'
spec.required_ruby_version = '>= 2.7.0'
spec.required_ruby_version = '>= 3.0.0'

spec.files = [
'CHANGELOG.md',
Expand All @@ -33,9 +33,9 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'flay', '~> 2.13'
spec.add_runtime_dependency 'flog', '~> 4.7'
spec.add_runtime_dependency 'launchy', '>= 2.5.2'
spec.add_runtime_dependency 'parser', '>= 3.2.2.4'
spec.add_runtime_dependency 'parser', '>= 3.3.0.5'
spec.add_runtime_dependency 'rainbow', '~> 3.1.1'
spec.add_runtime_dependency 'reek', '~> 6.0', '< 6.2'
spec.add_runtime_dependency 'reek', '~> 6.3.0', '< 7.0'
spec.add_runtime_dependency 'rexml'
spec.add_runtime_dependency 'ruby_parser', '~> 3.21'
spec.add_runtime_dependency 'simplecov', '>= 0.22.0'
Expand All @@ -58,7 +58,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'mocha', '~> 2.2.0'
spec.add_development_dependency 'rake', '~> 13.2.0', '>= 11.0.0'
spec.add_development_dependency 'rexml', '>= 3.2.0'
spec.add_development_dependency 'rubocop', '~> 1.59.0', '>= 1.54.0' # >= 1.60 requires Ruby 3
spec.add_development_dependency 'rubocop', '~> 1.63.0', '>= 1.54.0'
spec.add_development_dependency 'rubocop-minitest'
spec.add_development_dependency 'rubocop-performance'
spec.add_development_dependency 'rubocop-rake'
Expand Down

0 comments on commit 034d612

Please sign in to comment.