Skip to content

Commit

Permalink
Rubocop: target Ruby 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
greysteil committed Sep 26, 2017
1 parent 39c99a2 commit 60b1e2e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AllCops:
DisplayCopNames: true
TargetRubyVersion: 2.3
TargetRubyVersion: 2.4
Exclude:
- vendor/**/*
- bin/**/*
Expand Down
2 changes: 1 addition & 1 deletion lib/bundler_git_source_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GitProxy
# Instead, we convert all `git@github.com:` URLs to use HTTPS.
def configured_uri_for(uri)
uri = uri.gsub("git@github.com:", "https://github.com/")
if /https?:/ =~ uri
if uri.match?(/https?:/)
remote = URI(uri)
config_auth =
Bundler.settings[remote.to_s] || Bundler.settings[remote.host]
Expand Down
2 changes: 1 addition & 1 deletion lib/dependabot/pull_request_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def create_branch(commit)
)
rescue Octokit::UnprocessableEntity => error
# Return quietly in the case of a race
return nil if error.message =~ /Reference already exists/
return nil if error.message.match?(/Reference already exists/)
raise
end

Expand Down
2 changes: 1 addition & 1 deletion lib/dependabot/pull_request_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def update_branch(commit)
)
rescue Octokit::UnprocessableEntity => error
# Return quietly if the branch has been deleted
return nil if error.message =~ /Reference does not exist/
return nil if error.message.match?(/Reference does not exist/)
raise
end

Expand Down

0 comments on commit 60b1e2e

Please sign in to comment.