diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-02-12 23:25:18 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-02-12 23:49:09 +0800 |
commit | 565fdd63cf49c266c7a6a2a0d2a843339a9d30e6 (patch) | |
tree | 3567619e22cdf16df541c67aaf6f7809d8f4e14b /qa/qa/git/repository.rb | |
parent | 2f34ef34fa230c1954e47504cd8ead1a6ab019fe (diff) | |
download | gitlab-ce-565fdd63cf49c266c7a6a2a0d2a843339a9d30e6.tar.gz |
Rearrange the test structure and introduce
a new repository location class.
Diffstat (limited to 'qa/qa/git/repository.rb')
-rw-r--r-- | qa/qa/git/repository.rb | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/qa/qa/git/repository.rb b/qa/qa/git/repository.rb index 606fc66b4d5..903d292b69c 100644 --- a/qa/qa/git/repository.rb +++ b/qa/qa/git/repository.rb @@ -4,20 +4,9 @@ require 'uri' module QA module Git class Repository - include Scenario::Actable + autoload :Location, 'qa/git/repository/location' - # See: config/initializers/1_settings.rb - # Settings#build_gitlab_shell_ssh_path_prefix - def self.parse_uri(git_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 + include Scenario::Actable def self.perform(*args) Dir.mktmpdir do |dir| |