- move the interface from top-level methods to hash arguments of URL to
keep the cask DSL as skinny as possible
- promote the Cask::Headers object up to a Cask::URL object that
encapsulates all infornation about the URL
- pull all knowledge about curl arguments into the DownloadStrategy,
leaving URL to act as a value object to be queried for details
- test at the DownloadStrategy level; setting up expected curl args
and example casks
This makes uninstall process flag arguments in the same manner
as install. Any argument with a leading dash is assumed to be a
flag, not a Cask. Argument processing still needs work, unknown
flags and spelling errors are silently accepted.
Proposed order - :script, :launchctl, :quit, :kext, :pkgutil, :files. Quit
a process before attempting to unload an assocated kext, unload kext before
attempting to delete the associated file, etc. Arguably :script fits
loically with :files near the end of the list. However, we also have
:after_uninstall which implicitly fires immediately after :files.
Therefore, running :script early provides greater functionality.
This should not be needed for .qlgenerator or .prefPane, because
(like .app) those are always directories/bundles and therefore must
be transported in some type of container.
this allows us to experiment with behavior that we may not want to
promote to an official feature just yet.
i'm thinking about stuff like #544, and other things i can't foresee
we'll have to be careful to not let this get out of hand, but i think
it could be helpful for cask authors to be able to try and problem solve
locally.
- brew cask list now displays casks without backing ruby files
- casks without a source are displayed as "caskname (!)"
- these casks can be uninstalled, with the caveat that it only removes
their files from the caskroom (doesn't run pkg uninstall or anything,
since there's no ruby file to define what to do)
- introduce Cask::Source to encapsulate different types of loading
behind a consistent interface
- mostly this is method-level reorg, kept refactoring of the internals
of these methods to a minimum for this pass
- this is preparatory cleanup for adding the ability to represent a
cask without a backing ruby file