Commit Graph

135 Commits

Author SHA1 Message Date
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 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
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 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 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
Roland Walker 3633384036 add HOMEBREW_TAP_FORMULA_REGEX constant in tests
because our code tries to use it when throwing exceptions
also move HOMEBREW_BREW_FILE from doctor_test.rb to test_helper.rb
2014-02-01 12:47:05 -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 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 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 216444849e Add copious debugging with --debug
- add new file "cask/utils.rb" analogous to "utils.rb" in Homebrew
- define odebug and odumpcask, analogs of ohai and friends, but
  which only give output when --debug is in effect
- move the debug setting from an instance variable in Cask::CLI
  to a method Cask.debug, defined in "lib/cask/options.rb", which
  was added in #2276. (Perhaps options.rb should be merged back
  into Cask::CLI).
- sprinkle odebug statements liberally throughout the codebase
- update tests
2014-01-28 10:15:43 -05:00
Paul Hinze 36bd6f7554 Merge pull request #2576 from rolandwalker/project_homepage
`brew cask home` with no args opens project page
2014-01-28 06:30:15 -08:00
Roland Walker fabb5cfd9c Merge pull request #2618 from rolandwalker/launchctl_careful_unload
carefully unload launchctl services at uninstall
2014-01-28 03:21:07 -08:00
Roland Walker 2f2865f6b6 carefully unload lanchctl services at uninstall
Fixes #2601
- do a soft test to see if the service is loaded before attempting remove
- test/unload as both superuser and user as the service can be installed
  differently according to the original packags
- add tests for uninstall :launchctl; there were none previously
2014-01-27 08:26:45 -05:00
Roland Walker 60493a0556 can't init a CONSTANT with ||= in Ruby 1.8.x
test suite could only run under Ruby 1.9 or above
2014-01-25 21:53:23 -05:00
Roland Walker 039b10d681 Merge pull request #2543 from rolandwalker/test_alt_target
tests for #2532 - customizing target symlink
2014-01-25 09:04:08 -08:00
Roland Walker 1ce6a8ba77 tests for #2532
Travis won't like this until/if #2532 is merged.
2014-01-25 10:25:05 -05:00
Roland Walker 768b21eae8 always submit external commands in list form
For safety.
- This is a step toward reworking system_command.rb so that
invocations are done in list form on the back end, avoiding
surprises from quoting and shell metacharacters.
- There is one transitional hack here: the _quote method in
Cask::SystemCommand is modified to avoid double-quoting.  The
_quote method itself will go away in a future revision when
only list-forms are used.
- Casks using system are not touched. It seems natural to
address that when creating the DSL for after_install/before_install.
2014-01-24 20:58:03 -05:00
Paul Hinze ce615d54b9 Merge pull request #2418 from rolandwalker/doctor_version
Numerous additions to "brew cask doctor"
2014-01-24 07:50:22 -08:00
Roland Walker a5ce3cdbd8 search docs/test/fix tapname-search
This is the promised followup to #2496
- docs
- test
- bugfix: search string was being tested against fully-qualified
  Cask name including Tap, so "brew cask search phinze" would
  (confusingly) return all Casks.
2014-01-23 17:50:45 -05:00
Roland Walker e42f0f8dc1 Merge pull request #2546 from rolandwalker/indenting
indent to two spaces
2014-01-23 14:45:16 -08:00
Roland Walker 19f4ce3cfb `brew cask home` with no args opens project page
- in duplication of similar functionality in Homebrew
- in celebration of proposed design by @ndr-qef
2014-01-23 17:17:33 -05:00
Roland Walker 7a0f9ef37f always use full path to external utilities
per #2029
2014-01-23 12:20:32 -05:00
Roland Walker da520b82f0 Numerous additions to "brew cask doctor"
New versions, paths, environment variables, and tests.
Side effect: release version must be stored in two locations.
2014-01-22 15:20:05 -05:00
Roland Walker 9b54342e42 indent to two spaces
This patch contains only whitespace changes, plus a short
addition to CONTRIBUTING.md on the project-wide indent style
2014-01-22 13:08:34 -05:00
Roland Walker 329c48298a caveats first-class in DSL, gets own mini-DSL
Make caveats a first-class member of the Cask DSL.  It no longer has to
be specified with "def caveats", but can be given as "caveats do ... end"
as with after_install blocks.

In addition, create a mini-DSL which can be used within caveats blocks,
providing standard messages when manual installers must be used,
reboot-required, etc.

Add alternate form: caveats can also accept a compile-time string for
simple cases.

This is 99% compatible with old Casks, as it still works by defining
a caveats method.  However, all Casks containing caveats are cleaned
up and adapted according to the new DSL.

Full docs in CONTRIBUTING.md.
2014-01-20 11:54:46 -05:00
Roland Walker 81744a038d bugfix: make uninstall :script accept a hash
The indentation in CONTRIBUTING.md implies that :script accepts a hash.
But that is not the case. Instead :script accesses the entire hash defined
by uninstall.  Unrelated install keys such as :quit leak through to
@command.run! when attempting to exec :script.  Result: contrary to docs,
:script cannot be combined with other uninstall keys.

This PR makes uninstall :script accept a hash.  When :args or :input are not
needed, :script can still accept a plain string, so many Casks require no
alteration.

In addition
- adds key :executable, required when using hash argument to :script
- keys to :script are validated and sanitized before being passed to
  @command.run!
- adds :quit to with-installable.rb test to protect against regression
  on leaky keys
2014-01-11 12:20:59 -05:00
Paul Hinze fead909887 Merge pull request #2263 from rolandwalker/faster_uninstall
uninstall files in chunks of 500.
2014-01-10 11:09:06 -08:00
Paul Hinze 9135ff5730 Merge pull request #2258 from rolandwalker/hardlink_fonts
use hard links for fonts instead of symlinks
2014-01-10 11:06:17 -08:00