Commit Graph

1078 Commits

Author SHA1 Message Date
Roland Walker 58c2f16633 doctor: ignore internal HOMEBREW_CELLAR constant
Instead extract it from the brew CLI, and consider
removing it from our doctor output entirely.
2014-12-18 11:08:34 -05:00
Roland Walker df8835ab73 doctor: ignore internal HOMEBREW_REPOSITORY const
...constant. Instead extract it from the brew CLI, and consider
removing it from our doctor output entirely.
2014-12-18 11:08:34 -05:00
Roland Walker 139a723179 Merge pull request #8197 from rolandwalker/remove_homebrew_debrew
remove `debrew.rb` from homebrew-fork
2014-12-17 18:42:01 -05:00
Roland Walker 75b557352f Merge pull request #8196 from rolandwalker/remove_homebrew_install_renamed
remove `install_renamed.rb` from homebrew-fork
2014-12-17 18:41:53 -05:00
Roland Walker 7c33ee8a7c Merge pull request #8195 from rolandwalker/remove_homebrew_patch
remove `patch.rb` from homebrew-fork
2014-12-17 18:41:43 -05:00
Roland Walker b96822f878 Merge pull request #8194 from rolandwalker/remove_homebrew_tap_migrations
remove homebrew-fork file `tap_migrations.rb`
2014-12-17 18:41:32 -05:00
Roland Walker d8a94da60f Merge pull request #8193 from rolandwalker/remove_homebrew_install_tap
don't invoke internal Homebrew method `Homebrew.install_tap`
2014-12-17 18:41:22 -05:00
Roland Walker 04dddb8e03 Merge pull request #8189 from rolandwalker/port_homebrew_prettylisting
port PrettyListing class from Homebrew-fork
2014-12-17 18:41:13 -05:00
Roland Walker 13159089dd remove `debrew.rb` from homebrew-fork 2014-12-17 10:09:57 -05:00
Roland Walker 4623e160a3 remove install_renamed.rb from homebrew-fork
unused
2014-12-17 10:05:09 -05:00
Roland Walker d05713050e remove `patch.rb` from homebrew-fork 2014-12-17 10:00:38 -05:00
Roland Walker 113ebce063 remove homebrew-fork `tap_migrations.rb` 2014-12-17 09:55:37 -05:00
Roland Walker 2fa0281589 don't invoke method `Homebrew.install_tap`
* invoke `brew` executable for the equivalent action
* remove `cmd/tap.rb` from homebrew-fork
2014-12-17 09:48:20 -05:00
ndr d923178f6f Merge pull request #8190 from rolandwalker/no_check_overrides
`sha256 :no_check` overrides `version <string>`
2014-12-17 13:38:52 +00:00
Roland Walker 1413bea1c0 `sha256 :no_check` overrides `version <string>`
This behavior was traditionally present, and is now recovered
by removing the audit test added in #4743.  The doc is clarified
but did not require major change.

closes: #6356
refs: #8179
2014-12-17 08:21:51 -05:00
Roland Walker 68f1c782a6 port PrettyListing class from Homebrew-fork
and simplify it considerably
2014-12-17 07:33:06 -05:00
Roland Walker cb8f255655 rm from homebrew-fork everything re: bottles 2014-12-17 06:39:16 -05:00
Roland Walker ae133faf2f Merge pull request #8152 from rolandwalker/ruby_2_0_transition
remove docs and code relevant to Ruby 1.8 compatibility
2014-12-16 21:18:10 -05:00
Roland Walker 47778e2d59 Merge pull request #8158 from rolandwalker/remove_homebrew_deps_reqs
strip from homebrew-fork: dependencies and reqs
2014-12-16 20:33:46 -05:00
ndr 78b8d01592 Merge pull request #8156 from rolandwalker/rename_gpg_file
rename `gpg.rb` to `gpg_check.rb` to match class name
2014-12-16 17:38:24 +00:00
Roland Walker 50294ef0ce cut v0.51.1 2014-12-16 10:15:50 -05:00
Roland Walker a908043bf5 strip from homebrew-fork: dependencies and reqs
Remove everything from homebrew-fork related to dependencies
and requirements.
2014-12-16 09:56:51 -05:00
Roland Walker b6fafef797 rename gpg.rb to gpg_check.rb to match class name 2014-12-16 09:30:18 -05:00
Roland Walker 52c322dbb9 rm Homebrew internal method in `Cask::CLI::Update`
fixes #8153
2014-12-16 09:26:39 -05:00
Roland Walker 6c41fe493b remove docs and code relevant to Ruby 1.8 compat 2014-12-16 08:50:33 -05:00
Roland Walker 86556d4a59 cut v0.51.0 2014-12-16 08:15:31 -05:00
Roland Walker 1a238777ee Merge pull request #8089 from rolandwalker/homebrew_separation
Separate the Ruby backend from Homebrew + Require Ruby 2.x
2014-12-16 07:51:37 -05:00
Roland Walker ba12a2aaaa replace brew-cask.rb subcommand with bash shim
The `brew-cask` shim finds and executes `lib/brew-cask-cmd.rb`,
but only if Ruby 2.0+ is found.
2014-12-16 07:23:57 -05:00
Roland Walker d882b23d5f Merge pull request #8129 from rolandwalker/remove_license_abandoned
remove undocumented `license :abandoned`
2014-12-15 17:27:30 -05:00
Roland Walker af363f1280 remove undocumented `license :abandoned` 2014-12-15 07:33:33 -05:00
Radek Simko 8d0bd3b286 Explicit conversion Pathname -> String added 2014-12-14 19:53:52 +01:00
Roland Walker 974e11f639 delete undocumented `license :trial`
per discussion in #8084
2014-12-13 13:52:21 -05:00
Roland Walker 9868944de5 check in a somewhat stripped fork of Homebrew
under lib/homebrew-fork
2014-12-13 13:07:12 -05:00
Claudia e3c617b6f4 When handling errors or missing methods, the CLI now suggests updating
This helps cut trivial issues that would be easily fixable by doing `brew update && …`.
2014-12-12 19:50:19 +01:00
Sébastien Gross 8ca2b12e92 Add `:bsexec` option to `command.run`
* Similar to `:sudo`, gives the ability to run an external command
  within a given context.
* Exposes `:bsexec` in DSL; not yet documented
* Fixes #7132 (mount dmg image fails if user does not have StartupItemContext(8))
2014-12-12 11:38:41 -05:00
Roland Walker d96c17b9db enable `license :freemium` 2014-12-11 09:42:24 -05:00
Roland Walker bf99c6b0a3 Store metadata with installed Casks.
Step 2: Snapshot the Cask file used at install-time, using
the previously-merged metadata directory support.

Using a simple filesystem-is-a-database approach, we set up a
`.metadata` directory for each installed Cask in which we can
record any information, starting with a copy of the Cask
definition which was used at install-time.

This should be useful for various cases such as:
- a fallback when the Cask was renamed/removed.  We
  currently cannot recover any uninstall info in that
  scenario
- installation of multiple versions of the same software

There might be a smarter way to discover the source filename
for the Cask through introspection or some deep Ruby voodoo.
All I could come up with was to pass the filename in on the
constructor, which seems perfectly reasonable if voodoo is
not available.  The existing code was taking the title as an
argument to the constructor, which is dispensable.

This PR contains no code to actually make use of the metadata,
but only takes care of the relevant book-keeping: creation,
destruction, as well as organization of metadata according to
software version number and timestamp.
2014-12-10 18:24:43 -05:00
Roland Walker e5d4765135 Merge pull request #7933 from rolandwalker/comment_unknown_license
mark `license :unknown` with explicit todo comment
2014-12-10 08:42:18 -05:00
Roland Walker 2c3119da03 cut v0.50.0 2014-12-09 19:56:19 -05:00
Roland Walker 542fd838e6 Merge pull request #7958 from rolandwalker/return_path_from_fetch
return tarball_path from fetch method
2014-12-09 19:15:04 -05:00
Roland Walker 93b348b480 Merge pull request #7936 from rolandwalker/macos_release_alias
add `MacOS.release` alias for `MacOS.version`
2014-12-09 18:49:59 -05:00
Roland Walker dc30c6fb90 Merge pull request #7940 from rolandwalker/postflight_user_errors
sanity checks and error handling in postflight mini-DSL
2014-12-09 18:49:38 -05:00
Roland Walker 6ef309aff0 return tarball_path from fetch method
fixes #7946
2014-12-09 18:43:24 -05:00
Roland Walker 2e2023b88b Be more consistent/liberal about stanza accessors.
Return the current value whenever the stanza method is called
without arguments, including when the stanza has no value.  Do
not attempt to construct an instance with no arguments (which
typically throws an exception).

Incidental comment re: depends_on

Refs #7880
2014-12-09 11:16:48 -05:00
Roland Walker a808befdd6 sanity checks/error handling, postflight miniDSL
report errors in all user-facing methods
2014-12-09 10:49:03 -05:00
Roland Walker b3836f581d recast info_plist as info_plist_file 2014-12-09 10:47:23 -05:00
Roland Walker 6da48b07a3 add `MacOS.release` alias for `MacOS.version`
* to match phrasing in our documentation
* to distinguish against the Cask `version` (of which there may
  be more than one in the future)
* better fit with symbolic release names eg `:yosemite`
* `MacOS.release` itself is intentionally undocumented pending
  the next code release
2014-12-09 08:45:37 -05:00
Roland Walker 568a8229c3 mark license :unknown with explicit todo comment 2014-12-09 07:48:45 -05:00
Roland Walker 65a71e75eb remove `assistive_devices` `caveats` method
backward-compat, replaced by toplevel `accessibility_access`
2014-12-08 19:26:13 -05:00
Roland Walker 972883e6c2 Merge pull request #7898 from rolandwalker/internal_stanza_installer
enable `installer` artifact in `_stanza` verb
2014-12-08 19:24:47 -05:00
Roland Walker 82826b2687 DSL: add `accessibility_access` stanza
* accepts a Boolean value
* replaces the never-documented `postflight` methods `enable_accessibility_access` /
 `disable_accessibility_access` (`remove_accessibility_access`)
* declarative: unlike the `postflight` approach, does not have to be
  invoked in two places
* de-document obsolete form `caveats` / `assistive_devices`
* bump Travis seed to avoid false test failures
2014-12-08 19:17:19 -05:00
Roland Walker 00217148ef enable `installer` artifact in `_stanza` verb
Since `installer` is a type of artifact, it must be listed
explicitly, though this repetition indicates poor design.
2014-12-08 10:39:15 -05:00
Roland Walker 2e71e5110d remove newlines from runtime bundle IDs
* create `staged_test.rb` for testing staged Casks
* test an actual staged Cask rather than mocking
2014-12-08 10:32:18 -05:00
Roland Walker 98fa063277 Merge pull request #7895 from claui/fix-system-command-exit-status
In `SystemCommand`, fix `success?` and `exit_status`
2014-12-08 10:31:06 -05:00
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
Roland Walker 4d3d254a30 comment wording 2014-11-21 09:25:46 -05:00
Roland Walker ccf2f34b6c comment spelling 2014-11-21 09:24:42 -05:00
Roland Walker e1c773e8d8 cut v0.48.0 2014-11-20 07:55:15 -05:00
Roland Walker 80dd4caf8a Merge pull request #7450 from rolandwalker/remove_old_header_support
DSL Remove support for old-style header lines
2014-11-20 06:51:10 -05:00
Roland Walker 545fce9b1c DSL: remove support for `nested_container`
Obsoleted by new form `container :nested`.

This PR only removes DSL support; the job is incomplete.
Internally, `container :nested` is still implemented as a
pseudo-artifact named `nested_container`.  The intention
is to factor nested containers out of artifacts.
2014-11-19 11:08:06 -05:00
Roland Walker 6c53607967 require new-style header lines
and enforce that the cask name (per the header) must match
the filename
2014-11-19 10:57:39 -05:00
Roland Walker b02c921812 Merge pull request #7428 from rolandwalker/remove_caveats_manual_installer
DSL: remove `manual_installer` from `caveats` mini-DSL
2014-11-18 19:48:23 -05:00
Roland Walker c15fdadb8f Merge pull request #7429 from rolandwalker/remove_container_type
DSL: remove support for `container_type`
2014-11-18 19:48:12 -05:00
Roland Walker 1f24c7e8f2 Merge pull request #7430 from rolandwalker/new_header_test_casks
remove old-style header line from test Casks
2014-11-18 19:48:05 -05:00
Roland Walker 2692b5cd8d remove old-style header line from test Casks
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.
2014-11-18 09:09:01 -05:00
ndr 99296395d2 Merge pull request #7426 from rolandwalker/activate_suite
activate `suite` artifacts
2014-11-18 13:51:22 +00:00
Roland Walker e31264de00 DSL: remove support for `container_type`
obsoleted by new form `container :type`
2014-11-18 08:12:05 -05:00
Roland Walker 2fcf5b4b95 DSL: remove `manual_installer` from `caveats`
obsoleted by new form `installer :manual`.

Also remove missed obsolete documentation item.
2014-11-18 07:54:55 -05:00
ndr a21dbc85aa Merge pull request #7365 from rolandwalker/add_stage_only
DSL: add stanza `stage_only` (new spelling of `caskroom_only`)
2014-11-18 12:27:54 +00:00
Roland Walker 88b2e92015 DSL: add stanza `stage_only` (new `caskroom_only`)
`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.
2014-11-18 07:13:15 -05:00
Roland Walker ca93a872f1 activate `suite` artifacts
fixes #7382
2014-11-18 07:11:02 -05:00
Roland Walker f6079da815 Merge pull request #7401 from rolandwalker/remove_depends_on
DSL: remove support for `depends_on_formula`
2014-11-18 05:15:01 -05:00
Roland Walker d2132ac520 DSL: remove support for `depends_on_formula`
obsoleted by `depends_on :formula`
2014-11-17 11:16:08 -05:00
Roland Walker 562a985595 tighten sourceforge URL regular expressions 2014-11-17 10:06:24 -05:00
Roland Walker e43a59defb add sourceforge URL special case for excalibur
fixes #7373
2014-11-17 10:06:01 -05:00
ndr 69df51414a Merge pull request #7367 from rolandwalker/remove_uninstall_files
DSL remove support for old form `uninstall :files`
2014-11-16 11:07:36 +00:00
Roland Walker 4991f655c6 comment typo 2014-11-15 12:27:11 -05:00
Roland Walker 65c81d2752 DSL remove support for `uninstall :files` 2014-11-15 12:19:55 -05:00
Roland Walker fbc9e35556 DSL remove support for `after_install` and friends
in favor of new-style `preflight`/`postflight` forms
2014-11-14 11:06:01 -05:00
Roland Walker 113a667fcc flag backward-compatibility todo 2014-11-13 11:45:47 -05:00
Roland Walker 00747614f7 use new header form in `create` template 2014-11-13 11:45:06 -05:00
Roland Walker 3262c5a5e5 cut v0.47.0 2014-11-12 11:42:54 -05:00
Federico Bond da0412bd71 Remove unsupported -x option in launchctl command 2014-11-12 11:28:45 -05:00
Roland Walker 09ecd1eb79 DSL: remove support `install` stanza
now replaced by `pkg`
2014-11-11 11:23:51 -05:00
Federico Bond 75ee4ef812 Add key option to suppress_move_to_applications 2014-11-02 00:26:49 -03:00
Roland Walker b837d6c552 remove support for `link` artifact
* `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
2014-10-29 10:53:49 -04:00
Roland Walker 839ccb98d4 recast _checklinks verb as _checkurl
remove stray doc item missed in #6966
2014-10-28 12:12:10 -04:00
Roland Walker f7258c0e1b cut v0.46.0 2014-10-25 12:15:38 -04:00
Roland Walker 3f5551788c Merge pull request #6966 from rolandwalker/checklinks_internal
recast `checklinks` as internal command `_checklinks`
2014-10-25 06:44:36 -04:00
Roland Walker d70fdb20a4 Merge pull request #6965 from rolandwalker/url_corner_cases
better handling for invalid `url` stanzas
2014-10-24 21:40:56 -04:00
Roland Walker 431d00ebbb Merge pull request #6967 from rolandwalker/dump_tweak
improve error message in `brew cask _dump`
2014-10-24 21:40:48 -04:00
Roland Walker 66f2b722bb Merge pull request #6823 from ffleming/downgrade-error
Downgrade CaskAlreadyInstalledError to a warning
2014-10-24 11:40:23 -04:00
Roland Walker 6b69564066 improve error message in `brew cask _dump` 2014-10-24 09:51:23 -04:00
Roland Walker 2370400207 chg `checklinks` to internal command `_checklinks`
* `checklinks` is a very simple implementation useful only for development purposes
* it has no test coverage, only one line of documentation
* users regularly experiment with it and break it, especially
 `brew cask checklinks` with no arguments, which tests all Tapped Casks
2014-10-24 09:49:35 -04:00
Roland Walker db0b5aa9d9 better handling for invalid `url` stanzas 2014-10-24 09:36:11 -04:00
Roland Walker 66e2e05d34 Merge pull request #6947 from rolandwalker/chflags_permissions
Handle permissions corner cases on uninstall
2014-10-24 05:19:38 -04:00
Roland Walker aa4b112a90 Handle permissions corner cases on uninstall
* unset BSD file flags if present
* attempt ownership change if permissions changes fail

fixes #6699
fixes #6752
2014-10-23 12:07:05 -04:00
Roland Walker 03350791c6 be more explicit about which errors are rescued 2014-10-23 11:57:47 -04:00
Roland Walker cd63241558 use "staged" instead of "installed" for Caskroom
refs: #6783
2014-10-21 07:13:04 -04:00
Forrest Fleming f3611f4383 Downgrade CaskAlreadyInstalledError to a warning
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
2014-10-19 15:35:09 -07:00
Roland Walker 967aa22793 recast method `destination_path` as `staged_path`
* 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
2014-10-18 12:23:36 -04:00
Roland Walker b76d0fbb4f cut v0.45.0 2014-10-17 09:10:11 -04:00
Roland Walker 633a2ef0f1 Merge pull request #6660 from rolandwalker/installer_stanza
DSL: add `installer` stanza
2014-10-15 22:58:28 -04:00
Roland Walker 012a9f5a7b document `appcast` stanza
The :latest_version key stays undocumented, as it is not
clear yet whether it is useful
2014-10-15 09:28:29 -04:00
Roland Walker 42770516f7 dsl: add `installer :manual`
a toplevel artifact, intended to replace `manual_installer`,
which is currently implemented within the `caveats` mini-DSL
2014-10-14 11:34:44 -04:00
Roland Walker 68fdb25129 recast install_script to installer :script
* document installer :script.  install_script was never documented
2014-10-14 11:34:32 -04:00
Roland Walker 37136710d2 Recast Cask::DSL::Installed as Cask::Staged
Change namespace for clarity, as we already have Cask::Installer,
and are about to add Cask::DSL::Installer.

Move to parent because these methods are not DSL-specific.
2014-10-14 11:34:02 -04:00
Roland Walker 4ec22f2b7a require Cask argument to `brew cask _dump` 2014-10-14 04:36:20 -04:00
Roland Walker 1a8884753e sanity check against deleting user files
Needed to reduce danger from typos in "zap" stanzas.

As noted in the comments, this is somewhat simplistic, and
should later be merged with similar logic in lib/cask/pkg.rb.
2014-10-11 12:07:31 -04:00
Roland Walker d2f041d9d4 coerce `uninstall :script :input` value to array 2014-10-10 09:04:32 -04:00
Roland Walker 41cf7d96f0 docs and tests for new form `container :nested` 2014-10-09 11:34:37 -04:00
Roland Walker 707db75505 standardize Cask (capitalized) when used as noun
* 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
2014-10-08 10:39:51 -04:00
Roland Walker 096a13ed73 cut v0.44.0 2014-10-07 08:52:49 -04:00
ndr 69c2aa91e8 Merge pull request #6360 from ndr-qef/dsl/validate-gpg-key
DSL: validate value of GPG key ID
2014-10-06 23:10:30 +01:00
Roland Walker 4f671ad177 Merge pull request #6491 from claui/issue-5997
User-friendly error messages for invalid options/arguments; fixes #5997
2014-10-06 11:15:59 -04:00
Roland Walker 32e5b80c2f Merge pull request #6478 from rolandwalker/doctor_caskroom
print caskroom location in `brew cask doctor`
2014-10-06 06:19:18 -04:00
Claudia 0fe558b927 User-friendly error messages for invalid options/arguments; fixes #5997
- Show a more user-friendly error message when dealing with an option whose (mandatory) argument is missing.

- Likewise, we show a more user-friendly error message when a given option is ambiguous. Examples:
    - Given `-f`, the parser successfully expands to `--fontdir`.

    - Given `-c`, we fail to expand because the parser can’t tell if the user means `--caskroom` or rather `--colorpickerdir`. This exception now results in a nicer error message.

- Some commands now result in a consistent error message when a required cask name is missing.
This affects all stable commands which require one or more cask names as arguments, i. e. `cat`, `create`, `edit`, `fetch`, `info`, `install`, `uninstall`, and `zap`.

- Up to now, the commands `cat`, `create`, `edit`, and `info` used to treat any unknown option as a cask name. This commit changes that behaviour to make it consistent to the rest of the commands (like `fetch`, `install`, `uninstall`, and `zap`), who have silently discarded any unknown option in the past, and continue to do so.
2014-10-05 18:32:33 +02:00
ndr 3c060f366e Merge pull request #6487 from alexcruice/caveats-dsl-tiger-support
Fix caveats os_version_only Tiger support
2014-10-05 18:00:07 +02:00
Alex Cruice fad43d9976 Fix caveats os_version_only Tiger support 2014-10-05 23:11:32 +10:00
ndr 975d2518b0 Validate value of GPG :key_id
The value of `:key_id` must be an hexadecimal string of length 8, 16,
or 40.
2014-10-05 12:47:40 +02:00
Roland Walker f86ea4c7a4 show staging directory (caskroom) in doctor
refs #6471
2014-10-04 08:24:21 -04:00
Roland Walker 1f18a74056 comment/todo re: directory creation 2014-10-04 08:23:28 -04:00
Roland Walker e3f10f82b8 doc and tests for `container :type`
includes some minor tweaks/re-ordering in docs
2014-10-03 10:40:54 -04:00
Roland Walker a12698efa2 comments in download_strategy.rb 2014-10-03 10:13:31 -04:00
Roland Walker a98af14abe Merge pull request #6433 from jconley/kextunload
fix params for kextunload
2014-10-02 11:03:38 -04:00
Johnathan Conley 203dae5e60 fix params for kextunload 2014-10-01 12:39:38 -05:00
Roland Walker f1604e4efb docs and create template for new license stanza
some :closed licenses in the code are left undocumented for
now, and should not be used.
2014-10-01 11:18:13 -04:00
ndr 7aa73f00cd Introduce GPG operations
Add methods for cryptographic authentication of Cask packages with
the GPG software suite.

Homebrew Cask invokes the system-standard `gpg` binary to import
keys to the GPG keychain, download signatures to versioned metadata
folders, and verify packages. Homebrew Cask aborts if any step fails.

GPG verification is not currently invoked during the audit or
installation processes, and is intentionally left undocumented.

Example usage:
    gpg = Cask::GpgCheck.new(cask)
    gpg.verify(package_archive_path) if gpg.available
2014-09-30 17:49:10 +02:00
Roland Walker 4b6f5c7695 cut v0.43.1 2014-09-30 10:53:46 -04:00
Roland Walker 5b3068d1e7 return string in `Cask::LinkChecker` 2014-09-30 10:17:35 -04:00
Roland Walker 7986b0dbaf hide stderr messages from `ditto` against DMG 2014-09-30 10:16:58 -04:00
Roland Walker 077a8514fe cut v0.43.0 2014-09-27 13:18:00 -04:00
Roland Walker b8452a9d60 Merge pull request #6357 from rolandwalker/tweak_license_types
update valid license values
2014-09-27 12:57:08 -04:00
Roland Walker f36d8e5aea update valid license values
* change :free (closed-source) to :gratis for clarity
* add :freemium (eg Alfred)
* add :lppl (LaTeX)
* change :ubuntu to :ubuntu_font
2014-09-27 11:47:33 -04:00
Roland Walker 1abf0b99a9 Merge pull request #6329 from rolandwalker/system_command_refactor
refactor Cask::SystemCommand
2014-09-27 09:59:59 -04:00
Roland Walker 0e7be245be Return Cask::SystemCommand::Result object
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
2014-09-27 08:59:08 -04:00
Roland Walker 6d622ed281 make `install_script` stanza more robust
* correctly (and leniently) parse values
* add test
2014-09-25 11:04:38 -04:00
Roland Walker 41d9fc363c switch to %Q{} for complex quoting 2014-09-25 09:38:22 -04:00
Roland Walker bb72723325 remove :print_stdout => false
this is the default, and need not be specified
2014-09-25 09:36:13 -04:00
Roland Walker 100285702b recast :print => true as :print_stdout => true
in Cask::SystemCommand
2014-09-25 09:31:05 -04:00
Roland Walker 49e6e6eb10 refactor :stderr => :silence
replace with :print_stderr => false

The double test on options[:print_stderr] in system_command.rb
is intentional, and temporary.
2014-09-25 09:23:27 -04:00
Roland Walker 568365194d Merge pull request #6227 from rolandwalker/doc_uninstall_delete
doc/tests switchover to `uninstall :delete`
2014-09-18 06:25:59 -04:00
Roland Walker 0b4ad8714b doc/tests switchover to `uninstall :delete`
from `uninstall :files`
2014-09-17 10:41:10 -04:00
Roland Walker 28217a5b77 cut v0.42.0 2014-09-17 09:45:32 -04:00
Roland Walker d9fe7a9c17 Merge pull request #6225 from rolandwalker/add_artifact_stanza
DSL: add `artifact` stanza
2014-09-17 09:35:53 -04:00
Roland Walker f7018e0106 DSL: add `artifact` stanza
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.
2014-09-17 09:09:53 -04:00
Roland Walker 6d82c9770e change docs/tests to use version :latest
Instead of version 'latest' (value as string).  The string
value is still permitted during a transitional period.
2014-09-17 07:22:33 -04:00
Roland Walker fe0a053dad Merge pull request #6208 from rolandwalker/uninstall_force
add `--force` option for `brew cask uninstall`
2014-09-16 19:33:17 -04:00
ndr 3f97e678d1 Merge pull request #6207 from rolandwalker/improve_zap_messages
Improve zap feedback messages
2014-09-16 21:04:06 +02:00
Federico Bond 598a17d0c7 Merge pull request #6206 from rolandwalker/add_version_arg
support `brew cask --version` per `USAGE.md`
2014-09-16 14:58:21 -03:00
Roland Walker d156cbfcb2 add `--force` option for `brew cask uninstall`
also update some related docs for verbs `install` and `uninstall`
2014-09-16 10:59:44 -04:00
Roland Walker fbdcb6ea4c Improve zap feedback messages
In particular, note explicitly when no `zap` stanza is present.
2014-09-16 10:23:51 -04:00
Roland Walker ca8417bf0e support `brew cask --version` per `USAGE.md`
closes #6178
2014-09-16 10:04:47 -04:00
Roland Walker 1ddec7128d add uninstall :rmdir
per discussion at https://github.com/caskroom/homebrew-cask/pull/6174#discussion-diff-17516171
refs: #6174

This PR is large because of some test-suite refactoring.
2014-09-16 09:48:32 -04:00
Roland Walker feca527e78 Merge pull request #6193 from rolandwalker/double_dot_is_relative
protect against inner ".." in uninstall paths
2014-09-16 07:08:35 -04:00
Roland Walker 3ea3d0e0e6 protect against inner ".." in uninstall paths 2014-09-15 11:30:41 -04:00
Roland Walker 5ae6e2f773 doc new `app` stanza and update tests to use it
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.
2014-09-13 13:03:46 -04:00
Roland Walker ce64b38723 Merge pull request #6155 from rolandwalker/add_zap_stanza
functionality and docs for zap stanza and verb
2014-09-13 12:55:57 -04:00
Roland Walker d2ba4fdf4d cut v0.41.1 2014-09-13 12:49:30 -04:00
Roland Walker ce82c00506 Merge pull request #6066 from rolandwalker/alfred_yosemite
fix `brew cask alfred` for Yosemite/Alfred 2.4
2014-09-13 12:43:58 -04:00
Roland Walker 0f664ca78a Fix `brew cask alfred` for Yosemite/Alfred 2.4
Closes #5820
References: #6059
2014-09-13 12:34:12 -04:00
Roland Walker 00921dd513 functionality and docs for zap stanza
* `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`
2014-09-13 10:21:17 -04:00
Roland Walker 6fbf7dce5a fix depends_on :formula backend
closes #6158
2014-09-13 08:04:27 -04:00
Roland Walker dfcbd7154e docs, error msgs, tests for depends_on :formula
replacing depends_on_formula in DSL
2014-09-11 20:33:39 -04:00
ndr c0bc7b44a2 Merge pull request #6117 from rolandwalker/metadata_directories
Metadata directory support
2014-09-11 23:47:00 +02:00
Roland Walker 0574662679 metadata directory support
- incidentally adds defensive driving against null version
  in method `destination_path`
2014-09-11 11:17:52 -04:00
Roland Walker 719bb998ed cut v0.41.0 2014-09-11 10:08:43 -04:00
Roland Walker 65cda1257e new DSL form container :nested => <inner> 2014-09-11 09:26:40 -04:00
Roland Walker 5d77ef0203 Merge pull request #6121 from rolandwalker/doc_dsl_pkg
docs and error messages for new DSL stanza `pkg`
2014-09-10 17:35:20 -04:00
Roland Walker 01cd96b89a Merge pull request #6116 from rolandwalker/doubledash_mkdir
Add doubledash to mkdir command
2014-09-10 17:34:09 -04:00
Roland Walker ab4f52a781 docs and error messages for new DSL stanza `pkg`
transition from `install` to `pkg`
2014-09-10 10:54:06 -04:00
Roland Walker 3b7ce85381 bug: fix container :type => <type>
Copypasta error in #6068 means that container :type
never worked, because it looked for nonexistent container.formula
2014-09-10 09:52:26 -04:00
Roland Walker 0ad22a8990 Add doubledash to mkdir command 2014-09-10 08:17:35 -04:00
Roland Walker 92e15b4a91 cut v0.40.0 2014-09-08 10:28:31 -04:00
Roland Walker 891bff1946 Merge pull request #6071 from rolandwalker/license_ncsa
DSL add NCSA OSS license type
2014-09-08 10:09:45 -04:00
Roland Walker 11e5376090 add NCSA OSS license type
Used for example by LLVM.
2014-09-08 10:06:21 -04:00
Roland Walker b8523e2603 Merge pull request #6068 from rolandwalker/container_dsl
DSL: change container_type to extensible container
2014-09-08 10:04:28 -04:00
Roland Walker ca21928b93 DSL: change container_type to extensible container
Late addition to DSL 1.0 (oversight in the roadmap)

References: #4688
2014-09-08 09:01:46 -04:00
Roland Walker 07158e455b Revise gpg stanza order and parameters
References: #5971
2014-09-01 10:04:17 -04:00
Roland Walker 9711ff8672 re-org more files under lib/cask/dsl 2014-08-27 07:50:38 -04:00
Roland Walker 31b778f702 Merge pull request #5923 from rolandwalker/internet_plugin_artifact
add support for internet_plugin artifact
2014-08-26 15:36:33 -04:00
Federico Bond 26275e2659 Merge pull request #5922 from federicobond/fix-info
Show correct GitHub file for casks with similar names
2014-08-26 13:07:10 -03:00
Roland Walker 1b05d18a3b add support for internet_plugin artifact
closes #5909
2014-08-26 11:22:25 -04:00
Federico Bond b6cc94a8a2 Show correct GitHub file for casks with similar names
Fixes #5915
2014-08-26 11:21:21 -03:00
Federico Bond 4724c32955 Reload QuickLook on plugin uninstall 2014-08-25 14:49:25 -03:00
Roland Walker 45a1b734d7 move tags.rb to dsl/tags.rb 2014-08-23 12:30:59 -04:00
Federico Bond 4fe1bd76d4 Add support for long format in list command 2014-08-20 18:07:39 -03:00
Federico Bond 1b1a7fde17 Merge pull request #5806 from federicobond/conditional-caveats
Avoid printing Caveats title when output is empty
2014-08-19 10:04:43 -03:00
Federico Bond ab4c5b13e5 Avoid printing Caveats title when output is empty
Closes #4878
2014-08-16 23:09:24 -03:00
Roland Walker 7c9c76c877 Merge pull request #5769 from federicobond/remove-decorator
Remove Cask::Decorator
2014-08-16 12:04:21 -04:00
Roland Walker 4e37017752 Merge pull request #5790 from federicobond/fix-cask-loading
Fix cask loading behavior
2014-08-15 17:06:19 -04:00
Federico Bond 950bc054bd Fix cask loading behavior. Refs #5769 2014-08-15 13:57:43 -03:00
Federico Bond ff0a5c10e3 Remove Cask::Decorator 2014-08-15 13:00:52 -03:00
Roland Walker 99e75bddfd cut v0.39.3 2014-08-13 07:47:41 -04:00
Roland Walker b58f2b2da2 Merge pull request #5754 from federicobond/fix-checklinks
Fix Error in checklinks
2014-08-12 16:53:56 -04:00
Federico Bond 2b2f60921c Fix Error in checklinks. Closes #5752 2014-08-12 17:05:00 -03:00
Roland Walker b65c4963ea cut v0.39.2 2014-08-12 08:17:12 -04:00
Roland Walker e86e94f6d3 cut v0.39.1 2014-08-12 07:36:38 -04:00
Federico Bond 19084bce63 Add uninstall_phase method to CaskroomOnly artifact 2014-08-11 23:07:36 -03:00
Federico Bond ef7190589c Merge pull request #5723 from federicobond/postflight-dsl
Add DSL for after_install and similar blocks
2014-08-11 22:07:36 -03:00
Federico Bond 3cb833c89e Add DSL for after_install and similar blocks 2014-08-11 21:41:06 -03:00