Module: URI::SshGit
- Defined in:
- lib/uri/ssh_git.rb,
lib/uri/ssh_git/generic.rb,
lib/uri/ssh_git/version.rb
Overview
Parse and build git repository url via ssh protocol.
Defined Under Namespace
Classes: Generic
Constant Summary collapse
- VERSION =
'1.0.0'
Class Method Summary collapse
-
.parse(uri_string) ⇒ Generic
Parsed object.
Class Method Details
.parse(uri_string) ⇒ Generic
Returns parsed object.
30 31 32 33 34 35 |
# File 'lib/uri/ssh_git.rb', line 30 def self.parse(uri_string) host_part, path_part = uri_string.split(':', 2) userinfo, host = host_part.split('@', 2) path_part = '/' + path_part unless path_part.start_with?('/') Generic.build(userinfo: userinfo, host: host, path: path_part) end |