Forgotten in #4688, but should be considered part of Cask DSL 1.0.
A `depends_on` stanza is much less useful without the corresponding
`conflicts_with`.
References: #4896
References: #4688.
For forward-compatibility; intentionally left undocumented.
The `license` stanza is not free-form. There is a limited
set of valid symbols, of which the argument must be a member.
(The set will later be documented, and probably needs amendments.)
Version numbers and variants of licenses are intentionally
ommitted. The use-case for `license` is filtering and listing
of Casks. We want to avoid becoming a detailed repository of
application descriptions: that information can be found at the
`homepage` URL.
For forward-compatibility, intentionally undocumented. Currently
works only as a synonym: `depends_on :formula` substitutes for
`depends_on_formula`, which is intended to be removed.
However, this PR also provides additional `depends_on` keys for
future expansion of functionality:
- `:cask`
- `:macos`
- `:arch`
- `:x11`
- `:java`
The symbol names were chosen to match those used in Homebrew Formulae.
References: #4688, #2001
To aid in Tap transition. Require Homebrew 0.9.5, rescue
`rename_tags_dir_if_necessary` (`respond_to?` won't work there
because `rename_tags_dir_if_necessary` is a private method.
References: #4192, @Jackiebo in #4096
At every command execution
- invoke `rename_taps_dir_if_necessary` to help with Homebrew's Tap migration.
(Homebrew's migration seems to sometimes fail to fire, see #4096)
- untap `phinze/cask`, and tap `caskroom/cask`, to help with our own move
to a GitHub organization
After a few months, this can be reverted.
closes#2996. Moves the logic for creating target directores
from init-time in cask.rb to install-time within the artifact
classes. Removes the need for special-case mkpath for each
new artifact type.
- add new file "cask/utils.rb" analogous to "utils.rb" in Homebrew
- define odebug and odumpcask, analogs of ohai and friends, but
which only give output when --debug is in effect
- move the debug setting from an instance variable in Cask::CLI
to a method Cask.debug, defined in "lib/cask/options.rb", which
was added in #2276. (Perhaps options.rb should be merged back
into Cask::CLI).
- sprinkle odebug statements liberally throughout the codebase
- update tests
For safety.
- This is a step toward reworking system_command.rb so that
invocations are done in list form on the back end, avoiding
surprises from quoting and shell metacharacters.
- There is one transitional hack here: the _quote method in
Cask::SystemCommand is modified to avoid double-quoting. The
_quote method itself will go away in a future revision when
only list-forms are used.
- Casks using system are not touched. It seems natural to
address that when creating the DSL for after_install/before_install.
Make caveats a first-class member of the Cask DSL. It no longer has to
be specified with "def caveats", but can be given as "caveats do ... end"
as with after_install blocks.
In addition, create a mini-DSL which can be used within caveats blocks,
providing standard messages when manual installers must be used,
reboot-required, etc.
Add alternate form: caveats can also accept a compile-time string for
simple cases.
This is 99% compatible with old Casks, as it still works by defining
a caveats method. However, all Casks containing caveats are cleaned
up and adapted according to the new DSL.
Full docs in CONTRIBUTING.md.
form "<user>/<repo>/<cask>" may be used on cmdline, matching homebrew
- refactor Cask::Source::Tap into Cask::Source::Tapped, removing
code, only handling unqualified cask names here now (ie no slash)
- create Cask::Source::TappedQualified, handling "<user>-<repo>/<cask>"
form as before, and new form "<user>/<repo>/<cask>", for the case that
the relevant tap already exists
- create Cask::Source::UntappedQualified, handling both command-line
forms as above, but implicitly creating adding a new tap if it
does not already exist
- add module Cask::QualifiedCaskName for utility functions on qualified
Cask names
- 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
- 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