Commit graph

1074 commits

Author SHA1 Message Date
Claudia
7f5dc211ba In SystemCommand, fix success? and exit_status
When invoking a `SystemCommand` with `:must_succeed => false`, the `SystemCommand::Result` class would mistake a `Process.Status` object for a `Fixnum`.

This commit fixes this by instantiating `Result` with the actual status code as a number.
2014-12-08 15:53:35 +01:00
Roland Walker
25ff85451d Merge pull request #7893 from claui/fix-brew-cask-dump-ruby18
Fix an issue with `--debug` and `_dump` on Ruby 1.8.7
2014-12-08 07:50:46 -05:00
Roland Walker
1ddbf0e72e Merge pull request #7848 from rolandwalker/remove_x11_required
remove `caveats` / `x11_required`
2014-12-08 05:41:00 -05:00
Roland Walker
09bed7a53b Merge pull request #7845 from rolandwalker/depends_on_x11
DSL: add `depends_on :x11`, permit multiple `depends_on` stanzas
2014-12-08 05:40:45 -05:00
Claudia
5eb24daada Fix an issue with --debug and _dump on Ruby 1.8.7
This fixes an issue where both the `--debug` option and the `brew cask _dump` command would fail on Ruby 1.8.7 when the Cask has an `installer` stanza, e. g. `adobe-air`.
2014-12-08 11:20:41 +01:00
Roland Walker
69d0f98042 remove caveats / x11_required 2014-12-06 11:46:00 -05:00
Roland Walker
5348260520 DSL: add depends_on :x11 2014-12-06 11:20:15 -05:00
Roland Walker
e581347939 allow multiple depends_on stanzas + refactor
also:
* disallow combining depends_on :macos comparison expressions
* ohai message when depends_on is present
* explicit accessors for :cask and :formula
* simplify some logic and flatten nested conditionals
* reflow incidental doc
2014-12-06 11:06:30 -05:00
Roland Walker
a870869f9a Merge pull request #7822 from rolandwalker/allow_leading_numbers
Remove constraint that Cask tokens cannot start with digits
2014-12-06 09:00:04 -05:00
Roland Walker
d7956e597d DSL: remove support for tags :name 2014-12-06 08:03:03 -05:00
Roland Walker
27c49e31a5 Merge pull request #7825 from rolandwalker/remove_title_support
remove support for `title` method in Casks
2014-12-06 07:56:09 -05:00
Roland Walker
2a09a970cd Merge pull request #7819 from rolandwalker/depends_on_followup
followups on `depends_on` `:macos`/`:arch`
2014-12-06 07:55:13 -05:00
Roland Walker
f5bcbd00a5 Merge pull request #7805 from rolandwalker/add_name_stanza
Add `name` stanza for proper name
2014-12-06 05:28:30 -05:00
Roland Walker
8170c34785 DSL: remove arch_only caveats support 2014-12-05 18:46:51 -05:00
Roland Walker
a6bc35cfa8 remove support for title method in Casks
obsoleted by `token`
2014-12-05 18:41:24 -05:00
Roland Walker
b7eb666557 Merge pull request #7794 from rolandwalker/remove_os_version_only_caveat
remove `os_version_only` support from `caveats`
2014-12-05 18:34:44 -05:00
Roland Walker
cb5a40f787 remove constraint that tokens can't start w/ digit
Class names are now completely hidden from the user.  This
commit works by adding a prefix to all Cask class names, which
is considered to be an ugly transitional hack on the way to
representing individual Casks as instances.
2014-12-05 11:54:56 -05:00
Roland Walker
037ece852b followups on depends_on :macos/:arch
* always coerce `:macos` value to array; simplify code
 * remove warning comments about unset values
 * doc explicitly that requirements are covered as well as dependencies
 * doc that `depends_on` is not consulted until `install` time
 * in docs and code, say "release" instead of "version" for the :macos release
   * todo: provide our own variable styled "release" to use in Casks, instead of Homebrew's `MacOS.Version`
 * doc that symbols are preferred for `:macos` over strings in Casks (interally, all are converted to idential `Gem::Version` objects)
 * doc: remove `os_version_only` from `cask_language_deltas.md`
 * doc: improve internal links
 * doc: recast OS X release symbol list as table
 * doc: (incidental) regularize orthography of Formula and Cask
2014-12-05 09:55:47 -05:00
Roland Walker
89ec82d9f8 Merge pull request #7793 from rolandwalker/depends_on_arch
DSL: `depends_on :arch` functionality/tests/doc
2014-12-05 09:40:36 -05:00
Roland Walker
f800db0383 Add name stanza for proper name
Documentation is in a separate PR so that authors don't start
using this feature before release.
2014-12-04 20:08:55 -05:00
Roland Walker
bf96caa2b3 convert more backend code from cask_name to token
missed in #7673
2014-12-04 18:48:33 -05:00
Roland Walker
dc93af470d remove os_version_only from caveats
obsoleted by `depends_on :macos`
2014-12-04 14:54:05 -05:00
Roland Walker
7f5e5124f6 DSL: depends_on :arch functionality/tests/doc
* fill in functionality for the `depends_on :arch` stub
* de-document `caveats` method `arch_only`
2014-12-04 14:29:27 -05:00
Roland Walker
52fdbcd671 cut v0.49.0 2014-12-02 13:04:59 -05:00
Roland Walker
1c5c6ae774 Merge pull request #7738 from claui/fix-brew-cask-list-ruby18
Fix regression where some CLI commands break on Ruby 1.8
2014-12-02 12:50:59 -05:00
Roland Walker
f7fb88065e Merge pull request #7740 from rolandwalker/relax_sourceforge_jp
relax sourceforge.jp URL pattern
2014-12-02 12:50:12 -05:00
Roland Walker
ddc865311f missing "require 'rubygems'"
for depends_on :macos
2014-12-02 12:49:51 -05:00
Roland Walker
2614a447a2 relax sourceforge.jp URL pattern 2014-12-02 12:24:36 -05:00
Roland Walker
c59a5fcb80 DSL: depends_on :macos functionality/tests/doc
* 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
2014-12-02 12:04:27 -05:00
Claudia
03a8efe128 Make CLI::Alfred and Source::PathBase work with Ruby 1.8 2014-12-02 17:01:01 +01:00
Roland Walker
9050f4d301 Merge pull request #7684 from rolandwalker/accessibility_review
Review and revise accessibility methods in postflight mini-DSL
2014-12-02 05:19:39 -05:00
Roland Walker
bff136da57 Merge pull request #7685 from rolandwalker/plist_postflight_review
review/revise plist methods in postflight mini-DSL
2014-12-02 05:19:12 -05:00
Roland Walker
d0d50fd935 Merge pull request #7686 from rolandwalker/move_to_app_postflight_review
review/revise `suppress_move_to_applications` method in postflight mini-DSL
2014-12-02 05:19:00 -05:00
Roland Walker
748b0b3528 Merge pull request #6184 from ndr-qef/gpg
Introduce GPG operations
2014-12-01 18:42:27 -05:00
Roland Walker
6da1dd13bc Merge pull request #7673 from rolandwalker/name_to_token
unify and recast "Cask name" and "title" as "token"
2014-12-01 11:05:12 -05:00
Roland Walker
a335d3b06d unify and recast "Cask name" & "title" as "token"
* "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.
2014-12-01 11:00:23 -05:00
Roland Walker
7ee2ec3253 revise move_to_app method in postflight mini-DSL
* use `@command.run` instead of `system_command` which is intended
  as an external interface
* quoting
2014-11-29 13:54:41 -05:00
Roland Walker
777949dd75 revise plist methods in postflight mini-DSL
* 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
2014-11-29 13:43:06 -05:00
Roland Walker
2ff2db48b6 revise accessibility methods in postflight miniDSL
* 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
2014-11-29 13:21:21 -05:00
Roland Walker
19ee3986c0 Refactor backend classes to match pre/postflight
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
2014-11-26 12:19:17 -05:00
ndr
62c1ce5dfc Merge pull request #7530 from rolandwalker/enforce_min_dsl_version
enforce a valid minimum DSL version in headers
2014-11-23 11:14:58 +00:00
Roland Walker
e2a0214de6 enforce a valid minimum DSL version in headers 2014-11-22 20:08:25 -05:00
Roland Walker
367e0f2880 Merge pull request #7529 from rolandwalker/remove_tap_migration
Remove automatic tap migration code and docs
2014-11-22 20:03:27 -05:00
Fabio Niephaus
62cbb3d7a6 get 'syncfolder' from Preferences. resolves #7216 2014-11-22 23:10:04 +01:00
Roland Walker
31f81cc8e9 remove all transitional tap migration code 2014-11-22 10:33:28 -05:00
ndr
5192156f92 Merge pull request #7507 from rolandwalker/remove_caskroom_only_support
DSL: remove support for `caskroom_only`
2014-11-21 18:41:49 +00:00
Roland Walker
8f67bb3ecb Merge pull request #7506 from rolandwalker/remove_destination_path_support
remove support for legacy form `destination_path`
2014-11-21 11:29:18 -05:00
Roland Walker
f5d80c190d DSL: remove support for caskroom_only
obsoleted by `stage_only`
2014-11-21 09:56:33 -05:00
Roland Walker
850e8cf3c0 remove support for legacy form destination_path
replaced by `staged_path`
2014-11-21 09:47:13 -05:00
Roland Walker
7559c83e3a enforce version :latest as a symbol
`:latest` has special meaning.  The corresponding string
`'latest'` is disallowed.
2014-11-21 09:31:43 -05:00