Commit Graph

701 Commits

Author SHA1 Message Date
Roland Walker 01000b0bbf Merge pull request #4868 from radeksimko/x11-caveat
Add X11 support to the `caveats` mini-DSL
2014-06-14 09:07:30 -04:00
Roland Walker b9b41030b7 ensure more informative errors from `dmg.rb`
The logic for better errors was already there; this just makes
sure that another exceptional case is handled, and falls through
to the existing error-check.

References: #4857
2014-06-14 08:50:02 -04:00
Roland Walker 3f4f6580e0 cut v0.36.2 2014-06-14 08:19:00 -04:00
Radek Simko 2fe0f616d3 X11 added to caveats DSL 2014-06-14 11:28:03 +01:00
Roland Walker bd474f3302 remove special properties of `caskroom_only`
HOLD until #4865 is merged.

After #4865, `caskroom_only` can be subclassed from Cask::Artifact::Base
like any other artifact.  It no longer has the special property of
making `uninstall` stanzas work.

This stanza has never been documented.  It is possible that it will
no longer be needed, after #4865 and subsequent cleanup on Casks that
use this form.

References: #4688
2014-06-13 13:26:58 -04:00
Roland Walker 8ab9bae38d WIP forward-compatible DSL synonyms
This makes the following stanzas available in the DSL as
synonyms to existing stanza, with no change to existing
functionality:
- pkg for `install`
- app for `link`
- suite for `link`
- preflight for `before_install`
- postflight for `before_uninstall`
- uninstall_preflight for `before_uninstall`
- uninstall_postflight for `after_uninstall`

References #4688

This works, but is marked WIP because we are not in a hurry,
and because I intend to add tests.
2014-06-12 11:27:42 -04:00
Roland Walker 744ab4aa39 add some detail when rescuing download errors 2014-06-11 16:28:46 -04:00
Roland Walker 4652e8bbcb cut v0.36.1 2014-06-11 12:47:13 -04:00
Roland Walker b29a77382b Merge pull request #4812 from rolandwalker/fail_on_nonexistent_pkg
Installation should fail if pkg file nonexistent
2014-06-11 06:54:59 -04:00
Roland Walker a8a3fe733a Merge pull request #4787 from rolandwalker/already_installed_is_not_error
Downgrade Cask install errors to warnings
2014-06-10 18:21:58 -04:00
Roland Walker caf6c14ff9 Merge pull request #4804 from rolandwalker/uninstall_coerce_ruby_2.0
fix uninstall for ruby 2.0, multiple uninstall stanza, more
2014-06-10 18:21:04 -04:00
Roland Walker acded0c6ef Installation should fail if pkg file nonexistent 2014-06-10 18:02:03 -04:00
Tony d273bb3020 Minor formatting tweaks to CLI help output 2014-06-10 12:33:21 -04:00
Roland Walker 65a4cc6f3a allow multiple `uninstall` stanzas to work
fixes longstanding bug; aligns code with docs
2014-06-10 12:16:49 -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 9fdae4583a improve `:signal` debug message 2014-06-10 09:12:00 -04:00
Roland Walker f534bbd75a `uninstall` `:files` in chunks
micro-optimization; minimize shell invocations
2014-06-10 09:11:46 -04:00
Roland Walker 974877ae7a More robust `:signal` directive in DSL
Coerce more variations into pairs.
2014-06-10 09:08:34 -04:00
Roland Walker b65cbbf0fd Coerce `:files` to Array in `uninstall`
before invoking `each` method.  This is necessitated by Homebrew's
switch to Ruby 2.0.

Also standardize how all `uninstall` directives are coerced to Array,
in a way that is compatible between Ruby 1.8 and 2.0.

Fixes #4784.
2014-06-10 09:06:50 -04:00
Roland Walker 4bf7d5bdc6 cut v0.36.0 2014-06-07 18:02:33 -04:00
Roland Walker d7dead6705 Merge pull request #4732 from rolandwalker/force_utf8_encoding
force UTF-8 encodings
2014-06-07 17:19:31 -04:00
Roland Walker 4d199ada2d force UTF-8 encodings
Fixes #4677.  This change is necessitated by Homebrew's recent
switch to Ruby 2.x.  These changes may be incomplete and/or
may not work well with Ruby 1.8.  Travis should test Ruby 1.8
compatibility.
2014-06-07 17:04:42 -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
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
Roland Walker bd30615a88 `collect_concat` is not available in Ruby 1.8
`collect` is fine here. References #4719.
plus bugfix: join into a string so that `render_with_none`
knows to substitute "<NONE>"
2014-06-06 21:48:37 -04:00
Roland Walker 8da1d588bb Merge pull request #4733 from rolandwalker/helpdoc_cleanup
remove issues_url and nullcommand from help output
2014-06-06 20:58:07 -04:00
Roland Walker 3a48343a03 Merge pull request #4719 from rolandwalker/doctor_refactor
refactor `brew cask doctor`
2014-06-06 20:42:45 -04:00
Roland Walker 324d79f0bb Merge pull request #4673 from rolandwalker/cask_load_exceptions
Improve error checking and messages on Cask load
2014-06-06 20:42:35 -04:00
Roland Walker 13f8a4d282 remove issues_url and nullcommand from help output
necessitated by Homebrew's switch to Ruby 2.x
Fixes #4728
Fixes #4726
2014-06-06 17:10:28 -04:00
Roland Walker abe4428cb6 add $SHELL to doctor 2014-06-06 14:15:48 -04:00
Roland Walker 40215968ef add $CHRUBY_VERSION to doctor 2014-06-06 14:15:34 -04: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 50841d3f86 whitespace 2014-06-06 11:34:45 -04:00
Roland Walker c857f11965 add PATH to doctor 2014-06-06 11:33:15 -04:00
Roland Walker a9121320f8 add render_env_var in doctor
add quoting
2014-06-06 11:32:15 -04:00
Roland Walker e6e5626bbc warning on old-style tap paths in doctor 2014-06-06 11:25:35 -04:00
Roland Walker 796104b786 move homebrew_origin to method in doctor 2014-06-06 11:08:19 -04:00
Roland Walker 6a7cda5c24 move default_cask_count to method in doctor 2014-06-06 11:08:19 -04:00
Roland Walker 8388d1c3ac move alt_taps to method in doctor 2014-06-06 11:08:18 -04:00
Roland Walker c354e53cc3 move fq_default_tap to method in doctor 2014-06-06 11:08:18 -04:00
Roland Walker 8a5ad08dc8 move privledged_uid to method in doctor 2014-06-06 11:08:18 -04:00
Roland Walker 9f2c773ed6 move notfound_string to method 2014-06-06 11:00:32 -04:00
Roland Walker fc9e7299ed add locale variables to doctor
references: #4677
2014-06-06 11:00:32 -04:00
Roland Walker f6011c85c9 render empty doctor values with <NONE> 2014-06-06 10:37:01 -04:00
Roland Walker 1400b61acf abstract error_string in doctor 2014-06-06 10:36:56 -04:00
Roland Walker a517e25acd abstract none_string in doctor 2014-06-06 10:36:46 -04:00
Roland Walker 0ef4606e0c retire support for `no_checksum` stanza 2014-06-04 23:26:09 -04:00
Roland Walker c082b5521a Improve error checking and messages on Cask load
Other Cask sources ultimately invoke the `load` method in the
abstract class Cask::Source::PathBase, so these changes apply
to all other sources.
2014-06-04 07:34:52 -04:00
Roland Walker 96ebb64320 Merge pull request #4658 from rolandwalker/demote_implicit_path_source
Demote implicit Cask path sources (i.e. files in current working directory)
2014-06-03 19:14:52 -04:00
Roland Walker 787b471618 isolate ErrorDuringExecution rescue
it only should be rescued for the `curl` invocation
2014-06-03 11:39:58 -04:00
Roland Walker 9797d2770f doc: improve Cask-source-resolution debug message 2014-06-03 10:39:18 -04:00
Roland Walker f24b4ba05a show resolved Cask source file or URI w/ --debug
references #4641
2014-06-03 10:38:49 -04:00
Roland Walker f8c9567a66 Don't prefer Cask files in the cwd
Fixes #4641.  Cask files in the cwd are still permitted, but
at the very lowest priority, below Tapped Cask names.
2014-06-03 10:33:19 -04:00
Roland Walker 290d1ccb38 ChecksumMismatchError is ordinary exception
not a bug
2014-06-02 23:26:19 -04:00
Roland Walker 1b9df93e20 no need to catch CaskAlreadyInstalledError
separately; it is already descended from CaskError
2014-06-02 23:24:59 -04:00
Roland Walker d4fb446830 Merge pull request #4603 from rolandwalker/doctor_homebrew_origin
show Homebrew repo & origin in doctor
2014-05-31 15:19:37 -04:00
Roland Walker 9fdc5b3fd9 show Homebrew repo & origin in doctor
references: #4581, #4571
2014-05-31 07:58:22 -04:00
Roland Walker f71ed25ee0 rescue download failure; don't show traceback
instead, give a more specific error message.  Closes #4556.
2014-05-26 15:56:35 -04:00
Roland Walker 5b2e9d1466 doc/comment: known performance issues 2014-05-15 16:52:41 -04:00
Roland Walker 3c40e82c18 generate installed list only once during list cmd 2014-05-15 16:52:17 -04:00
Roland Walker c3e514defe optimize Cask.installed by guessing full paths 2014-05-15 16:50:42 -04:00
Roland Walker 598f53ba48 memoize all_tapped_cask_dirs 2014-05-15 16:49:43 -04:00
Roland Walker 03af4f45a1 make cask_titles hold Pathnames, not strings 2014-05-15 16:38:35 -04:00
Roland Walker d0db956d69 refactor `brew cask doctor`
Output remains the same (except in the case of error).
Wrap all calculations in begin blocks for safety, provide fallback
values for all variables, don't use ohai+puts when ohai is
sufficient
2014-05-15 12:55:23 -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 d4c89509c2 Merge pull request #4382 from rolandwalker/no_doubledash_launchctl_remove
don't use doubledash on launchctl remove
2014-05-14 06:26:27 -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 5101d363ab append the .rb extension on Cask::Source::Path
Unless `.rb` is already present on the query string.  Failure
to append the extension caused confusing effects, including
selective failure of "brew cask list" when invoked from
`/usr/local/bin` working directory.  Fixes #4077 .
Credit to @mroth on the detective work.
2014-05-13 09:04:14 -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 0808c0f3f9 handle Tap read error in `brew cask doctor` 2014-05-08 14:53:30 -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 89082904c4 cut v0.35.0 2014-05-08 07:48:34 -04:00
Roland Walker dd5d767b18 Merge pull request #4244 from rolandwalker/toplevel_dir_permissions
special case permissions when creating `/opt`
2014-05-07 22:36:42 -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
Atsushi Nagase 186e2592df Moved garmin-express.rb to correct location 2014-05-08 00:47:23 +09:00
Roland Walker 1fe644f84f special case permissions when creating `/opt`
or any other toplevel directory. Closes #4187
2014-05-07 10:56:04 -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
Roland Walker 89bf98ce6d Merge pull request #4241 from rolandwalker/cat_tweaks
light changes to "brew cask cat"
2014-05-07 09:33:52 -04:00
Roland Walker 31ce4bd4cd light changes to "brew cask cat"
tone down strident comment imported from Homebrew, whitespace, misc
2014-05-07 09:18:03 -04:00
Roland Walker fe99823d84 Merge pull request #4226 from rolandwalker/handle_nil_in_checklinks
handle `nil` `@response_status`
2014-05-07 08:38:24 -04:00
Roland Walker e1ee7b118d Merge pull request #4200 from linc01n/cli_cat
Add `brew cask cat` command
2014-05-07 08:29:30 -04:00
Roland Walker f80afb8684 handle nil @response_status
fixes #4212
2014-05-06 09:13:49 -04:00
Atsushi Nagase 4e1d4cbd0e Added Garmin Express 2014-05-06 06:28:37 +09:00
Lincoln Lee 227ac512bc Add `brew cask cat` command mentioned in #4018 2014-05-05 22:46:28 +08:00
Paul Hinze 767be2b4b0 cut v0.34.0 2014-05-04 18:53:58 -05:00
Paul Hinze 9e2641b851 Merge pull request #2427 from rolandwalker/checksum_error_help
Give the user help on checksum errors
2014-05-04 18:27:20 -05:00
Roland Walker fb1300366e automatically transition to new Tap name/location
At every command execution
- invoke `rename_taps_dir_if_necessary` to help with Homebrew's Tap migration.
  (Homebrew's migration seems to sometimes fail to fire, see #4096)
- untap `phinze/cask`, and tap `caskroom/cask`, to help with our own move
  to a GitHub organization
After a few months, this can be reverted.
2014-05-03 16:24:00 -04: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 90bba2cf00 cut v0.33.1 2014-04-29 09:49:12 -04:00
Roland Walker d73b8089c6 Merge pull request #4095 from rolandwalker/doctor_tap_paths
add Tap path info to `brew cask doctor`
2014-04-29 09:39:36 -04:00
Roland Walker c7ec83c068 add Tap path info to `brew cask doctor` 2014-04-29 09:30:06 -04:00
Roland Walker 75d6859195 better handle renamed Casks in `brew cask info`
Fixes #4058
2014-04-29 08:57:44 -04:00
Lincoln Lee 5faa850690 Remove ISSUES_URL from cli commands
When user run `brew cask` it will list all commands out.
There is a blank help command call issues_url which caused by the newly
introduced constant from #2971
2014-04-27 17:49:01 +08:00
Roland Walker 1f69c04cd6 cut v0.33.0 2014-04-26 09:59:40 -04:00
Roland Walker f7a209d133 Merge pull request #4042 from rolandwalker/tap_location_change
Adapt to homebrew's move of the tap directory
2014-04-26 09:47:03 -04: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 836b3ce699 avoid exit code with no Casks are installed
and no argument is give to `brew cask list`.  Fixes #3881.
2014-04-25 10:56:45 -04:00
Võ Anh Duy 0fb893027d Redirect user to cask issues page, fixes #1251 2014-04-19 20:21:48 +07:00
Roland Walker af3fe61ae5 cut v0.32.0 2014-03-29 09:04:25 -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 0652a39eb8 Merge pull request #3700 from rolandwalker/assistive_devices_caveat
add `assistive_devices` to `caveats` DSL
2014-03-28 09:33:00 -04:00
Roland Walker af103f1486 add `zsh_path_helper` to `caveats` DSL
Per discussion in #3597 and Homebrew/homebrew#25719
2014-03-27 09:42:33 -04:00
Roland Walker 9554b58245 add `assistive_devices` to `caveats` DSL
Inspired by #3695
2014-03-27 09:41:20 -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 f1620a56f5 make `brew cask audit` return error code on fail
Per report in #3655
2014-03-25 09:09:49 -04:00
Roland Walker 0938a9d862 cut v0.31.1 2014-03-17 10:11:50 -04:00
Roland Walker 266718d047 don't downcase a Pathname object
Fixes #3572.
2014-03-17 09:56:22 -04:00
Roland Walker 008b96353d cut v0.31.0 2014-03-15 10:30:37 -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 e8bd3465fe respect digits in search strings
Fixes #3533
2014-03-14 08:48:43 -04:00
Roland Walker ba8473a766 explicitly unload :launchctl service before remove 2014-03-14 08:41:18 -04:00
Roland Walker f5318395eb Merge pull request #3518 from rolandwalker/casecmp_fixes
fix some erroneous uses of `casecmp`
2014-03-12 19:15:37 -04:00
Roland Walker ba8d9ba4b5 fix some erroneous uses of `casecmp`
`casecmp` returns -1/0/1, never false or nil
2014-03-12 10:40:11 -04:00
Roland Walker 21e18b8a37 only set filesystem metadata if :target != source
fixing a bug in the implementation of #3073 which caused
metadata to be set in all cases.
2014-03-12 10:26:38 -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 bf6ce149cf Merge pull request #3217 from rolandwalker/multiple_args_to_pkgutil
accept multiple arguments to uninstall/:pkgutil
2014-03-04 10:30:00 -05:00
Roland Walker 96dfc573b1 Merge pull request #2672 from rolandwalker/lsb_no_delete_safety
BUGFIX: don't try autocleanup inside system dirs
2014-03-03 09:30:09 -05:00
Roland Walker 655f50b064 cut v0.30.1 2014-03-02 10:30:23 -05:00
Roland Walker 15a4ca92e9 test if lsar is nil before attempting split
fixes #3332
2014-03-02 10:22:03 -05:00
Roland Walker c95a7f2534 suggest replacements on "brew cask install" fail 2014-03-01 15:04:12 -05:00
Roland Walker 8feb7e8495 cut v0.30.0 2014-03-01 12:30:17 -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 a25469434d accept multiple arguments to uninstall/:pkgutil
We may as well do so, the previous behavior was a bug:
multiple elements were silently concatenated into a single
regexp.
2014-02-26 07:21:18 -05:00
Roland Walker 020aaca082 Merge pull request #3013 from rolandwalker/accept_trailing_rb
accept and ignore trailing `.rb` on CL arguments
2014-02-25 18:31:37 -05:00
Roland Walker 36cd9e4d72 accept and ignore trailing `.rb` on CL arguments
"Be conservative in what you do, be liberal in what you accept."
2014-02-25 18:24:58 -05:00
muescha d7341a79b5 better error message (same like at cabextract) 2014-02-26 00:08:18 +01: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 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 297cd6382a Merge pull request #3058 from rolandwalker/exception_objects
raise exception objects
2014-02-25 12:30:30 -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 f3bbecb029 Merge pull request #3105 from rolandwalker/appcast_dsl
add optional appcast stanza to DSL
2014-02-25 12:30:08 -05:00
Roland Walker abe1f175ca Merge pull request #3107 from rolandwalker/dsl_no_check_syntax
`sha256 :no_check` as synonym for `no_checksum`
2014-02-25 12:29:48 -05:00
Roland Walker 22e24ea5c5 Merge pull request #3131 from rolandwalker/cmd_aliases
provide command aliases to match Homebrew
2014-02-25 12:29:22 -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 45d72b8838 Merge pull request #3079 from rolandwalker/brew_cask_update
make `brew cask update` synonym for `brew update`
2014-02-24 19:08:02 -05:00
Roland Walker 4fcdab0583 provide command aliases to match Homebrew
fixes #2969
2014-02-24 08:15:52 -05:00
Roland Walker 6f6a07fc0f mass whitespace cleanup 2014-02-22 21:13:52 -05:00
Roland Walker 4e920d4f19 Give the user help on checksum errors 2014-02-22 20:03:12 -05:00
Roland Walker 3623d13e85 `sha256 :no_check` as synonym for `no_checksum` 2014-02-22 19:47:43 -05:00
Roland Walker fe2ff07f2e add optional appcast stanza to DSL
Appcasts are a standard way for applications to publish
information about available updates via RSS.  Sparkle and
other update frameworks are built upon appcasts.

In a quick test, appcasts were found for 188/360 Casks examined.

This PR adds an optional `appcast` stanza, but does not add
`appcast` to any Cask or make use of the info in any way.  It is
intentionally left undocumented.
2014-02-22 19:31:33 -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 55e9cfc39d make `brew cask update` synonym for `brew update`
for convenience/typo
2014-02-21 10:23:16 -05:00
Roland Walker 3ded5898b6 more reliable way to look up username
`ENV` is manipulable.  `getpwuid` is reliable.
2014-02-21 09:30:37 -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 43624e6fcb Merge pull request #3057 from rolandwalker/caveat_method_spelling
bugfix: caveats DSL `os_version_only` spelling
2014-02-20 07:45:52 -05:00
Roland Walker 707b9091b0 Merge pull request #3042 from rolandwalker/curl_feedback_message
improve debug message from curl
2014-02-19 20:21:51 -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
Roland Walker 113518e8cb make checksum-missing message match Cask semantics
for copy/paste
2014-02-19 18:48:21 -05:00
Roland Walker 60378bcc7e CaskError objects instead of strings, better msgs 2014-02-19 18:47:39 -05:00
Roland Walker b81ea45d06 use new CaskInvalidError, improve messages 2014-02-19 18:46:55 -05:00
Roland Walker 330671dc03 Merge pull request #3025 from rolandwalker/no_font_search_hack
temporary hack: suppress searching the font tap
2014-02-19 17:23:58 -05:00
Roland Walker 7ed8cbf3bc cut v0.29.2 2014-02-19 11:51:31 -05:00
Roland Walker 2e2364e5e9 BUGFIX: Homebrew chg, 3 args for checksum mismatch
Homebrew changed underneath us, requiring 3 arguments to
`ChecksumMismatchError.new`.  This is causing total failure
on Travis, and probably a number of issues will be filed
until we merge and cut a bugfix release.
2014-02-19 11:03:07 -05:00
Roland Walker f05990eccb improve debug message from curl 2014-02-19 10:42:08 -05:00
Roland Walker d2b779e509 temporary hack: suppress searching the font tap
this is needed to reduce noise on searches until search
can be made more configurable
2014-02-19 09:21:30 -05:00
謝致邦 0a93634416 Add strip to link_checker. 2014-02-19 00:52:47 +08:00
Roland Walker 21e8f49a27 Merge pull request #2994 from rolandwalker/symlink_artifact_simplify
further cleanup/refactor of link-derived artifacts
2014-02-18 07:57:05 -05:00
Roland Walker cb4adbe3bd Merge pull request #2991 from rolandwalker/defensive_abv_method
fork `abv` method with better odd-filename defense
2014-02-17 21:05:59 -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 40ad897da8 further cleanup/refactor of link artifacts
Following up on #2874, we should no longer need `linked_path`,
but instead simply refer to `target`.

This also fixes a bug in which some links were not removed
during `uninstall`.  Example:
  binary 'oclint-0.7-x86_64-apple-darwin-10/lib/oclint', :target => '/usr/local/lib/oclint'
2014-02-17 12:33:38 -05:00
Roland Walker 21702f5dfe Merge pull request #2961 from rolandwalker/system_command_followups
System command followups
2014-02-17 11:35:01 -05:00
Roland Walker 6096cc8d57 fork `abv` method with better odd-filename defense
Fixes #2917.  New method is named `cabv`. The original `abv`
method is in Homebrew at `Library/Homebrew/extend/pathname.rb`
2014-02-17 11:13:39 -05:00
Roland Walker 4ffb624e87 cut v0.29.1 2014-02-15 12:31:59 -05:00
Roland Walker 660b4b08bf enforce valid values for :stderr on command.run 2014-02-15 12:21:27 -05:00
Roland Walker 5ab9c712e4 typo: :stderr accepts :silence 2014-02-15 12:04:49 -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 ee29d1ee4a cut v0.29.0 2014-02-15 08:50:49 -05:00
Roland Walker fbcbcd21be Merge pull request #2761 from rolandwalker/private_eye_followups
sleep during uninstall, allow `:must_succeed`
2014-02-15 07:44:33 -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 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
Paul Hinze 9dc6fd9562 Merge pull request #2734 from rolandwalker/sort_predictability
make order consistent across Ruby vsns w/sort
2014-02-12 15:26:56 -06: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 48accc49c6 list/target refactor
This follows up #2532 and #2392 abstracting out some duplicated
code.  Still not perfect, but better.
2014-02-12 08:39:11 -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 298d98d204 fixup #2872 2014-02-12 08:03:07 -05:00
Roland Walker c5dd610f2a make criteria work again when cabextract missing
addresses an incidental report in #2467
2014-02-12 07:55:43 -05:00
Roland Walker 45ed67c64f add :allow_untrusted modifier on install 2014-02-11 14:40:16 -05:00
Roland Walker 0700813da7 Merge pull request #2851 from rolandwalker/system_command_followups
System command followups
2014-02-11 10:13:46 -05:00
Roland Walker d0970948ce Merge pull request #2759 from rolandwalker/cleanup_cmd
add command `brew cask cleanup`
2014-02-11 06:25:21 -05:00
Roland Walker 5548bc4756 test valid keys in _process_options
add monkeypatch on Hash in utils.rb for `assert_valid_keys` method
2014-02-10 10:57:55 -05:00
Roland Walker 545fc276dc allow command.run without arguments
ie only an exectuable
2014-02-10 10:53:38 -05:00
Roland Walker 7d8abee751 don't choke when :args is not present
in _process_options
2014-02-10 10:53:30 -05:00
Paul Hinze 9fd35a9a04 Merge pull request #2841 from phinze/version-namespace
restrict visibility of Cask namespace in Formula
2014-02-09 23:39:50 -05:00
Paul Hinze 753bc59dcb restrict visibility of Cask namespace in Formula
we had collision issues with homebrew's 'cask' formula (for the emacs
package manager project).

this keeps the in-project and in-formula visibility of the version
number via the old "namespaced global" strategy that keeps a `Cask`
constant out of view of the formula.
2014-02-09 14:14:07 -05:00
Lucas Garron 3c00e22dc1 Report SHA-256 hash (instead of SHA-1) if checksum is missing.
I accidentally missed this in #2719.
2014-02-09 04:23:00 -08:00
Roland Walker 8450a29a6a Show managed links in "brew cask list"
Fixes #2261
2014-02-08 16:26:23 -05:00
Roland Walker de78b0f359 sleep during uninstall, allow :must_succeed
on script directives. followups from #1802. amend private-eye Cask.
2014-02-08 16:15:15 -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 90d6fa675c Merge pull request #2760 from rolandwalker/mkpath_casks_cache
add missing `HOMEBREW_CACHE_CASKS.mkpath`
2014-02-06 08:22:03 -05:00
Lucas Garron 913f3e6f76 Change default hash to SHA-256. 2014-02-05 18:16:18 -08: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 379f3e7c88 add missing `HOMEBREW_CACHE_CASKS.mkpath`
If `mkpath` must be done for the parent dir, then it certainly
must also be done for the child dir.
2014-02-05 09:57:35 -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 9a0751b33a realpath hygiene for external commands
For external commands which do not support the doubledash convention
(#2613), wrap file arguments in Pathname.new(file).realpath at the
very last minute.  This provides a guarantee against surprises caused
by unusual filenames which might be misinterpreted as flags.
2014-02-03 20:02:34 -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 7476fcbfdf Merge pull request #2743 from rolandwalker/screen_saver_followups
tiny nits on new Screen Saver artifact
2014-02-03 10:22:39 -08: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
Roland Walker 9445b05c4d tiny nits on new Screen Saver artifact
whitespace, filenames, orthography to be consistent with
other artifacts. No functional change.
2014-02-03 11:21:09 -05:00
Roland Walker 935ae52eb8 make order consistent across Ruby vsns w/sort
Fixes #2635.  In particular, link and cookie order differ
between Ruby 1.8.7 and 2.x, causing the test suite to fail
under 1.8.7.
2014-02-01 14:24:32 -05:00
Roland Walker b737ff758d add new method depends_on_formula to odumpcask 2014-02-01 12:44:09 -05:00
Roland Walker 3a1c9484a3 Divide search output into sections
typically "Exact Match" and "Partial Matches"
2014-01-31 20:20:30 -05:00
Roland Walker 288805e6ea doubledash hygiene for external cmd: file 2014-01-31 13:05:10 -05:00
Roland Walker 061483571c doubledash hygiene for external cmd: kextunload 2014-01-31 13:05:10 -05:00
Roland Walker 4b87101f1f doubledash hygiene for external cmd: chmod 2014-01-31 13:05:09 -05:00
Roland Walker 0b1814979e doubledash hygiene for external cmd: launchctl 2014-01-31 13:05:09 -05:00
Roland Walker d8a7e5aad9 doubledash hygiene for external cmd: rmdir 2014-01-31 13:05:09 -05:00
Roland Walker 06395054d6 doubledash hygiene for external cmd: open 2014-01-31 13:05:09 -05:00
Roland Walker 6038fd221d doubledash hygiene for external cmd: ditto 2014-01-31 13:05:09 -05:00
Roland Walker a7f1bc6693 doubledash hygiene for external cmd: rm 2014-01-31 13:05:09 -05:00
Roland Walker b2de57cf0f doubledash hygiene for external cmd: ln 2014-01-31 13:02:15 -05:00
Roland Walker 3cc22374f9 doubledash hygiene for external cmd: sudo, AND
also includes doubledash hygiene for any child commands following each sudo
2014-01-31 12:58:39 -05:00
Roland Walker 7d34e7b9cc cut v0.28.0 2014-01-30 11:56:34 -05:00
Roland Walker 99f0c4827e Merge pull request #2697 from rolandwalker/req_cask_version
make version number available within brew-cask
2014-01-30 07:58:35 -08:00
Roland Walker 28a84baf92 Merge pull request #2545 from rolandwalker/search_followups
search docs/test/fix tapname-search
2014-01-29 09:14:26 -08:00
Roland Walker 2a450c3a07 make version number available within brew-cask
brew cask doctor was showing 1.8.7 as the homebrew-cask software version
2014-01-29 10:00:13 -05:00
Roland Walker 98f93c45bc Merge pull request #2670 from rolandwalker/relative_readlink_safety
BUGFIX: readlink requires chdir for relative links
2014-01-29 06:27:44 -08:00
Roland Walker 82504947e9 BUGFIX: readlink requires chdir for relative links
Fixes #2650 (although there is more work to be done).  The issue is that
path.readlink.exist? returned false for all relative links, because readlink
reads relative to the current working directory.  This caused relative
symlinks such as /usr/bin/tar to be deleted, because package mosh identified
/usr/bin as one of its container directories.

The simplest fix is not to use readlink at all, because path.exist?
will tell us what we want to know, independent of current dir.
2014-01-29 09:23:42 -05:00