Commit Graph

81 Commits

Author SHA1 Message Date
phinze 3522952f22 clarify install sudo message
since we actually will use sudo if we have an installer
2013-05-27 10:35:44 -05: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 92dbff9b5f use absolute path to ln when linking
this is an attempt to avoid GNU `ln`, which is sometimes installed on
macs by users sick of dealing with the subtle differences of BSD tools
from the rest of the known universe.

refs #328
2013-05-14 12:28:50 -05:00
Paul Hinze a89494860a check for cask before unlinking during uninstall
this was exposed in #313 by @vitorgalvao in his attempt to update the
anvil cask; by adding a link to that cask, (which just so happens to be
the cask that we chose for our "already uninstalled message" test).

the fix is simply to move the "already uninstalled" check *before* we
start to unlink.
2013-05-12 19:55:30 -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
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 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
Félix Saparelli dfd4ab2947 Fix linking error when .app filenames have spaces 2013-04-13 13:42:25 +12:00
phinze 37761138ea recursively chown caskroom dirs when creating
fixes #199
2013-04-12 10:09:46 -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 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 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 bdd6ead535 parens to fix syntastic warning 2013-04-04 15:52:50 -06:00
phinze b156c04b84 basic tests around edit 2013-04-04 14:24:28 -06:00
Paul Hinze e702a69b28 so long content_length
closes #131
2013-03-13 13:13:37 -05:00
Paul Hinze 93b63bd583 clean up and pull out link checker / audit common code 2013-03-13 13:03:12 -05:00
Paul Hinze 972ed76799 add fake HTTP HEAD checking for google code URLs
this allows google code urls to pass link checking.

refs #131
2013-03-13 12:42:54 -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
Paul Hinze fca6c49beb Merge pull request #117 from passcod/options-support
Add options to the cli
2012-12-19 22:51:40 -08:00
Félix Saparelli 5ad6796bcd Add options to the cli
Options can be passed on the command-line and/or using
the HOMEBREW_CASK_OPTS environment variable (which has
lowest priority). There is a single --appdir=PATH option
right now, but this commit enables future awesomeness!

Other minor changes:

* `brew cask help` now returns the same thing as `brew cask`
  instead of saying there was “no such command as help”.

* The HEREDOC block now uses Homebrew's #undent instead of the
  customed-rolled #gsub version. Cleaner and more flexible.

* `Cask.set_appdir` has been renamed to `Cask.appdir=`. This
  is more Rubyish, and of little consequence (the only place
  it was previously used was in the tests).
2012-12-19 00:54:49 +13:00
phinze 0d1f831b79 Add checksum support to Casks.
`md5`, `sha1`, `sha256` all take a hexdigest string, e.g:
sha1 'f645e9da45a621415a07a7492c45923b1a1fd4d4'

`no_checksum` takes no argument, and indicates there is no checksum
for this cask. This is *not recommended*, and should only be used for
casks that have no versioned downloads.

`brew cask install` will complain if there is no sum provided (unless
`no_checksum` has been invoked), or if the sums do not match. It will
provide the computed checksum so the cask can be easily amended.

Adapted from @passcod's work in 82cc199ae6
2012-12-17 17:04:22 -07:00
phinze f1221be6c2 double gsub to properly get title for BootXChange
thanks to @passcod for this
2012-12-17 17:00:35 -07:00
phinze 97b715b27d demockify actions_tests 2012-11-25 15:49:16 -06:00
phinze c96ea20317 get linkapps tests de-mockified 2012-11-25 15:49:16 -06:00
phinze 3ad61a5d56 halfway through ripping out mocha 2012-11-25 15:49:09 -06:00
phinze 3ac3ae6360 fix linkapps and cleanup output
damn i'm getting burned by mocking in my tests - going to have to fix
something here
2012-11-21 17:53:15 -06:00
phinze 259ed643f9 fix dmg plist parsing problem
should take care of #104

this was a subtle one - after i reorganized the requires, plist/parser
was getting double required, which broke plist parsing and hence dmg
installs
2012-11-21 16:12:45 -06:00
phinze 2a22a74415 fix broken cask list 2012-11-20 10:21:28 -06:00
phinze 30b43437ab fix requires via modified libdir
should address #103
2012-11-20 09:00:42 -06:00
phinze 2f99d29693 brew cask audit
for a given cask:
 - checks required fields
 - checks URL responds successfully
 - checks content_length specified
2012-11-18 23:12:21 -06:00
phinze e2d074e216 separate Cask.all_titles from Cask.all 2012-11-18 23:11:22 -06:00