Commit Graph

521 Commits

Author SHA1 Message Date
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 000e251638 add missing test coverage for `suite` artifact
refs: #7382
2014-11-18 10:01:06 -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
Roland Walker e31264de00 DSL: remove support for `container_type`
obsoleted by new form `container :type`
2014-11-18 08:12:05 -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 d2132ac520 DSL: remove support for `depends_on_formula`
obsoleted by `depends_on :formula`
2014-11-17 11:16:08 -05:00
Roland Walker 00747614f7 use new header form in `create` template 2014-11-13 11:45:06 -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 4d46f26447 recast tests to refer to "app" instead of "link"
and "activate" instead of "link" as a verb, in messages,
test names, comments, variable names.

No functional change.
2014-10-29 10:49:58 -04:00
Roland Walker 5a1d637cc5 say "URL" instead of "link" in tests 2014-10-28 12:12:10 -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 66f2b722bb Merge pull request #6823 from ffleming/downgrade-error
Downgrade CaskAlreadyInstalledError to a warning
2014-10-24 11:40:23 -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 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 f3a3404648 use path_environment_variable for caveats test
instead of manual_installer
2014-10-14 11:34:25 -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
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
Claudia 8076322c02 Bring the repo test back in sync with `.gitignore`.
This keeps the tests from failing, e. g. when developers use `rbenv` to run the 1.8-based tests.
2014-10-05 21:24:57 +02:00
Claudia baddaf5fd2 Rewrite tests to make them work with Ruby 1.8 2014-10-05 20:15:12 +02:00
Claudia ec2fdc3f51 Add tests for #5997 2014-10-05 19:52:41 +02:00
ndr 6ca2d9e1ee Test for invalid GPG key IDs 2014-10-05 12:57:34 +02:00
ndr 04697a75fe Update GPG tests to use valid key IDs 2014-10-05 12:54:37 +02:00
Roland Walker e3d009989f reformat test Casks to match layout conventions
in case a contributor uses a test Cask as a template
2014-10-03 17:57:05 -04:00
Roland Walker aedab54e06 Merge pull request #6461 from rolandwalker/test_naming
fix skipped test file + doc
2014-10-03 16:56:41 -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 0b030cdc0c fix skipped test file + doc 2014-10-03 09:51:43 -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
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 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 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 fe0a053dad Merge pull request #6208 from rolandwalker/uninstall_force
add `--force` option for `brew cask uninstall`
2014-09-16 19:33:17 -04: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 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 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 dfcbd7154e docs, error msgs, tests for depends_on :formula
replacing depends_on_formula in DSL
2014-09-11 20:33:39 -04:00
Roland Walker 4595804e28 Merge pull request #6137 from rolandwalker/dsl_pkg_test_suite
DSL convert last of test suite to `pkg` stanza
2014-09-11 20:22:25 -04: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 4e705cea43 DSL convert last of test suite to `pkg` stanza
instead of `install`
2014-09-11 09:44:45 -04:00
Roland Walker 65cda1257e new DSL form container :nested => <inner> 2014-09-11 09:26:40 -04:00
Roland Walker d6f8aafeda Merge pull request #6115 from rolandwalker/postflight_in_test_suite
update test suite for postflit/preflight DSL forms
2014-09-10 17:34:17 -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 2f303a651a update test suite for postflit/preflight DSL forms 2014-09-10 08:15:59 -04:00
Roland Walker 07158e455b Revise gpg stanza order and parameters
References: #5971
2014-09-01 10:04:17 -04: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
Federico Bond ff0a5c10e3 Remove Cask::Decorator 2014-08-15 13:00:52 -03:00
Federico Bond 3cb833c89e Add DSL for after_install and similar blocks 2014-08-11 21:41:06 -03:00
Roland Walker f2b7d8e59f Merge pull request #5636 from federicobond/suggestion-tests
Re-enable suggestion tests
2014-08-04 14:18:21 -04:00
Federico Bond 39bddf20de Re-enable suggestion tests 2014-08-04 09:30:58 -03:00
Roland Walker 99d001afa4 add support for xar containers
references: #5442
2014-08-02 14:51:51 -04:00
Roland Walker a0785a0cfa create a somewhat better fake `pkg` for tests 2014-08-02 11:04:03 -04:00
Roland Walker 465caffa0d Merge pull request #5569 from rolandwalker/dsl_conflicts_with
DSL: add `conflicts_with` stanza
2014-07-30 10:05:55 -04:00
Roland Walker 44f1a37546 DSL: add `conflicts_with` stanza
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
2014-07-29 18:24:34 -04:00
Roland Walker e795a56850 Delete special files (eg symlinks) from pkg BOMs
`pkgutil --only-files` plus `pkgutil --only-dirs` does not
cover all files in the BOM.

Closes #5491
2014-07-29 07:55:07 -04:00
Roland Walker 35e7997c35 support pure gzip containers (not tar.gz)
References: #5455
2014-07-26 15:58:49 -04:00
Roland Walker ecb66ac567 DSL: add `tags` stanza
only limited/defined keys are permitted
 - :vendor
 - :font_pitch
 - :font_serif
 - :font_weight
 - :font_slant

forward-compatibility: no associated functionality is
provided.  Intentionally left undocumented.

References: #4688
2014-07-02 18:54:13 -04:00
Roland Walker 3932c4d467 Merge pull request #4951 from rolandwalker/add_installer_stanza
DSL: add `install_script` stanza
2014-07-02 18:29:56 -04:00
Roland Walker 0f311784cf DSL tests for `install_script` stanza 2014-07-02 18:06:24 -04:00
Paul Hinze 63a32ef021 rspecify scopes and download strategy tests
refs #5080
2014-06-29 14:56:47 -05:00
Paul Hinze 58d4c745a9 install rspec; move first few tests over
refs #5080
2014-06-29 11:33:22 -05:00
Roland Walker 2c06def3ba Merge pull request #4873 from rolandwalker/add_license_stanza
DSL: add `license` stanza
2014-06-28 10:32:22 -04:00
Roland Walker 99ba340a4d Merge pull request #4896 from rolandwalker/add_depends_on_stanza
DSL: add `depends_on` stanza
2014-06-28 10:19:18 -04:00
Roland Walker b2390ac3d8 Merge pull request #4848 from rolandwalker/add_gpg_stanza
DSL: add `gpg` stanza
2014-06-28 10:18:36 -04:00
Roland Walker cc7db15b5b Merge pull request #4847 from rolandwalker/extend_appcast_stanza
DSL: extend `appcast` stanza
2014-06-28 10:11:49 -04:00
Roland Walker 52152016c2 Merge pull request #4865 from rolandwalker/allow_all_uninstall
DSL: allow all Casks to use `uninstall` stanzas
2014-06-28 10:09:19 -04:00
Roland Walker d2e302afbb Add `license` stanza to DSL
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.
2014-06-26 09:13:56 -04:00
Roland Walker 200770c446 Add a syntax test to help support multiple Rubies
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.
2014-06-23 14:50:48 -04:00
Roland Walker ddb9322882 Merge pull request #5011 from rolandwalker/internal_command_dump
create "internal use" command verbs: _dump, _help
2014-06-21 10:46:14 -04:00
Vladimír Kriška 71f3a0d968 Show file contents instead of commits 2014-06-21 01:19:07 +02:00
Roland Walker de1858d905 conform all command verbs to a Class (not Module) 2014-06-20 15:06:29 -04:00
Roland Walker d9861a6aaf minor updates to ignores
implemented in both `.gitignore` and `layout_test.rb`
2014-06-19 17:35:02 -04:00
Roland Walker 5f6bfcb92d Merge pull request #4986 from rolandwalker/ignore_dot_bundle
ignore a toplevel .bundle directory
2014-06-19 17:14:13 -04:00
Roland Walker d811b3b32e Add `depends_on` stanza to DSL.
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
2014-06-19 15:58:21 -04:00
Roland Walker f65d422b82 refactor `brew cask cleanup`
Divide into more tractable methods. No functional change.

Change apparent typo in test regular expression
2014-06-19 14:25:56 -04:00
Roland Walker 182811676b tests for `appcast` stanza 2014-06-19 12:06:43 -04:00
Roland Walker 3a1fdd80e4 refactor dsl_test.rb into named sections 2014-06-19 12:06:43 -04:00
Roland Walker 2b23710f2e ignore a toplevel .bundle directory 2014-06-19 10:39:34 -04:00
Roland Walker 62fff58f48 define global `shutup` method (temporary)
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.
2014-06-19 10:06:55 -04:00
Roland Walker 04a84b5bef disable minitest-colorize
solves this error:
```bash
$ bundle exec rake test
...lib/minitest/colorize.rb:88:in `<top (required)>': undefined method `output=' for Minitest::Unit:Class (NoMethodError)
...
```
2014-06-19 10:04:04 -04:00
Roland Walker ed5ea5ed4c recast install/uninstall methods: `install_phase`
and `uninstall_phase`, to improve clarity, now that we have an
independent `uninstall` artifact.
2014-06-18 20:22:24 -04:00
Roland Walker 3bd2e2a3f5 promote `:uninstall` to an independent artifact
- 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`
2014-06-18 20:22:24 -04:00
Roland Walker 33f8cc431a add `gpg` stanza to DSL
For forward compatibility.  The stanza has no effect, and is
intentionally left undocumented at this time.

References: #4688
2014-06-18 19:59:54 -04:00
Roland Walker 2ffee346df standardize the recommended upgrade command
in both docs and error messages.

Recent bug reports indicate that `cleanup` commands are essential
in some situations.
2014-06-18 15:15:50 -04:00
Roland Walker 1c72aa0c64 Merge pull request #4948 from rolandwalker/test_repo_layout
add tests for expected layout of files in repo
2014-06-18 09:46:01 -04:00
Roland Walker ad4989416a add tests for expected layout of files in repo
References: #4914
2014-06-17 09:06:43 -04:00
Roland Walker 3cb729095d suggested (not enforced) order for Cask stanzas
References: #4914
2014-06-16 13:32:08 -04:00
Roland Walker 4f3ecb1cc3 Downgrade Cask install errors to warnings
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.
2014-06-10 12:13:59 -04:00
Roland Walker d8ad14aaa5 Merge pull request #4757 from rolandwalker/https_in_create
prompt for HTTPS URLs in `brew cask create`
2014-06-07 15:35:45 -04:00
Roland Walker 154eb2b12f prompt for HTTPS URLs in `brew cask create` 2014-06-07 14:36:35 -04:00
Roland Walker f0ea05316d Merge pull request #4743 from NanoXD/add_versioned_cask_with_no_checksum_test
Add audit for versioned casks with no checksum
2014-06-07 13:51:11 -04:00
Roland Walker cf89f7f7e8 regularize whitespace 2014-06-07 11:43:40 -04:00
Fernando Paredes a4d479c3c4 Add audit for versioned casks with no checksum
* Check if version is not latest and has a sha256 :no_check for checksum
2014-06-06 21:22:19 -07:00
Fernando Paredes b767f9f1e6 Add OS X 10.10 as a known OS version
* In Yosemite the tests failed for being unknown
2014-06-06 10:56:41 -07:00
Roland Walker 0ef4606e0c retire support for `no_checksum` stanza 2014-06-04 23:26:09 -04:00
Roland Walker abd66acba1 Merge pull request #4370 from rolandwalker/uninstall_signal
add `:signal` directive for `uninstall`
2014-05-14 06:26:49 -04:00
Roland Walker 6815ef272e don't use doubledash on launchctl remove
it appears to be incorrect here: removal of jobs is hindered
2014-05-13 18:52:35 -04:00
Roland Walker b38d6a6977 add `:signal` directive for `uninstall`
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.
2014-05-13 13:04:10 -04:00
Roland Walker cfc6ae7a13 Merge pull request #4264 from rolandwalker/retire_sha1
Retire support for `sha1` stanza.
2014-05-08 18:37:00 -04:00
Roland Walker 25c7ee5962 Re-enable failing "search" test
This test used to selectively fail only on Travis.  The problem
was never isolated.  However, it was apparently recently fixed,
probably in #4042.
2014-05-08 16:05:35 -04:00
Roland Walker 34df5309d4 Retire support for `sha1` stanza.
We haven't received new submissions using `sha1` for quite
some time.
2014-05-08 12:01:32 -04:00
Roland Walker c436ddc5fd transition docs/tests/messages to sha256 :no_check
`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)
2014-05-08 08:42:44 -04:00
Roland Walker 4f82dda065 Merge pull request #4242 from rolandwalker/cat_documentation
update docs and messages for `brew cask cat`
2014-05-07 22:34:07 -04:00
Roland Walker e910467b39 update docs and messages for `brew cask cat` 2014-05-07 10:32:15 -04:00
Roland Walker e9f6c196f8 Merge pull request #4229 from rolandwalker/defend_unusual_homebrew
Defend against unusual Homebrew setups
2014-05-07 10:12:58 -04:00
Roland Walker 0153c19f7a Defend against unusual Homebrew setups
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
2014-05-07 09:50:42 -04:00
Lincoln Lee 227ac512bc Add `brew cask cat` command mentioned in #4018 2014-05-05 22:46:28 +08:00
Paul Hinze f54eaf7082 update all references to new caskroom org home
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!
2014-05-03 10:29:17 -05:00
Roland Walker 400433be20 Adapt to homebrew's move of the tap directory
Closes #4035. Closes #4029. Closes #4026.
2014-04-26 09:42:16 -04:00
Roland Walker 5bc2b62b25 Merge pull request #3667 from rolandwalker/artifacts_in_info
display artifact summary in `brew cask info`
2014-03-28 09:33:23 -04:00
Roland Walker 5c8640d6fe Merge pull request #2706 from rolandwalker/install_suggest
suggest replacements on "brew cask install" fail
2014-03-27 08:51:13 -04:00
Roland Walker 421eafaec8 display artifact summary in `brew cask info`
Per discussion with @drew-gross in closed issue #3280.
Limitation: does not show link targets.
2014-03-26 08:55:58 -04:00
Roland Walker be255dcdbc Merge pull request #3515 from rolandwalker/unload_service
explicitly unload :launchctl service before remove
2014-03-14 21:12:14 -04:00
Roland Walker 815168546a update test suite to use sha256
also convert no_checksum to sha256 :no_check in some cases
2014-03-14 09:24:53 -04:00
Roland Walker ba8473a766 explicitly unload :launchctl service before remove 2014-03-14 08:41:18 -04:00
Roland Walker a8acf3de1a bugfix: preserve resource forks when unzipping
Use the unarchiving ability built into the `ditto` utility,
rather explicitly calling the `unzip` utility.  Fixes
caskroom/homebrew-fonts#90.
2014-03-11 08:46:38 -04:00
Pedro Silva e58f3f89ca add new CurlPostDownloadStrategy
- 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
2014-03-07 20:51:35 +01:00
Roland Walker 726a650ebd Merge pull request #3106 from rolandwalker/emojii
Emoji and disk usage stats at install success
2014-03-06 21:40:37 -05:00
Roland Walker c95a7f2534 suggest replacements on "brew cask install" fail 2014-03-01 15:04:12 -05:00
Roland Walker 17be66076d remove constant HOMEBREW_TAP_FORMULA_REGEX
we no longer need to set this, as Homebrew added it to
testing_env.rb
2014-03-01 11:42:49 -05:00
Roland Walker c805b2b328 provide fallback setting for homebrew_path
this cannot hurt, and fixed a local problem
2014-03-01 11:40:54 -05:00
Paul Hinze c0f470cd55 Merge pull request #3011 from rolandwalker/force_container_type
ability to specify container type, not detect
2014-02-28 09:23:01 -06:00
Ko-Chih Wu 59e3b183e2 Fix broken `brew cask alfred link`
- 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
2014-02-28 01:00:00 -08:00
Roland Walker 6dd21fbe77 rename intellij-idea-community.rb
to intellij-idea-ce.rb
per naming rules in CONTRIBUTING.md
2014-02-26 09:48:48 -05:00
Roland Walker d5872b20a2 rename intellij-idea-ultimate.rb
to intellij-idea.rb
per naming rules in CONTRIBUTING.md
2014-02-26 08:59:42 -05:00
Roland Walker bf49dc9fa8 ability to specify container type, not detect
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.
2014-02-25 16:39:12 -05:00
Roland Walker c7e0e5b2e5 support Bzip2 containers
bzips of tarballs are already supported via `tar`.  This
adds support for a single file asset within a bzip2 container.
2014-02-25 16:36:36 -05:00
Roland Walker 9fa39c2681 add support for RAR containers
this will not pass Travis until #2744 is merged
2014-02-25 16:29:24 -05:00
Roland Walker 76eab0ad8a Merge pull request #3040 from rolandwalker/stuffit_containers
add support for Stuffit containers
2014-02-25 16:27:16 -05:00
Roland Walker d639889a3a temporary hack to for travis while test is fixed 2014-02-25 13:11:49 -05:00
Roland Walker fe90e266f5 Merge pull request #2705 from rolandwalker/search_exact
Divide search output into sections
2014-02-25 12:59:53 -05:00
Roland Walker b90633d92a add support for Stuffit containers
This will not pass Travis until #2744 is merged
2014-02-25 12:54:49 -05:00
Roland Walker 76602af5cf Merge pull request #2744 from rolandwalker/sevenzip_containers
Add 7z container support
2014-02-25 12:51:21 -05:00
Võ Anh Duy 33a97a1a5f CLI - Fetch
Add `fetch` command to cli like suggestion at the end of #2528
2014-02-26 00:44:22 +07:00
Roland Walker a75a4840cf Add 7z container support
relevant Casks must use `depends_on_formula unar`
2014-02-25 12:32:37 -05:00
Roland Walker cb627e463c Merge pull request #3073 from rolandwalker/add_target_metadata
add extended attributes for `:target` links
2014-02-25 12:30:15 -05:00
Roland Walker a7647426ce Merge pull request #2467 from vmrob/adobe-air-apps
Add support for Adobe Air app container
2014-02-25 12:23:08 -05:00
Roland Walker 2d8e90eb32 rename rest-client.rb
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.
2014-02-25 09:13:54 -05:00
Roland Walker 6f6a07fc0f mass whitespace cleanup 2014-02-22 21:13:52 -05:00
Roland Walker d40195e8d4 Emoji and disk usage stats at install success
- consistent with Homebrew output
- respects Homebrew environment variables
- does not add any Homebrew code dependency
- really just for fun
2014-02-22 18:24:56 -05:00
Roland Walker 605003228f Merge pull request #2931 from rolandwalker/remove_md5
remove md5 checksum support
2014-02-22 15:31:26 -05:00
Roland Walker 3ad2d6c31c create target directories on-demand
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.
2014-02-21 09:22:37 -05:00
Roland Walker 066d58d336 add extended attributes for :target links
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.
2014-02-21 08:49:07 -05:00
Roland Walker 664bcb3c4e caveats DSL os_version_only spelling
change method name to follow documentation
2014-02-19 18:51:45 -05:00
Victor Robertson 026ca0c6e1 Add support for Adobe Air app installations
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.
2014-02-17 11:36:01 -06:00
Roland Walker 16ae31edf3 FakeSystemCommand.run! should follow usual case 2014-02-15 12:21:27 -05:00
Roland Walker e4554a170a force consistent timestamps for SVN downloads
to make checksumming work correctly
2014-02-15 12:04:00 -05:00
Roland Walker b67b2c53f2 make clear that only Alfred 2.x is supported
fixes #2891
2014-02-14 19:39:45 -05:00
Roland Walker 15f437ed7b remove md5 checksum support
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.
2014-02-14 19:15:55 -05:00
Roland Walker 82452b3181 Merge pull request #2822 from rolandwalker/svn_download_strategy
add Cask::SubversionDownloadStrategy
2014-02-14 13:27:13 -05:00
Roland Walker 82b9d30a57 Merge pull request #2742 from rolandwalker/before_install
add `before_install` and `before_uninstall`
2014-02-13 11:19:33 -05:00
Roland Walker 44b49b1ee3 Merge pull request #2890 from rolandwalker/portable_class_undefine
Ruby 1.8.7-compat way to undef test classes
2014-02-13 09:38:52 -05:00
Roland Walker 3b5871db8d Ruby 1.8.7-compat way to undef test classes
add cleanup after each definition
2014-02-13 09:21:47 -05:00
Roland Walker aae522966e Merge pull request #2875 from rolandwalker/caveats_formatting_2
trailing blank lines so caveats don't run together
2014-02-12 18:29:39 -05:00
Roland Walker d12acbdf9d Merge pull request #2739 from rolandwalker/allow_untrusted
add `:allow_untrusted` modifier on `install`
2014-02-12 09:39:45 -05:00
Roland Walker eb7f9eb078 trailing blank lines so caveats don't run together 2014-02-12 09:27:49 -05:00
Roland Walker 18a92caf57 Merge pull request #2392 from rolandwalker/list_managed_links
Show managed links in "brew cask list"
2014-02-12 08:11:44 -05:00
Roland Walker 45ed67c64f add :allow_untrusted modifier on install 2014-02-11 14:40:16 -05:00
Roland Walker 8450a29a6a Show managed links in "brew cask list"
Fixes #2261
2014-02-08 16:26:23 -05:00
Roland Walker d6c8a6917d add command `brew cask cleanup`
plus new option --outdated
2014-02-08 14:40:53 -05:00
Roland Walker b55f1804f0 add Cask::SubversionDownloadStrategy
abstract out module `Cask::DownloadStrategy`, add some commentary
2014-02-08 13:30:21 -05:00
Paul Hinze 1f5cc4e1e8 Merge pull request #2719 from lgarron/sha256
Change the template hash function to SHA-256.
2014-02-08 12:20:33 -06:00
Paul Hinze 9faa44e6cc Merge pull request #1992 from rolandwalker/core_fonts
CAB containers
2014-02-08 12:14:18 -06:00
Roland Walker 65292780aa exit with errorcode 1 when a list error occurs
Fixes #2817.  This is now more consistent with Homebrew's
`list`, though not completely, because Homebrew's `list`
refuses to give any output when there is an invalid Formula
argument.  Our `list` stumbles forward instead, giving such
output as is possible based on valid args, but still exiting
with error when invalid args are seen.
2014-02-08 10:03:26 -05:00
Roland Walker 895b838d1d Merge pull request #2748 from rolandwalker/only_once
enforce: certain DSL elements may appear only 1x
2014-02-07 07:48:44 -05:00
Victor Robertson 7f5fbf448c Process SystemCommand arguments in list format
Previously, SystemCommand commands and arguments were processed as
strings which caused problems during shell interpretation if the
arguments were not escaped properly.  Now all commands are expressed
as arrays and no longer require their arguments to be escaped.
Additionally, stderr and stdout could have been interleaved in the
past and now they are always separated.
2014-02-07 06:27:05 -06:00
Roland Walker 50864dc4b3 add `before_install` and `before_uninstall` 2014-02-06 08:32:12 -05:00
Roland Walker 320f8a46d8 Merge pull request #2637 from rolandwalker/version_caveats
add os_version_only to caveats DSL
2014-02-06 08:25:40 -05:00
Roland Walker 34f38caf3e add os_version_only to caveats DSL 2014-02-06 08:25:17 -05:00
Roland Walker f3803afa49 Merge pull request #2741 from rolandwalker/after_block
make sure "after" blocks really run last
2014-02-06 08:22:41 -05:00
Roland Walker d911e0310f Merge pull request #2762 from rolandwalker/rename_curl_download_strategy
rename class to `Cask::CurlDownloadStrategy`
2014-02-06 08:21:13 -05:00
Lucas Garron 913f3e6f76 Change default hash to SHA-256. 2014-02-05 18:16:18 -08:00
Roland Walker 5fabf362c6 Merge pull request #2733 from rolandwalker/testing_constants
add HOMEBREW_TAP_FORMULA_REGEX constant in tests
2014-02-05 10:54:40 -05:00
Roland Walker 9df14ceb4f rename class to `Cask::CurlDownloadStrategy`
To make room to use some of the other download strategies
classes provided by Homebrew, be explicit that we are currently
using only the curl class.
2014-02-05 10:30:58 -05:00
Roland Walker a530a9005c enforce: certain DSL elements may appear only 1x
add CaskInvalidError exception, which ought to be used in
several other places as well
2014-02-04 08:27:12 -05:00
Roland Walker 15d1fe8bbf Merge pull request #2613 from rolandwalker/double_dash
Doubledash hygiene for external commands
2014-02-03 17:00:29 -08:00
Roland Walker 36ce20a4ee support CAB archives 2014-02-03 18:37:20 -05:00
Roland Walker d03239e3c1 make sure "after" blocks really run last
and make it self-documenting by changing class name
2014-02-03 11:22:22 -05:00
Fernando Paredes 9428cad768 Merge pull request #2631 from rolandwalker/rename_cocoa-rest-client
rename cocoa-rest-client.rb
2014-02-02 21:14:02 -08:00