Commit graph

30 commits

Author SHA1 Message Date
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
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
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
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
9236a74393 lets try coveralls.io 2013-04-28 16:50:54 -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
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
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
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
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
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
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 82cc199ae6bbb1e98950e71a0573ab48e6a641ee
2012-12-17 17:04:22 -07:00
phinze
97b715b27d demockify actions_tests 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
ef25273d96 allow test suite to be run without internet 2012-11-21 15:51:03 -06:00
phinze
2a22a74415 fix broken cask list 2012-11-20 10:21:28 -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
ab57da07ea add brew cask uninstall
this delegates to homebrew's uninstall to get its work done. vanilla
`brew uninstall` actually works, but this gives us a more consistent
interface.

as discussed in #47
2012-10-20 13:01:41 -05:00
phinze
96cff81979 have linkapps recognizes apps in subdirs
should address #33

includes cleanup and tests

i'm not crazy about leaning on installing/uninstalling caffeine in the
tests. it makes for some unnecessarily heavy tests and downloads. but
i'd rather get tests in place first then fix the warts.
2012-10-15 18:28:36 -05:00