* Fill in the functionality for the `depends_on :macos` stub
* de-document `caveats` method `os_version_only`
* clean up some related docs re: version strings
* add `depends_on_test.rb`
* clarify some related `depends_on :formula` doc, tests, and code
* formatting in test Casks
* "Canonical App Name" becomes "Simplified App Name"
* devscript `cask_namer` renamed to `generate_cask_token`
* doc file `CASK_NAMING_REFERENCE.md` renamed to `cask_token_reference.md`
* DSL uses `"#{token}"` for interpolation instead of `"#{title}"`
* documentation text
* backend code (variables, method, class names)
* error message text
* tests
* code comments
* Cask comments
* emphasize `tags :name`
* doc: use "vendor" consistently instead of "developer"
* doc: many man page argument descriptions were incorrect
* incidental clarifications
Many backend variables similar to `cask_name` or `cask` have
been standardized to `cask_token`, `token`, etc, resolving a long-
standing ambiguity in which variables named `cask` might contain
a Cask instance or a string token.
In many places the docs could be shortened from "Cask name" to
simply "token", which is desirable because we use the term "Cask"
in too many contexts.
* accept index argument to `info_plist` in case of multiple `app`
artifacts, defaulting to first
* return `Pathname` object from `info_plist`
* use `@command.run` instead of `system_command` which is intended
as an external interface
* quoting
* rename `remove_accessibility_access` to `disable_accessibility_access`
to match corresponding method `enable_accessibility_access`
* move `TCC.db` and `.AccessibilityAPIEnabled` paths to `Cask::Locations`
* remove unneeded backslash from `TCC.db` path
* use full paths to `touch` and `sqlite3` utilities
* use `@command.run` instead of `system_command` which is intended as an
external interface
* reverse conditional so enable/disable logic is consistent
* `sudo` is needed when creating `.AccessibilityAPIEnabled`
* instead of silent fail, warn that access cannot be safely disabled on
Mountain Lion and earlier (it could, but might affect other apps)
* quoting/whitespace
From legacy forms "after_install", etc.
* abstract out `method_missing_message` to Cask::Utils
* provide `method_missing` coverage in pre/postflight blocks (fixes#7445)
* fix old-style rendering of Cask name as a classname in
`method_missing` messages
This takes the form of a horrible hack: DSL version numbers may
end with "test", *eg* ":v1test". Such Casks are mapped to class
`TestCask` instead of class `Cask`.
The intention is that all of this logic will be removed when
Casks are migrated away from separate classes.
Tests driven by RSpec are still todo.
`caskroom_only` was never documented. Its original purpose was
obsoleted in #4865, and its use has been recently been reduced to
two Casks.
This PR
* continues the rationalization of naming by changing `caskroom_only`
to `stage_only`. "stage" is the verb for "make a copy under the
caskroom directory"
* documents `stage_only`
* adds tests for `stage_only`
* validates the argument to `stage_only`
* gives sensible output in `brew cask info` for `stage_only` Casks
* enforces that `stage_only` cannot coexist with any activatable
artifacts
`caskroom_only` is still supported for backward compatibility,
but should be removed before 0.50.0.
* `app`, `suite`, and `artifact no longer implemented as
synonyms for `link`
* backward-compatible code/comments removed
* creates class `Cask::Artifact::Suite`
* updates `brew cask info` to show specific artifact type
* fixes stray "Generic artifact" messages
Automatic installs - like thoughtbot's laptop script - fail when we
use Homebrew's onoe method. Using opoo (to warn) will let the
scripts complete successfully when they try to install packages that
have already been installed.
Test for downgrading AlreadyInstalledError to warning
* part of DSL 1.0 review
* `destination_path` was always a bit vague (it refers to
Cask-specific, version-specific location under
`/opt/homebrew-cask/Caskroom`)
* here renamed `staged_path` to match upcoming command verb
`brew cask stage`
* rename also intended to reduce confusion when we implement
copying as a configurable alternative to symlinking
* transitional `destination_path` methods to remain while
Casks are converted (this was documented as a part of the
DSL, and used by 39 Casks in main repo)
* unrelated variables containing "stage" recast for clarity
* 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