Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Ruby 2.7 support, and take advantage of Ruby 3.0 #485

Merged
merged 4 commits into from Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/main.yml
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
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
@@ -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][])
nunosilva800 marked this conversation as resolved.
Show resolved Hide resolved

# 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
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
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
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