class Zap::Utils::Git::Remote

Defined in:

utils/git/remote.cr

Constant Summary

GIT_URL_REGEX = /(?:git\+)?(?<protocol>git|ssh|http|https|file):\/\/(?:(?<user>[^:@]+)?(:(?<password>[^@]+))?@)?(?<hostname>[^:\/]+)(:(?<port>\d+))?[\/:](?<path>[^#]+)((?:#semver:(?<semver>[^:]+))|(?:#(?<commitish>[^:]+)))?/

See: https://docs.npmjs.com/cli/v9/configuring-npm/package-json#git-urls-as-dependencies ://[[:]@][:][:][/][# | #semver:]

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

or(other : T) : T | self forall T or, pipe(&) pipe

Constructor Detail

def self.new(url : String, reporter : Reporter | Nil = nil) #

[View source]

Class Method Detail

def self.head_commit_hash(dest : Path | String) : String #

[View source]
def self.run(command : String, reporter : Reporter | Nil = nil, **extra) : Nil #

[View source]
def self.run_and_get_output(command, **extra) : String #

[View source]

Instance Method Detail

def base_url : String #

[View source]
def clone(dest : String | Path = nil) : Nil #

[View source]
def commitish : String | Nil #

[View source]
def commitish_hash : String #

[View source]
def get_default_branch? : String | Nil #

[View source]
def get_ref_commit?(ref : String) : String | Nil #

[View source]
def get_tag_for_semver!(semver : String) : String #

[View source]
def hostname : String #

[View source]
def key : String #

[View source]
def match : Regex::MatchData #

[View source]
def match? : Regex::MatchData | Nil #

[View source]
def password : String | Nil #

[View source]
def path : String | Nil #

[View source]
def port : Int32 | Nil #

[View source]
def protocol : String #

[View source]
def resolved_commitish : String #

[View source]
def semver : String | Nil #

[View source]
def short_key : String #

[View source]
def url : String #

[View source]
def user : String | Nil #

[View source]