summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-02-14 15:27:18 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-02-14 15:27:18 +0800
commit36c76ec6f2f72d48319e1dc2050850cb393c4959 (patch)
tree402772333a0fdb75b36f83c031693736e7a47b49 /qa
parent305c8751c2845dc9c96f654579c7c9063c760534 (diff)
downloadgitlab-ce-36c76ec6f2f72d48319e1dc2050850cb393c4959.tar.gz
Indent as Rubocop likeqa-clone-with-deploy-key
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/git/location.rb17
1 files changed, 9 insertions, 8 deletions
diff --git a/qa/qa/git/location.rb b/qa/qa/git/location.rb
index 55f7213972d..30538388530 100644
--- a/qa/qa/git/location.rb
+++ b/qa/qa/git/location.rb
@@ -13,14 +13,15 @@ module QA
# Settings#build_gitlab_shell_ssh_path_prefix
def initialize(git_uri)
@git_uri = git_uri
- @uri = if git_uri.start_with?('ssh://')
- URI.parse(git_uri)
- else
- *rest, path = git_uri.split(':')
- # Host cannot have : so we'll need to escape it
- user_host = rest.join('%3A').sub(/\A\[(.+)\]\z/, '\1')
- URI.parse("ssh://#{user_host}/#{path}")
- end
+ @uri =
+ if git_uri.start_with?('ssh://')
+ URI.parse(git_uri)
+ else
+ *rest, path = git_uri.split(':')
+ # Host cannot have : so we'll need to escape it
+ user_host = rest.join('%3A').sub(/\A\[(.+)\]\z/, '\1')
+ URI.parse("ssh://#{user_host}/#{path}")
+ end
end
def port