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
077eecb731
recast uninstall_options as directives
2014-06-18 20:03:28 -04:00
Roland Walker
1e8bbd3c74
recast uninstall_set as directives_set
2014-06-18 20:03:28 -04:00
Roland Walker
57957e73d3
change hardcoded "uninstall" in msgs to stanza var
2014-06-18 20:03:27 -04:00
Roland Walker
d534b0ea6f
pass stanza by name to dispatch, instead of set
...
the set contains the uninstall directives from the DSL,
possibly more than one artifact
2014-06-18 20:01:35 -04:00
Roland Walker
e3e6dca708
recast manually_uninstall method
...
as dispatch_uninstall_directives
2014-06-18 20:01:35 -04:00
Roland Walker
05a121e483
Merge pull request #4975 from rolandwalker/diskutil_eject
...
switch to `diskutil` for eject
2014-06-18 19:20:07 -04:00
Roland Walker
a0a5ba44df
Merge pull request #4965 from rolandwalker/doctor_load_path_annotation
...
Annotatate unexpected $LOAD_PATH in doctor
2014-06-18 17:45:09 -04:00
Roland Walker
1e9c5de1dc
Annotatate unexpected $LOAD_PATH in doctor
...
Warning if first element is not Homebrew-cask's own lib dir
2014-06-18 17:26:40 -04:00
Roland Walker
e0dc8b4497
Merge pull request #4970 from rolandwalker/no_backtick_in_error_messages
...
don't use Markdown-style backtick in error msgs
2014-06-18 16:35:34 -04:00
Roland Walker
5b35f21345
Merge pull request #4969 from rolandwalker/doc_standard_upgrade_command
...
standardize the recommended upgrade command
2014-06-18 16:34:51 -04:00
Roland Walker
79e17ae450
Merge pull request #4963 from rolandwalker/doctor_brew_cleanup_needed
...
detect need for "brew cleanup" in doctor
2014-06-18 16:29:02 -04:00
Roland Walker
87b670e5cd
switch to `diskutil` for eject
...
Mostly to see if this reduces random Travis errors, but also
because `diskutil eject` is a documented interface, and
`hdiutil eject` is not.
2014-06-18 16:04:17 -04:00
Roland Walker
0954ca4c8f
don't use Markdown-style backtick in error msgs
...
Because backtick has a different meaning in the shell, and the user
may copy-and-paste such text.
Some light re-wording included as well, and a reference to "brew cask edit"
changed to "brew cask cat" for simplicity.
2014-06-18 15:16:26 -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
b37e34e2c3
detect need for "brew cleanup" in doctor
...
User will receive a warning if more than one copy of Homebrew-cask
is installed.
References: #4857
2014-06-18 11:31:12 -04:00
Roland Walker
4c8e530570
move utility methods inside module namespace
...
Cask::Utils
2014-06-18 11:21:18 -04:00
Roland Walker
6fcf62e6aa
Merge pull request #4924 from rolandwalker/suggested_stanza_order
...
suggested (not enforced) order for Cask stanzas
2014-06-17 05:57:29 -04:00
Roland Walker
3cb729095d
suggested (not enforced) order for Cask stanzas
...
References: #4914
2014-06-16 13:32:08 -04:00
Roland Walker
2bfa4e554a
add `version` helper method to `caveats` mini-DSL
...
As was already done (for convenience) for `title`.
References: #4921 .
2014-06-16 12:56:31 -04:00
Roland Walker
df3b0566b0
Merge pull request #4900 from rolandwalker/allow_hdiutil_exit_code
...
permit `hdiutil` to exit with error code
2014-06-16 07:42:00 -04:00
Roland Walker
0b3134bc1c
Merge pull request #4890 from rolandwalker/caskerror_exception_status
...
show process exit status in CaskError exception text
2014-06-14 20:33:28 -04:00
Roland Walker
bca0abb6bc
process exit status in CaskError exception text
2014-06-14 20:19:59 -04:00
Roland Walker
30c8412812
permit hdiutil to exit with error code
...
Mysterious `hdiutil` errors are a longtime problem with the
test suite, and the largest cause of false Travis failure
reports.
What appears to happen is that `hdiutil` returns a valid
plist output, but also exits with an error code.
Recently, user errors have been reported which seem to be
related to the same problem (#4857 ).
After #4892 and #4887 , we have have more assurances that mount errors
will be caught elsewhere, if the XML is incorrect/missing, or if the
mounts are not returned.
So, for this special case, it should be safe to simply
ignore the error code from `hdiutil`.
2014-06-14 20:19:12 -04:00
Roland Walker
630b1e3f89
add more detail to plist parse error messages
2014-06-14 20:03:13 -04:00
Roland Walker
c78c10855c
Merge pull request #4887 from rolandwalker/better_dmg_errors
...
ensure more informative errors from `dmg.rb`
2014-06-14 18:15:46 -04:00
Roland Walker
ecd038ec6f
Merge pull request #4888 from rolandwalker/caskerror_exception_format
...
don't undent CaskError exception text
2014-06-14 18:15:36 -04:00
Roland Walker
94864be826
Merge pull request #4892 from rolandwalker/sanity_check_plist_parsing
...
defensive driving against errors running `hdiutil`
2014-06-14 18:14:11 -04:00
Roland Walker
9593e614b5
defensive driving against errors running `hdiutil`
...
This may not be strictly necessary. But it should help track
down the `hdiutil` errors, which are persistent, but occasional,
and hard to reproduce. (We pass a flag to `hdiutil` to make
respond in XML.)
2014-06-14 10:55:04 -04:00
Roland Walker
5e5af23815
don't undent CaskError exception text
...
The content of `output` is probably not indented, and will be
left-truncated if it is multi-line. This happens often with
Travis `hdiutil` errors
2014-06-14 09:26:24 -04:00
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
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