Commit graph

40 commits

Author SHA1 Message Date
Robert Curth
ba52f6377e [#583] Auditing of cask download and checksums
closes #688
2013-07-07 09:06:02 -05:00
Vítor Galvão
d933cf3b32 Merge pull request #385 from jamesaanderson/cask-template
Update cask template with shortened link syntax
2013-05-30 04:54:30 -07:00
Kristoffer Sachse
ea5149cde9 Fix typo in usage explanation 2013-05-30 09:58:49 +03:00
James Anderson
11a2af136e Update cask template with shortened link syntax 2013-05-29 06:33:05 -07: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
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
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
1585d52ddc linkapps 2.0 2013-04-07 12:56:55 -05:00
phinze
bf33643526 create casks with brew cask edit foo --create 2013-04-04 16:24:26 -06:00
phinze
b156c04b84 basic tests around edit 2013-04-04 14:24:28 -06: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
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
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
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
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
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
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
501d1bad58 consistently quote shell commands to handle spaces
addresses issues brought up in #34
2012-10-10 13:18:41 -05:00
phinze
cf2470b96a fix a little typo that got in linkapps' way 2012-10-05 10:48:13 -05:00
Félix Saparelli
f9ac30cf2d Fix broken linkapps command 2012-10-06 03:08:32 +13:00
Félix Saparelli
4de758bca3 Add tap support to edit and list
Most notably, Cask.all returns an array of strings,
not of Cask instances. This makes things easier, as
well as faster, as there's no need to run map(&:to_s)
everywhere anymore.

self.path is a utility method which returns the path
of the cask from its title. There's something subtle
going in there:

 - If `cask_title` is fully qualified, e.g.
   "phinze-cask/alfred", it's straightforward.

 - If `cask_title` is only the name, e.g.
   "firefox-aurora", the name is matched from
   the full list (self.all) (which isn't sorted)
   and the first result is returned.

Hence, self.path with only the name is not precise.
There might be the possibility to apply heuristics
to do a better match (prefer phinze-cask, or maybe
installed casks?) but that's for another issue :-)

self.nice_listing is another utility method used
in `search` and `list`. It returns a list where
unique casks don't have a prefix, and duplicates
do. The prefix is the tap name. The list is then
sorted. For an example or two, look at the first
comment on phinze/#12.
2012-09-24 16:10:51 +12:00
Félix Saparelli
5b51542ccf Use puts_columns 2012-09-24 16:10:51 +12:00
Félix Saparelli
4a6e0b2513 Sort search results 2012-09-24 16:10:50 +12:00
Félix Saparelli
3d3207bf5d Add basic taps functionality; partial phinze/#12 support
Instead of only listing `Taps/phinze-cask/Casks`, now list
every taps that has a `Casks` directory. Might conflict with
a few commands for the moment, works OK with `brew cask search`.
2012-09-24 16:10:50 +12:00
phinze
b45974c224 support brew cask edit 2012-09-21 23:32:19 -05:00
phinze
5a0d1d5556 quick sketchy first release of code/ideas
this is a first draft of an idea i've had kicking around for awhile

pushing out some code so i can get a conversation started
2012-03-09 22:43:50 -06:00