class Zap::Utils::Git::Remote
- Zap::Utils::Git::Remote
- Reference
- Object
Defined in:
utils/git/remote.crConstant 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
- .head_commit_hash(dest : Path | String) : String
- .run(command : String, reporter : Reporter | Nil = nil, **extra) : Nil
- .run_and_get_output(command, **extra) : String
Instance Method Summary
- #base_url : String
- #clone(dest : String | Path = nil) : Nil
- #commitish : String | Nil
- #commitish_hash : String
- #get_default_branch? : String | Nil
- #get_ref_commit?(ref : String) : String | Nil
- #get_tag_for_semver!(semver : String) : String
- #hostname : String
- #key : String
- #match : Regex::MatchData
- #match? : Regex::MatchData | Nil
- #password : String | Nil
- #path : String | Nil
- #port : Int32 | Nil
- #protocol : String
- #resolved_commitish : String
- #semver : String | Nil
- #short_key : String
- #url : String
- #user : String | Nil