Skip to content

Commit

Permalink
Drop support Ruby 2.4
Browse files Browse the repository at this point in the history
Follow up to rubocop/rubocop#9648.
  • Loading branch information
koic committed Aug 26, 2021
1 parent a044046 commit a6ec8ef
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [2.4, 2.5, 2.6, 2.7]
ruby: [2.5, 2.6, 2.7]
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
Expand Down
3 changes: 3 additions & 0 deletions .rubocop.yml
@@ -1,5 +1,8 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.5

Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent

Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,8 @@

## Development

* Drop support Ruby 2.4. [#50](https://github.com/rubocop/guard-rubocop/pull/50)

## v1.4.0

* Support RuboCop 1.0
Expand Down
2 changes: 1 addition & 1 deletion guard-rubocop.gemspec
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/rubocop-hq/guard-rubocop'
spec.license = 'MIT'

spec.required_ruby_version = '>= 2.4'
spec.required_ruby_version = '>= 2.5'

spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
Expand Down
8 changes: 3 additions & 5 deletions lib/guard/rubocop/runner.rb
Expand Up @@ -80,11 +80,9 @@ def json_file_path
end

def result
@result ||= begin
File.open(json_file_path) do |file|
# Rubinius 2.0.0.rc1 does not support `JSON.load` with 3 args.
JSON.parse(file.read, symbolize_names: true)
end
@result ||= File.open(json_file_path) do |file|
# Rubinius 2.0.0.rc1 does not support `JSON.load` with 3 args.
JSON.parse(file.read, symbolize_names: true)
end
end

Expand Down

0 comments on commit a6ec8ef

Please sign in to comment.