Sha256: fdd454ffdd908486b443cfc1a290e5e18b0dd311e24ce4e8a169c54530d478fb
Contents?: true
Size: 436 Bytes
Versions: 103
Compression:
Stored size: 436 Bytes
Contents
# frozen_string_literal: true module Avm module Git module Vendor module Github class << self def to_ssh_url(url) return nil if url.blank? url_no_dot_git = url.gsub(/\.git\z/, '') m = %r{\Ahttps://github.com/([^/]+)/([^/]+)\z}.match(url_no_dot_git.to_s) m ? "git@github.com:#{m[1]}/#{m[2]}.git" : url end end end end end end
Version data entries
103 entries across 103 versions & 2 rubygems