Commit Graph

515 Commits

Author SHA1 Message Date
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 e2d074e216 separate Cask.all_titles from Cask.all 2012-11-18 23:11:22 -06:00
phinze 9e509d289b uninstall no longer depends uses homebrew
- should make tests a bit more reliable
2012-11-18 12:17:50 -06:00
phinze 3539767745 fix uninstall to work with multiple casks at once
homebrew does internal caching in ARGV that prevents us from doing the
`ARGV.clear; ARGV << 'newarg'` trick twice.

rather than try to further reach in to homebrew's innards, i figure it's
better to just pass multiple arguments down to homebrew code at once,
since it already supports that

refs #47
2012-10-20 13:34:11 -05: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 c40dc63737 fix typo in Cask.init :(
💩 this is what i get for doing things outside of test coverage

added a smoke test this time
2012-10-15 19:25:35 -05:00
phinze 9b2f2c7ecd allow `brew cask linkapps` to accept arguments
arguments scope linkapps command to just those casks

also added unit tests around the CLI code - whee!
2012-10-15 18:45:55 -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
phinze 1a7e278935 a bona fide cask install test; and more splitting
I chose Caffeine since it's relatively small to download. Eventually I'd
like to switch this up so we bundle a dmg, zip, etc that the test suite
wires in to verify that we do the Right Thing (tm) with all those file
types. Probably will want to support `file://` URLs in Casks to help us
for that use case.
2012-10-13 16:48:25 -05:00
phinze a0434184b0 basic testing and separation of the Cask DSL 2012-10-13 16:30:59 -05:00
phinze f35cda322c add test coverage and start to split up cask.rb
ahhhhh the joys of refactoring under test coverage
2012-10-13 16:17:52 -05:00
phinze 550ea38adc mkdir HOMEBREW_CACHE to allow downloads in tests 2012-10-13 16:17:27 -05:00
phinze ab564ef254 handle multiple casks with install
should address #52

includes better error handling if a nonexistent cask is referenced

first test-driven commit, suckas!
2012-10-13 15:28:59 -05:00
phinze cd70474aa9 moving back from spec/ -> test/
since various tooling keeps guessing we're using rspec
2012-10-13 15:24:45 -05:00