Module: EacLauncher::Vendor::Github
- Defined in:
- lib/eac_launcher/vendor/github.rb
Class Method Summary collapse
Class Method Details
.to_ssh_url(url) ⇒ Object
5 6 7 8 9 |
# File 'lib/eac_launcher/vendor/github.rb', line 5 def to_ssh_url(url) return nil if url.blank? m = %r{\Ahttps://github.com/([^/]+)/([^/]+)\z}.match(url.to_s) m ? "[email protected]:#{m[1]}/#{m[2]}.git" : url end |