Fluxion::Registry::Source
A registry the user has configured.
Two locations, deliberately separate:
- The mirror, a git clone under the cache directory. It is disposable โ deleting it costs a re-clone and nothing else.
- The installed directory under the config directory, holding the
configurations the user actually chose. That is theirs:
syncnever overwrites it without being asked.
Keeping them apart is what makes "installed" mean something. If the clone
were the install destination, every sync would silently change files the
user had edited.
Constants
Names become directory names, so they are constrained rather than escaped.
Constructors
Class methods
Derives a name from a repository URL: the last path segment, minus .git.
https://github.com/worxbend/fluxion-profiles.git -> fluxion-profiles
git@github.com:worxbend/fluxion-profiles -> fluxion-profiles
Accepted transports.
A registry decides what a machine will be told to install, so it has to
come over something authenticated. file: is allowed because a local
registry is genuinely useful โ for testing, and for a private one on a
shared filesystem โ and it is not reachable by anyone who is not already
on the machine.
Instance methods
Where the git mirror lives. Under the cache directory because it is reconstructible from the URL alone.
github.com/worxbend/x and git@github.com:worxbend/x.git are the same
registry, so the name is derived from the repository rather than the URL.