pivotal-sprout/sprout — pull request #72 by sambao21 (2013-07-21 21:46:25+00:00)
Title: Homebrew cask recipe and LWRP

Using [homebrew cask](https://github.com/phinze/homebrew-cask) to install apps is stupid simple, and it follows the same wonderful patterns that homebrew laid out.

I am going to use homebrew cask to do my own application installs in my workstation, and thought you guys might be interested in this.

I added a recipe to install cask using homebrew. I also added a resource in sprout-osx-apps to use cask.

Install an app that's supported by homebrew cask, simply add the line: `sprout_osx_apps_homebrew_cask {package_name}`

Only installs the app if it's not installed.

Cask [installs applications](https://github.com/phinze/homebrew-cask/blob/master/FAQ.md#why-use-homebrews-cellar-why-not-just-manage-apps-directly-in-applications) into it's own *caskroom directory* instead of directly into Applications.

It then symlinks to the application. By default homebrew_cask resource default symlinks to `/Applications`.

sprout_osx_apps_homebrew_cask 'google-chrome' #default, will symlink chrome in /Applications

This option can be overridden using the `opts` attribute.

sprout_osx_apps_homebrew_cask 'google-chrome' do
opts "--appdir=~/Applications" #will symlink chrome into the user's Applications
end

Anyways, thought I'd submit a PR and let you guys decide if you want to use homebrew cask or not. It sorta gives you less control i.e. controlling versions, but I figure that implementation is abstracted away now, and it would exist in cask itself instead of sprout recipes.

I'd understand if you guys rather keep all the control instead of relying on cask. This just greatly simplified some of the recipes that I've had to write for personal apps i.e. google video and sonos, so I just thought I'd share it with you guys.

I'm also considering if this wouldn't be better to just contribute to the community homebrew cookbook.