Skip to content

Commit

Permalink
Bump Rubocop TargetRubyVersion to 2.5 series
Browse files Browse the repository at this point in the history
Ruby 2.4 is EOL and Rubocop has accordingly dropped their support.

https://www.ruby-lang.org/en/news/2020/04/05/support-of-ruby-2-4-has-ended/
rubocop/rubocop#9648
https://github.com/rubocop/rubocop/blob/76bc0a0e026b13fccdc7b6bccfd6d082d24a7b52/CHANGELOG.md#1130-2021-04-20

The change to the TargetRubyVersion introduced a violation because of
the redundant `begin`, which has been autocorrected.
  • Loading branch information
azuredeviil053 committed Apr 20, 2021
1 parent 0d2f030 commit 4438800
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Expand Up @@ -2,7 +2,7 @@ inherit_gem:
rubocop-shopify: rubocop.yml

AllCops:
TargetRubyVersion: 2.4.4
TargetRubyVersion: 2.5.9
Exclude:
- 'vendor/bundle/**/*'
Lint/SuppressedException:
Expand Down
16 changes: 7 additions & 9 deletions lib/job-iteration.rb
Expand Up @@ -38,16 +38,14 @@ module JobIteration
def load_integrations
loaded = nil
INTEGRATIONS.each do |integration|
begin
load_integration(integration)
if loaded
raise IntegrationLoadError,
"#{loaded} integration has already been loaded, but #{integration} is also available. " \
"Iteration will only work with one integration."
end
loaded = integration
rescue LoadError
load_integration(integration)
if loaded
raise IntegrationLoadError,
"#{loaded} integration has already been loaded, but #{integration} is also available. " \
"Iteration will only work with one integration."
end
loaded = integration
rescue LoadError
end
end

Expand Down

0 comments on commit 4438800

Please sign in to comment.