Commit Graph

277 Commits

Author SHA1 Message Date
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
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 3a1c9484a3 Divide search output into sections
typically "Exact Match" and "Partial Matches"
2014-01-31 20:20:30 -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
Paul Hinze ae2d5822e1 Merge pull request #2592 from rolandwalker/arch_caveats
add arch_only to caveats mini-DSL
2014-01-28 06:29:16 -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 da67069aa7 rename cocoa-rest-client.rb
to cocoarestclient.rb
per naming rules in CONTRIBUTING.md
2014-01-27 08:42:29 -05: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 9d2d6e3575 add arch_only to caveats mini-DSL
Relevant to points raised by @goxberry in #2581
2014-01-24 10:43:00 -05: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
Paul Hinze b850d78427 Merge pull request #2240 from linc01n/audit
Check no_checksum if version is latest in audit
2014-01-10 10:59:36 -08:00
Paul Hinze 9bd923fafa Merge pull request #2152 from Dillon-Benson/patch-2
shows that there are no casks matching a search term that did not result...
2014-01-10 10:58:45 -08:00
Stratos Moros 7136269198 implement `binary` artifact 2014-01-05 22:55:18 +02:00
Roland Walker 61a09e9af8 fix test cruft introduced by #2304 2014-01-04 13:16:16 -05:00
Roland Walker 4123b05efa use hard links for fonts instead of symlinks
per an issue reported by @jgarber623.  Recast for compatibility
with #2300.
2014-01-04 12:39:37 -05:00
Roland Walker a4149be6ef refactor artifacts
- abstracts out common logic, much code removed
- fixes one bug/inconsistency: some artifacts failed to
  "return false" when the target exists in "preflight_checks".
- one trivial functional change: artifact type and quotation marks
  added in all user feedback (quotes needed b/c of pathnames
  containing spaces)
2014-01-03 17:08:09 -05:00
Roland Walker cfee08ab9e uninstall files in chunks of 500.
This is intended to address #2122.
2013-12-31 19:47:31 -05:00
Lincoln Lee 70302a4420 Check no_checksum if version is latest
Added one more check in audit if version is latest and have sha1 it will
not pass.
2013-12-30 20:46:11 +08:00
Dillon Benson 12cc9d4006 remove colon and add quotes to search not found message 2013-12-19 12:14:50 -05:00
Dillon Benson fdf43d7873 change search results message 2013-12-19 12:03:42 -05:00
Dillon Benson 10d0feef27 shows that there are no casks matching a search term that did not result in anything 2013-12-19 00:02:38 -05:00
Paul Hinze e46b89c908 Merge pull request #2081 from leoj3n/services-support
[WIP] services support
2013-12-15 15:26:44 -06:00
Paul Hinze 57077feac2 fix build
extra command in uninstall stubs now that we're checking for kernel
extensions before unloaded
2013-12-15 15:11:23 -06:00
Paul Hinze 36b0d166df make method_missing message much more explicit 2013-12-15 14:16:22 -06:00
Paul Hinze f6f507b289 some refactoring around the new download strategy
- move the interface from top-level methods to hash arguments of URL to
   keep the cask DSL as skinny as possible
 - promote the Cask::Headers object up to a Cask::URL object that
   encapsulates all infornation about the URL
 - pull all knowledge about curl arguments into the DownloadStrategy,
   leaving URL to act as a value object to be queried for details
 - test at the DownloadStrategy level; setting up expected curl args
   and example casks
2013-12-15 13:18:47 -06:00
Paul Hinze 24a53c4af7 Merge pull request #1944 from jonahoffline/add_headers_download_strategy
Add DownloadStrategy with custom :headers support
2013-12-14 09:13:58 -06:00
Paul Hinze 0c6e97b8fd use absolute paths for all commands
closes #2029
2013-12-14 08:48:40 -06:00
Paul Hinze d318192854 change cleanup strategy; should speed up tests
the test cleanup was using an old strategy that loaded every cask to
search for ones that are installed. with the number of casks approaching
1000, this was adding ~0.5s __per test__.

switching to the newer strategy that bases off of files in a dir speeds
this up, which improves the build time drastically.
2013-12-14 08:45:54 -06:00
Paul Hinze 4bfc09ec02 Merge pull request #2066 from halo/master
Configurable Caskroom location, see #475
2013-12-14 06:00:31 -08:00
future bb2e3ab187 Improved the name of a test 2013-12-14 09:51:46 +01:00
Joel Kuzmarski 7432affc59 services support 2013-12-13 18:13:19 -06:00
Paul Hinze 8870f7c1fc Merge pull request #2008 from kevinSuttle/colorpickers 2013-12-13 10:40:36 -06:00
Paul Hinze 57da787bb5 fix pkg tests 2013-12-13 09:30:21 -06:00
Kevin Suttle 6dff4a35db Add support for colorpicker type 2013-12-12 22:59:58 -05:00
Jonah Ruiz 06be4b0d8e Add DownloadStrategy and Cask::Headers for custom :headers support
accepts a :user_agent argument and/or multiple :cookies
  headers :user_agent => 'Netscape/1.0', :cookies => { :cookey => "r00t" }

Also adds a standalone :fake_user_agent for a default UserAgent (Chrome)
  fake_user_agent
References #1175, #958
2013-12-12 21:29:12 -04:00
future 738479174c Added test for custom --caskroom argument 2013-12-12 17:48:46 +01:00
Fernando Paredes d9c77c65cb Add support for installing Widgets 2013-12-08 09:28:56 -08:00
Paul Hinze 79aa1b7275 allow casks to support arbitrary blocks
this allows us to experiment with behavior that we may not want to
promote to an official feature just yet.

i'm thinking about stuff like #544, and other things i can't foresee

we'll have to be careful to not let this get out of hand, but i think
it could be helpful for cask authors to be able to try and problem solve
locally.
2013-12-05 21:02:59 -06:00
Paul Hinze f75c47e32f Merge pull request #1948 from phinze/non-ruby-backed-casks
support non-ruby-backed casks
2013-12-05 18:28:31 -08:00
Paul Hinze 5dba177bf1 Merge pull request #1860 from rolandwalker/fonts
add support for installing fonts
2013-12-05 18:27:02 -08:00
phinze 10db2d5d3c support non-ruby-backed casks
- brew cask list now displays casks without backing ruby files
- casks without a source are displayed as "caskname (!)"
- these casks can be uninstalled, with the caveat that it only removes
  their files from the caskroom (doesn't run pkg uninstall or anything,
  since there's no ruby file to define what to do)
2013-12-05 20:10:19 -06:00
Fernando Paredes 302f150670 Merge pull request #1882 from Peeja/quicklook-auto-init-qlplugindir
Create qlplugindir during init.
2013-12-01 09:54:14 -08:00
Pavel Sakun 680dbfd889 Intellij idea casks renamed to include full product name 2013-12-01 03:24:49 +03:00
Peter Jaros fff4bb06ca Test qlplugindir auto-creation. 2013-11-29 12:01:11 -05:00
Roland Walker 5da6e642bf add support for installing fonts 2013-11-26 08:38:43 -05:00
Lucas Garron ee30f839d2 QuickLook plugin support. 2013-11-14 20:26:07 -08:00
Shane Watson 0627d3a909 Use exit codes 2013-11-10 13:30:11 -08:00
phinze 1ba71a3554 remove empty app dirs from caskroom on uninstall
previously an install + uninstall would leave around an empty dir with
the app's name. now we clean that up.

refs #1461
2013-11-10 14:48:16 -06:00
Shane Watson 8ab01bc255 Guard against unspecified casks in CLI 2013-11-10 13:44:10 -06:00
Lincoln Lee 22ee53b1d3 Add caveats to info like homebrew 2013-11-09 18:45:50 +08:00
Paul Hinze d929e6a779 Merge pull request #1504 from phinze/1436-latest-sourceforge-links
new preferred sourceforge url style
2013-11-05 20:25:31 -08:00
Paul Hinze dea18ec540 Merge pull request #1501 from phinze/1083-test-tarballs
add test that exercises tar container
2013-11-05 20:09:59 -08:00
phinze 8feec1de14 new preferred sourceforge url style
- document sf link policy
 - change audit to accept old and new style links
 - need to keep old style links for projects where the 'latest' link
   does not point to something usable
 - link to official policy in audit warning message

refs #1436
2013-11-05 22:09:15 -06:00
phinze 06506c5643 add test that exercises tar container
refs #1083
2013-11-05 21:33:46 -06:00
Paul Hinze abb842bb44 Merge pull request #1499 from phinze/1035-fix-ambiguious-cask-load
use exact matching when loading a cask
2013-11-05 19:22:41 -08:00
phinze 58ac54ed29 use exact matching when loading a cask
fixes issue where casks with names that were a strict prefix of other
casks would always shadow them.

refs #1035
2013-11-05 21:07:52 -06:00
Paul Hinze 8baff93b12 Merge pull request #1462 from phinze/smarter-plist-parser
more robust plist parsing, and better error handling
2013-11-03 12:54:03 -08:00
phinze 27856b09f8 more robust plist parsing, and better error handling
hdiutil can output DMG agreement information before the output plist
xml, and our plist parser was choking on that text before the xml
started.

so now we scan to the beginning of an xml document before trying to
parse the xml.

also added much more explicit error handling around the plist parsing,
to hopefully catch related and future plist-related errors.

refs #914
2013-11-03 13:07:18 -06:00
phinze a1fa264465 brew cask list, when given args, list installed files
this mimics (and indeed steals code from) homebrew's behavior

refs #1417
2013-11-03 12:23:08 -06:00
phinze 7ae7a18932 fixes to pkg uninstaller to prevent madness
- do not remove *all* symlinks from referenced dirs, only broken ones
 - restore dir permission after use so we don't leave behind 777 dirs
 - add some better testing around `Cask::Pkg`
 - clean up `FakeSystemCommand` interface in tests

refs #1274
2013-10-24 14:56:29 -05:00
phinze a9df0c4c45 fix: reinstall attempt nukes existing files
oopsie!
2013-10-23 19:36:06 -05:00
phinze c85ef168fc require most commands to succeed; cleanup on install failure
- add `run!` method which raises if command does not succeed
- use `run!` when the command we are running must succeed for things to
  move forward. this should help produce clearer error messages in
  failure scenarios.
- move caveats earlier in the install process so reports can be made
  about potential failures
- remove the destination tree on cask install failure, so the cask will
  not be considered installed
2013-10-20 16:52:51 -05:00
Kevin Deldycke cc4e796a74 Add new cask for Prey project.
This cask install the batch version of Prey package, as detailed in:
http://support.preyproject.com/kb/installation/how-to-deploy-prey-in-batch-mode-mac-os

As it requires an API key to be installed, a warning is displayed to the
user with an explanation on how to fix the issue.

Also added -E option to sudo invocation so environment variables can be
passed to the installer.

closes #953

Signed-off-by: phinze <paul.t.hinze@gmail.com>
2013-10-20 13:18:54 -05:00
phinze c03ada18ec support for nested containers
- this allows us to support casks for things like "dmg in zip" "zip in
   tar", etc, etc
 - a nested container can be any format that homebrew-cask supports
 - the existing container support is now referred to as a Cask's
   "primary container"
 - use the `nested_container` artifact type to indicate the relative
   path to a nested container that you wanted extracted
 - multiple layers of nesting should work with multiple nested_container
   directives (though this is untested as yet)
 - add SpeedDownload as the first cask to use this feature; refs #602
2013-10-19 16:20:00 -05:00
Adam Stankiewicz 590a7bb572 fix: Allow for underscores in urls
Signed-off-by: phinze <paul.t.hinze@gmail.com>
2013-10-07 20:03:44 -05:00
phinze 18fb8fc028 support custom prefpanedir option 2013-10-07 17:45:58 -05:00
phinze fd3f3e7dde move cli tests to proper dir 2013-10-07 17:43:03 -05:00
phinze c244385eb2 prefpane support; artifact refactor
= New Concept: Cask::Artifact

An Artifact is a file in an extacted container for which homebrew-cask
should take some sort of action on install/uninstall.

== Current artifacts:

 - App: link/unlink to ~/Applications
 - Pkg: install/uninstall (with sudo)
 - Prefpane: link/unlink to ~/Library/PreferencePanes

= New Feature: Preference Pane Handling

Specifying `prefpane 'MyApp.prefPane'` in a Cask causes it to be linked
on install to the correct location for it to show up in System
Preferences.

refs #69

= Removed Commands: linkapps/unlinkapps

These were old and mostly unused and don't really make much sense when
linking/unlinking happens automatically in the install process.

= Changed Behavior: stricter relative pathname requirement

With this refactor, we remove the fuzzy searching for a file in an
extracted container when that file was referenced from `link`
or `install`. There may be some casks that need to be updated due to
this change.
2013-10-07 13:51:42 -05:00
phinze a9cd8e7101 fix a few bugs around recent changes
- re-added a lost nil guard on `Dmg` containers
 - `FakeSystemCommand` was still returning an array of split lines
   instead of a string, even though its real counterpart switched to
   string when install/uninstall landed
 - flushed out an alfred cli bug
 - moved plist parsing down to SystemCommand layer
2013-09-22 14:44:31 -05:00
Paul Hinze 70ba5c43c0 pkg uninstall: support kernel extension unloading
this should complete support for `wav-tap` and finish out #839
2013-09-22 08:25:16 -05:00
Paul Hinze 357c49162c when uninstalling pkgs; sudo chmod before examining
this helps avoid a situation (which happened with `wav-tap`) where the
non-priveleged ruby code gets permision denied errors while examining the
contents of directories using `Pathname`.
2013-09-22 08:20:18 -05:00
Paul Hinze 21f1cc6544 naked pkg - save files with spaces properly 2013-09-22 08:19:34 -05:00
Paul Hinze 3c9423e8c6 naked pkg support + major container refactor
`Cask::Installer` was already much too complex, so I took this
opportunity to throw a `Cask::Container` abstraction around the
extraction part of the package install step.

It goes like this: a Cask's URL points to a Container of some sort. The
containers we currently support are: dmg, zip, tar, and (new) naked.
Naked refers to a raw file that just needs to be copied in place. This
currently just means a pkg file, but in the future it may expand.

A Container knows how to do two things: identify a path as being its
type (`Container.me?`) and extracting the contents of its container to
the proper destination for a Cask (`Container#extract`).

The first Cask we have that supports the naked pkg type is
`heroku-toolbelt`. (Thanks to @sheerun for the Cask definition.)

Other miscellania batched in with this refactor:

 - switched to an explicit require strategy rather than globbing
 - `Cask::Installer` is instantiated now to match its interface with
   other similar collaorators
 - simplified zip and tar identification to shorter strings rather than
   exact matches of full `file -Izb` output
 - `Cask::SystemCommand` gets explicit output redirection options
 - many rogue backticks replaced to properly use `SystemCommand`
 - fixed misnamed test file `link_checker_spec.rb`
 - remove some extraneous `after` clauses in tests; leaning more on
   `test/support/cleanup.rb` to uninstall for us
 - pkg uninstall `:files` gets a `-rf` to support removing dirs

refs #839 and #1043
2013-09-21 21:59:07 -05:00
phinze fbc246fa5c fix overzealous cask already created error
this prevented any cask being created via `brew cask create` that was a
suffix substring of an existing cask.

refs #998
2013-09-09 11:16:26 -05:00
Paul Hinze 5d44948737 remove long-dead submodule directory
refs #348
2013-08-06 14:59:02 -07:00
Shane Delmore f5d1ccb76b Fixed uri in test case 2013-07-30 14:07:11 -07:00
Shane Delmore c28a444bc4 Fixing test file url 2013-07-27 15:08:51 -07:00
Shane Delmore 8ccb22749d Merge branch 'master' into cask-strategy
* master: (75 commits)
  Update Shuttle from version 1.1.1 to 1.1.2
  no version but latest
  OSX port of the awesome gqrx SDR software
  SdrDx – OS X and Windows SDR Software
  Updates version for LibreOffice to 4.1
  Adds cask for Simon.app
  DSP Radio - Software Defined Radio for Mac OS X
  CuteSdr, the QT based SDR project from RF-Space.
  Updated to Zotero 4.0.9
  add maratis 3.21
  updated xld to 20130720
  Rename HexFiend.rb to hexfiend.rb
  Add latest Hex Fiend.
  Add AeroFS cask
  Update link option.
  Add cask for MongoHub (https://github.com/fotonauts/MongoHub-Mac)
  Add cask for Robomongo (http://robomongo.org)
  Add cask for MongoHub (https://github.com/fotonauts/MongoHub-Mac)
  Adding 'Google Earth'.
  Add link to OpenOffice
  ...
2013-07-26 12:15:43 -07:00
Shane Delmore 583559d84e Issue #6. Adding load from url feature. 2013-07-26 11:54:40 -07:00
phinze 171456dc98 support for install/uninstall
accepts a single argument, which is a relative path to a pkg
inside the extracted Cask; homebrew-cask will attempt to install this
pkg after the Cask is extracted via `installer`

because of the many different ways uninstallers work, this
has several features:

 - `:script`: a script in the Cask which serves as an uninstaller (e.g.
   Vagrant, VirtualBox), uses `:args`, and `:input` keys to interact
   with said script
 - `:pkgutil`: a regexp which captures all package_ids installed by this
   cask; homebrew-cask will list all files installed under these ids and
   remove them
 - `:launchctl`: a list of bundle_ids for services that should be
   removed by homebrew-cask
 - `:files`: a fallback list of files to manually remove; helps when
   uninstallers miss something

refs #661
2013-07-21 22:01:38 -05:00
Michael Ford 6b5c1af440 Correct Adium URL to fix failing unit test 2013-07-21 21:24:27 +08:00
Shane Delmore 489dfa49b2 Adding absolute cask location test 2013-07-17 10:10:03 -07:00
Shane Delmore 429eb80cbe Adding support for local casks outside of the casks directory 2013-07-16 15:12:16 -07:00
Robert Curth ba52f6377e [#583] Auditing of cask download and checksums
closes #688
2013-07-07 09:06:02 -05:00
Keith Smiley 6404f82d09 Verify appdir after reading command line opts
Helps prevent default appdir from being created regardless of whether
the user configured it or not.

Closes #496
2013-06-15 20:13:05 -05:00
James Anderson 11a2af136e Update cask template with shortened link syntax 2013-05-29 06:33:05 -07:00
phinze 71c97bb2e4 support new one-arg link syntax
refs #304

going forward, casks should use

    link 'Foo.app'

rather than

    link :app, 'Foo.app'
2013-05-23 21:03:37 -05:00
Paul Hinze 9835591935 whoops! pass down force argument to installer
this was preventing the `brew cask install --force cask` syntax from
working

the test was wrong too - corrected that so now we're covered from future
breakage

refs #329
2013-05-14 18:08:59 -05:00
Paul Hinze 17026b6e93 don't reinstall already installed casks
thanks to @ccutrer for the catch; this implementation is based on his PR

refs #233
2013-05-11 23:32:17 -05:00
Paul Hinze 3991bd6839 a beta pkg installer
- the vagrant cask is our guinea pig
- works for me
- only basic testing at the moment
- i wanted to push something to get the gears turning on this

it turns out the concept is pretty simple. specify a list of pkgs to
install; borrow the patterns from linkables for that. then basically
just run "sudo installer"

refs #14
2013-05-11 23:01:59 -05:00
phinze fed2824c7f add bona fide `brew cask create` command
the create command opens up an editor with template to get started

remove --create override flag from `brew cask edit`

hopefully this will be more straightforward for contributors

refs #306
2013-05-11 19:24:17 -05:00
pangratz 5b22534368 Update CONTRIBUTING to reflect newer style guides
Specify that the SHA-1 checksum shall be used and that the name of the
linked app must be specified via `link`

closes #293
2013-05-11 18:55:51 -05:00
phinze 43296f201a whoops; missed a spot 2013-05-11 14:21:01 -05:00
phinze a8b343b869 fix github links in `brew cask info`
refs #294
2013-05-11 14:02:53 -05:00
phinze ce94c6de2a update alfred linking to work with Alfred 2.0
i'm not going to worry about backwards compatibility with Alfred 1.X -
forward to the future!

closes #18
2013-05-11 13:53:10 -05:00
phinze 04e3ef186f remove coveralls - no 1.8 support :( 2013-04-28 17:10:24 -05:00
phinze 9236a74393 lets try coveralls.io 2013-04-28 16:50:54 -05:00
phinze d4cecf35c9 programmatically modify alfred scope
refs #18
2013-04-28 13:56:26 -05:00
phinze 0de91ed257 exclude __MACOSX dir when unzipping
should take care of #222
2013-04-28 11:38:09 -05:00
phinze 7a1a6a9308 support for caveats
i.e. custom messages printed after installing a cask

refs #218
2013-04-28 11:10:06 -05:00
phinze 021c6afb73 allow linkables to be set to none
sometimes it doesn't make sense for a cask to link anything out to the
Applications dir
2013-04-28 11:10:06 -05:00
Vince Cima 3f35ac095e brew cask audit will now throw a warning for any formula hosted on SourceForge that doesn't use desired URL format 2013-04-20 00:16:57 -04:00
phinze 3a20b320d0 fix issue where linkapps would double symlink
since ln was not using the -h it was following the target symlink
destination and deciding it was a destination directory. madness
ensued.

also test cleanup and more output and change linkables to use sets
2013-04-13 18:17:20 -05:00
phinze 6cb1afa246 add unlinkapps for cli access to revert linkapps 2013-04-13 14:17:00 -05:00
phinze e16e1622c0 automatically link on install / unlink on uninstall 2013-04-13 14:10:37 -05:00
phinze 74bdbd8f10 Merge branch 'apps-in-spotlight'
Closes #188
Closes #99
2013-04-12 08:30:15 -05:00
phinze 3b416ce7b5 add audits into the build process
this way travis will be able to cover incoming pull requests of new
casks by running the audit on them. cool!

also:

- add checksums to audit
- fix missing checksums
2013-04-07 14:30:09 -05:00
phinze d92ca8fefd move Caskroom into opt for spotlight goodness 2013-04-07 12:56:55 -05:00
phinze 1585d52ddc linkapps 2.0 2013-04-07 12:56:55 -05:00
phinze 028f103131 missed a spot 2013-04-07 12:50:41 -05:00
phinze 7bc2db2979 build fixes 2013-04-07 12:46:35 -05:00
phinze 2427fd6dd5 make the Cask DSL resilient to unexpected methods
will help with introducing and removing features, since the Cask
definitions move with every `brew update` and track master but the code
to handle them requires an explicit release and a `brew upgrade brew-cask`

relates to #179
2013-04-07 12:04:39 -05:00
phinze 9f9849134f a quixotic journey to a passing travis build
Squashed commit of the following:

commit 379d19d38da69a25f2ddf0b802a2e1c9cd2e40df
Author: phinze <paul.t.hinze@gmail.com>
Date:   Fri Apr 5 02:04:56 2013 -0600

    concat out+err?

commit 3414556d5e494c89a1b91322be666df9933d29f2
Author: phinze <paul.t.hinze@gmail.com>
Date:   Fri Apr 5 01:59:06 2013 -0600

    switch to capture_subprocces_io

commit d50a878bf20892db4d136530ff64e5cb94fe3ae4
Author: phinze <paul.t.hinze@gmail.com>
Date:   Fri Apr 5 01:42:41 2013 -0600

    ensure later version of minitest

commit 49078c48b024e1f1ed1b5d9785de60ec050ee261
Author: phinze <paul.t.hinze@gmail.com>
Date:   Fri Apr 5 01:30:12 2013 -0600

    pull down a newer minitest

    hopefully to fix must_output

commit 537b5ddd22de57f0fff812646a03b982725dfa23
Author: phinze <paul.t.hinze@gmail.com>
Date:   Fri Apr 5 01:24:53 2013 -0600

    run a brew update in the build

commit 1516456663f8840f5ffc22345e140c0b5aa23c96
Author: phinze <paul.t.hinze@gmail.com>
Date:   Fri Apr 5 01:22:31 2013 -0600

    remove stray puts

commit 4c8f8348f88ffd8eafd7a1f948f70dfbc881b416
Author: phinze <paul.t.hinze@gmail.com>
Date:   Fri Apr 5 01:16:10 2013 -0600

    add expand_path to see if that helps

commit c6e8aa160dd4c778497de4dca8f90f4519d76bd4
Author: phinze <paul.t.hinze@gmail.com>
Date:   Fri Apr 5 01:13:22 2013 -0600

    add debugging output for travis
2013-04-05 02:08:51 -06:00
phinze bf33643526 create casks with `brew cask edit foo --create` 2013-04-04 16:24:26 -06:00
phinze 0fbe7a1a8d rework Cask.path so it can return hypothetical paths
introduces the concept of a default_tap which is where we assume cask
paths that do not exist will end up

this is plumbing to support the incoming `cask edit foo --create`
feature
2013-04-04 15:55:07 -06:00
phinze aa0a931f1b homebrew testing_env now defines HOMEBREW_LIBRARY yay 2013-04-04 15:53:38 -06:00
phinze b156c04b84 basic tests around edit 2013-04-04 14:24:28 -06:00
phinze d8583ba649 kill homebrew submodule; call out to system one 2013-04-04 14:24:01 -06:00
phinze 6ac7b48ce2 fix broken info tests
prevent future breakage by relying on testcasks instead of live ones
2013-04-04 14:10:44 -06:00
Paul Hinze e702a69b28 so long content_length
closes #131
2013-03-13 13:13:37 -05:00
Paul Hinze 78834bfbd0 extract link checker from audit process
did not duplicate content lentgh check in preparation for the removal of
content_length as discussed in #131
2013-03-13 12:41:16 -05:00
phinze 0dbb81b0e1 rename 'open' -> 'home' to match homebrew
closes #167
2013-02-22 16:32:02 -06:00
phinze ff80676b29 add `brew cask info` command
thanks to @passcod for original implementation on his fork

refs #72
2013-02-17 14:25:23 -06:00
phinze f866a18725 add `brew cask open` command
thanks to @passcod for original implementation on his fork

refs #72
2013-02-17 14:07:59 -06:00
phinze 9189bd5be6 Out of the Cellar, into the Caskroom
Install casks into HOMEBREW_PREFIX/"Caskroom" instead of the Cellar.
This prevents us from colliding with normal Homebrew Formulae.

NOTE: this will be a breaking change, with the following effects:

- all installed casks will no longer be reported as installed
- orphans all existing casks in the Cellar
- no automated facility for cleanup or migration of existing casks

refs #38, where we can discuss the implications of this before cutting a
new release
2013-02-17 12:54:44 -06:00
Mikko Kouhia d36b9ffdda Update test cask
Test cask previously contained only attributes `url`, `homepage` and
`version`.  Add also `content_length` and `sha1`.
2013-01-06 13:46:04 +02:00