Commit 36c76ec6 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Indent as Rubocop like

parent 305c8751
...@@ -13,14 +13,15 @@ module QA ...@@ -13,14 +13,15 @@ module QA
# Settings#build_gitlab_shell_ssh_path_prefix # Settings#build_gitlab_shell_ssh_path_prefix
def initialize(git_uri) def initialize(git_uri)
@git_uri = git_uri @git_uri = git_uri
@uri = if git_uri.start_with?('ssh://') @uri =
URI.parse(git_uri) if git_uri.start_with?('ssh://')
else URI.parse(git_uri)
*rest, path = git_uri.split(':') else
# Host cannot have : so we'll need to escape it *rest, path = git_uri.split(':')
user_host = rest.join('%3A').sub(/\A\[(.+)\]\z/, '\1') # Host cannot have : so we'll need to escape it
URI.parse("ssh://#{user_host}/#{path}") user_host = rest.join('%3A').sub(/\A\[(.+)\]\z/, '\1')
end URI.parse("ssh://#{user_host}/#{path}")
end
end end
def port def port
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment