Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
de484c6b
Commit
de484c6b
authored
Feb 13, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Just use initialize and remove scheme we're not using
parent
59d49f70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
qa/qa/git/location.rb
qa/qa/git/location.rb
+5
-13
No files found.
qa/qa/git/location.rb
View file @
de484c6b
...
@@ -11,24 +11,16 @@ module QA
...
@@ -11,24 +11,16 @@ module QA
# See: config/initializers/1_settings.rb
# See: config/initializers/1_settings.rb
# Settings#build_gitlab_shell_ssh_path_prefix
# Settings#build_gitlab_shell_ssh_path_prefix
def
self
.
parse
(
git_uri
)
def
initialize
(
git_uri
)
if
git_uri
.
start_with?
(
'ssh://'
)
@git_uri
=
git_uri
new
(
git_uri
,
URI
.
parse
(
git_uri
))
@uri
=
if
git_uri
.
start_with?
(
'ssh://'
)
URI
.
parse
(
git_uri
)
else
else
*
rest
,
path
=
git_uri
.
split
(
':'
)
*
rest
,
path
=
git_uri
.
split
(
':'
)
# Host cannot have : so we'll need to escape it
# Host cannot have : so we'll need to escape it
user_host
=
rest
.
join
(
'%3A'
).
sub
(
/\A\[(.+)\]\z/
,
'\1'
)
user_host
=
rest
.
join
(
'%3A'
).
sub
(
/\A\[(.+)\]\z/
,
'\1'
)
new
(
git_uri
,
URI
.
parse
(
"ssh://
#{
user_host
}
/
#{
path
}
"
))
URI
.
parse
(
"ssh://
#{
user_host
}
/
#{
path
}
"
)
end
end
def
initialize
(
git_uri
,
uri
)
@git_uri
=
git_uri
@uri
=
uri
end
end
def
scheme
uri
.
scheme
||
'ssh'
end
end
def
port
def
port
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment