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 support for ruby 2.4.x #407

Merged
merged 7 commits into from
May 13, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.4'
- '2.5'
- '2.6'
- '2.7'
Expand Down Expand Up @@ -63,7 +62,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '2.4'
- '2.5'
- '2.6'
- '2.7'
Expand Down Expand Up @@ -96,7 +94,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '2.4'
- '2.5'
- '2.6'
- '2.7'
Expand Down Expand Up @@ -129,7 +126,6 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '2.4'
- '2.5'
- '2.6'
- '2.7'
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ AllCops:
- 'tmp/**/*'
- 'vendor/**/*'
- 'gemfiles/*'
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5

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.7.0...main)

* [CHANGE] Drop support for Ruby 2.4.x (by [@rishijain][])

# v4.7.0 / 2022-05-06 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.6.1...v4.7.0)

* [CHANGE] Run test suite with Ruby 3.1 (by [@etagwerker][])
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ See [formatters](docs/formatters.md)

RubyCritic is supporting Ruby versions:

* 2.4
* 2.5
* 2.6
* 2.7
Expand Down
2 changes: 1 addition & 1 deletion 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.4.0'
spec.required_ruby_version = '>= 2.5.0'

spec.files = [
'CHANGELOG.md',
Expand Down
16 changes: 7 additions & 9 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ def capture_output_streams

def with_cloned_fs
FakeFS do
begin
FakeFS::FileSystem.clone(PathHelper.project_path)
FakeFS::FileSystem.clone(PathHelper.project_path)

# reek schema is required to init reek
FakeFS::FileSystem.clone(PathHelper.reek_schema_path)
# reek schema is required to init reek
FakeFS::FileSystem.clone(PathHelper.reek_schema_path)

Dir.chdir(PathHelper.project_path)
yield
ensure
FakeFS::FileSystem.clear
end
Dir.chdir(PathHelper.project_path)
yield
ensure
FakeFS::FileSystem.clear
end
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing the begin from the block since th target ruby version in rubocop.yml is set to 2.5 and from ruby 2.5 onwards begin block is seemed redundant as per rubocop rules.
here is that PR when the change was done in rubocop rubocop/rubocop#5175

end

Expand Down
2 changes: 1 addition & 1 deletion travis_scripts/before_script.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -ev
if [ "${TRAVIS_RUBY_VERSION}" != "2.4" ] && [ "${TRAVIS_RUBY_VERSION}" != "3.0" ]; then
if [ "${TRAVIS_RUBY_VERSION}" != "3.0" ]; then
bundle exec appraisal install
fi
4 changes: 2 additions & 2 deletions travis_scripts/script.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash
set -ev
echo "Using Ruby v${TRAVIS_RUBY_VERSION}"
if [ "${TRAVIS_RUBY_VERSION}" = "2.4" ] || [ "${TRAVIS_RUBY_VERSION}" = "3.0" ]; then
if [ "${TRAVIS_RUBY_VERSION}" = "3.0" ]; then
bundle exec rake test
else
bundle exec appraisal rake test
fi
fi