* was already done, but inconsistently
* this style follows homebrew Formula
* covers user-facing messages, test titles, comments
* some related minor orthography is included, such
as the consistent spelling of our project name as
"homebrew-cask"
* grammar nits
from Cask::SystemCommand.run
* stderr and stdout are now separated, though both are available
* :print_stderr is made the default, closer to previous behavior
* exit status can be read from the result object
* plist parsing is more naturally handled in the result object.
The :plist argument to the run method was removed.
* whitespace
Keeping the `link` stanza in the DSL is a mistake: it will be
confusing when combined with the ability to install by copying.
This PR retires `link` completely, and adds a generic artifact
stanza called `artifact`. (`link` is removed from the docs, but
will still work for compatibility during transition.)
This only affects one current Cask (dwarf-fortress.rb), and that
Cask may be changed to use `suite` in the future.
Replacing `link` for almost all cases.
The `link` stanza can still appear in error messages, because
under the hood, `app` is still implemented as a pure synonym
for the `link` artifact. That will change automatically when
we factor into separate artifacts.
* `zap` was previously supported as a noop for forward-compatibility
* Also adds restrictions against relative paths in `uninstall :files`
* Also documents safety conventions for `uninstall :files`
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.
This is no real gain on Travis, which runs the full test suite
against two Rubies. It does catch a few classes of error when
running the test suite locally.
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
solves the following error:
```bash
$ bundle exec rake test
...
NoMethodError: undefined method `shutup'
...
```
This is not a permanent solution. The test suite should be changed
around to find the new `shutup` method, which is still in Homebrew,
but no longer global.
- separated from class `Cask::Artifact::Pkg` (the `:uninstall` DSL key)
- `:uninstall` can now be invoked for all Casks
- `uninstall_test.rb` also had to be separated from `pkg_test.rb`
Including the case where a Cask is already installed.
Always continue installing when multiple Casks are specified,
only raising an exception at the end of the command (if some
portion of the attempted install actions failed). Never
exit with an error code if "already installed" was the only
problem seen during the run.
Also tweak error messages.
Fixes#1347, #2677, #4785
Required disabling two tests regarding suggestions on Cask
spelling errors.
to send arbitrary Unix signals. Per discussion in #4328, some
processes are resistant to the `:quit` directive, and can be
made to shut down via a signal.
`sha256 :no_check` has been supported syntax for a couple of months,
and now is being transitioned to the preferred syntax, replacing
the `no_checksum` stanza (which will still be supported, but
deprecated)
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
global replace of:
'phinze/homebrew-cask' -> 'caskroom/homebrew-cask'
'phinze/cask' -> 'caskroom/cask'
'phinze/homebrew-testcasks' -> 'caskroom/homebrew-testcasks'
and various other specific places that needed updates
<3 the homebrew-cask community!
- lib/cask/url.rb: initialize(): add new `:data` attribute to hold post parameters
- lib/cask/download.rb: perform(): dispatch to new class based on `:using => :post`
- lib/cask/download_strategy.rb: Cask::CurlPostDownloadStrategy:
extend curl_args with x-www-form-urlencoded data
- doc/CASK_LANGUAGE_REFERENCE.md: HTTP URLs: document new strategy
- test/cask/test_download_strategy.rb: Cask::CurlPostDownloadStrategy: test new strategy
- Remove quotes from `defaults write` args. With quotes the value is
written as a string instead of a dictionary, which breaks the search
scope in alfred.
- Make the default scope consistent with alfred default
Fixes#2997. Interface is optional DSL stanza `container_type`.
This should only be used in rare instances. It is needed for the
case of a naked executable which should not be unpacked.
to `wiztoolsorg-restclient.rb`, per naming rules in `CONTRIBUTING.md`.
This requires making changes to the test suite, as the tests used this
cask. Imported special test Casks for the relevant test no longer has
a dependency on real Casks.
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.
fixes#2847. This PR adds OS X-specific extended attributes
(metadata) whenever :target is used on an artifact. The
extended attributes are available for search software such
as Spotlight or Alfred to discover the artifact under the
:target name.
Limitations: Spotlight specifically chooses to ignore this
attribute for App bundles. Alfred will also ignore this
attribute until the upcoming 2.2 release.
Adobe Air applications take the form of a .air file that the Adobe Air
runtime then installs and creates a .app -- typically in
/Applications. This patch provides a new container for those .air
files which the Adobe Air runtime installs to the Caskroom as well as
tests for Adobe Air app installations.
Presently, if homebrew-cask doesn't detect the Adobe Air runtime, it
will provide an informative error message and instructions to obtain
it via `brew cask install adobe-air`. This is obviously not ideal and
the installation process for the runtime should be automated in the
future.
Following up on #2719. MD5 checksums are
* nowhere mentioned in our docs
* not used in any existing Cask
* deprecated in Homebrew
Therefore it seems sensible to delete this code.