From 36c76ec6f2f72d48319e1dc2050850cb393c4959 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Wed, 14 Feb 2018 15:27:18 +0800 Subject: Indent as Rubocop like --- qa/qa/git/location.rb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'qa') 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 -- cgit v1.2.1