Sha256: c682104219aa8d3b5fa78324d85344710fd011db5e019577943a0d9f13298b49
Contents?: true
Size: 441 Bytes
Versions: 105
Compression:
Stored size: 441 Bytes
Contents
# frozen_string_literal: true module Avm module Launcher 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
105 entries across 105 versions & 2 rubygems