From 3b9e91240ecbcf1c8ed4fadbefee2a8681f9f4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Fri, 7 Dec 2012 13:40:28 +1300 Subject: [PATCH 01/17] Summarise planned changes --- README.md | 166 ++++++++---------------------------------------------- 1 file changed, 24 insertions(+), 142 deletions(-) diff --git a/README.md b/README.md index 850fde8299710..99ab20742f988 100644 --- a/README.md +++ b/README.md @@ -1,142 +1,24 @@ -# "To install, drag this icon..." no more! - -Let's see if we can get the elegance, simplicity, and speed of Homebrew for the -installation and management GUI Mac applications like Google Chrome and Adium. - -`brew-cask` provides a friendly homebrew-style CLI workflow for the -administration of Mac applications distributed as binaries. - -It's implemented as a `homebrew` "[external -command](https://github.com/mxcl/homebrew/wiki/External-Commands)" called -`cask`. - -# Let's try it! - -## Get brew-cask - -First ensure you have Homebrew version '0.9' or higher: - - $ brew --version - 0.9.3 - -Tap this repository and install the `brew-cask` tool: - - $ brew tap phinze/homebrew-cask - $ brew install brew-cask - -## Now let's install our first Cask - -Let's see if there's a Cask for Chrome: - - $ brew cask search chrome - google-chrome - -Cool, there it is. Let's install it. - - $ brew cask install google-chrome - Downloading... - Success! google-chrome installed to /usr/local/Cellar/google-chrome/stable-channel - -Now we have `Google Chrome.app` in our Cellar. Cool. - -If you like, it's easy to get it linked somewhere more visible (see ["Alfred -Integration"](#alfred-integration) below for an idea that makes this step -unnecessary): - - $ brew cask linkapps - /Users/phinze/Applications/Google Chrome.app -> /usr/local/Cellar/google-chrome/17.0.963.56/Google Chrome.app - -And there we have it. Google Chrome installed with a few quick commands; no clicking, no dragging, no dropping. - - open "~/Applications/Google Chrome.app" - -# What Casks are available? - -Just run `brew cask search` with no arguments to get a list. - -# How do I update brew-cask? - -Since this repository is a Tap, you'll pull down the latest Casks with a simple -`brew-update`. When the `brew-cask` tool itself is updated, it will show in -`brew outdated` and you can upgrade it via the normal Homebrew workflow. - -# What is a Cask? - -A `Cask` is like a `Formula` in Homebrew except it describes how to download -and install a binary application. - -Casks currently have three fields: - - * __url__: (required) points to binary distribution of the application - * __version__: (required) describes the version of the application available at the URL - * __homepage__: the same as Homebrew's - it doesn't do anything yet, but will be wired in - -# What's the status of this project? Where's it headed? - -It's really just a start at this point, but it works, and I've got big plans! - -`brew-cask` currently understands how to install `dmg` and `zip` files that -contain a `.app` file. I'd like to extend it to be able to handle `pkg` files -as well as the numerous other permutations of compression and distribution in -the wild (`.app` inside `dmg` inside `zip`; folder inside `dmg`; etc.). - -I plan to use the `Cask` model to allow per-project customization of behavior, -like Homebrew does with `Formula`. This would allow weirdo applications like, -say, Eclipse ("you really want me to drag that whole *folder* to -`Applications`? ew.") to contain their complexity. - -Each Cask will then encapsulate and automate the story of how a given -application should be installed. If all goes well - I'm hoping to build up a -community-maintained collection of Casks that becomes the standard way that -hackers install Mac apps. - -# Can I contribute? - -__Yes, yes, yes!__ Please fork/pull request to update Casks, to add features, -to clean up documentation--anything at all that you can do to help out is very -welcome. - -It's also __pretty darn easy__ to create Casks, so please build more of them -for the software you use. And if `brew-cask` doesn't support the packaging -format of your software, please open an issue and we can get it working -together. - -The whole idea is to build a _community-maintained_ list of easily installable -packages, so the community part is important! Every little bit counts. - -# Taps - -You can add Casks to your existing (or new) taps: just create a directory named -`Casks` inside your tap, put your Casks there, and everything will just work. - -# Alfred Integration - -I've been using Casks along with Alfred to great effect. Just add -`/usr/local/Cellar` as a Search Scope in Alfred's preferences, and then -applications become available in Alfred immediately after a `brew cask -install`. Your fingertips will thank you. - -With this setup, you don't actually need `brew cask linkapps` if you always -open your apps from Alfred. This means that everything stays nice and tidy. - -Oh, and you can `brew cask install alfred` too! Not bad, eh? - -# Why use Homebrew's Cellar? Why not just manage apps directly in `Applications`? - -The short answer to this would be: for the same reason that Homebrew does not -install applications directly into `/usr/local`. - -We don't know up-front precisely what files are going to be in the -dmg/zip/tgz/etc, so it's really helpful to have a place to dump all of them -safely then iterate through and act on the files we care about. For a `.app` -file this may be symlinking it into `~/Applications` or `/Applications`, for a -`.pkg` file this might be running the installer. For a screensaver it may be -symlinking it into the appropriate directory for it to show up in System -Preferences. - -The reason I implemented this project on top of Homebrew was because I believe -that their methodology for managing applications has a lot of merit. I'd prefer -to try and work things so that we can keep ourselves Homebrewy both in -implementation and idioms. Trying to manage all of `~/Applications` would move -the project more towards a standalone system, which would mean reimplementing a -lot of the Homebrew stuff we lean on now. +Homebrew Casks +============== + +This project's main development is at: +https://github.com/phinze/homebrew-cask + + +Installation Revamp +------------------- + +This fork/branch is testing out a radically different way +of installing Casks. It develops ideas exposed in the +following issues: + +- [#113](https://github.com/phinze/homebrew-cask/issues/113) — Uninstalling removes symlinks/aliases/shortcuts +- [#105](https://github.com/phinze/homebrew-cask/issues/105) — Features to help manage multiple .app folders +- [#99](https://github.com/phinze/homebrew-cask/issues/99) — Spotlight visibility +- [#89](https://github.com/phinze/homebrew-cask/issues/89) — Don't make `brew doctor` complain +- [#72](https://github.com/phinze/homebrew-cask/issues/72) — Features for metadata +- [#38](https://github.com/phinze/homebrew-cask/issues/38) — Moar configuration +- [#30](https://github.com/phinze/homebrew-cask/pull/30) — Config: install/link path +- [#41](https://github.com/phinze/homebrew-cask/issues/41) — Better version management +- [#69](https://github.com/phinze/homebrew-cask/issues/69) — Features for installing different types +- [#82](https://github.com/phinze/homebrew-cask/issues/82) — Checksums From eb7094cc0dbe6698f2793a49c7a8be18dec5d935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Fri, 7 Dec 2012 16:53:50 +1300 Subject: [PATCH 02/17] Add code map --- MAP | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 10 +++++++ 2 files changed, 90 insertions(+) create mode 100644 MAP diff --git a/MAP b/MAP new file mode 100644 index 0000000000000..fc703e606b42a --- /dev/null +++ b/MAP @@ -0,0 +1,80 @@ +0 | + FILES | PATHWAYS + -------- | ----------- + | + /bin/brew-cask.rb | How a CLI command gets run: Installing a cask: + +-----------------+ | +---------------------+ + | CLI entry point | | +-------------------+ +--------------------+ +->| If it's an archive: | + +-----------------+ | | /bin/brew-cask.rb | | Cask::CLI::Install | | | | + | +-------------------+ | .run() | | | * dmg | + /brew-cask.rb | -- * --------- * -- +--------------------+ | | * zip | + +------------------+ | | | --------- * -------- | | * tar | + | Homebrew formula | | v v | | | * tar+bzip | + +------------------+ | +---------+ +------------+ +-------+---------+ | | * tar+gzip | + | | require | | Cask::CLI | | * | | +--------------+------+ + /Casks/ | | "cask" | | .process() | | Cask | .load() | | | + +---------------+ | +---------+ | * * | +-------+---------+ | v + | Casks Library | | +-+------+---+ | | +------------------+ + +---------------+ | | | v | | Extract and | + | +-------+ +---+ +----------------------+ | | copy to Cellar | + /Gemfile | | | | Cask::Installer | | +----------+-------+ + /Rakefile | v +---------+----------+ | .install() | | | + /test/ | +------------+ | self. * | +--------+-------------+ | | + +----------------+ | | Cask.init | | lookup_ | _command | | | +-----*-----+ + | Used for tests | | | | +---------+----------+ | | |+---------+| + +----------------+ | +------------+ | v | || DONE. || + | +---------+-------+ +------------------------+ | |+---------+| + /lib/plist/ | | | | >CURL< | | + +---------------------+ | v <-fallback-+ v +------------------------+ | +-------------------+ + | PList parser | | +-------------+ +-+----------+ | CurlDownloadStrategy | +->| Otherwise: | + | ------------- | | | NullCommand | | Cask::CLI | | ^ | | | | + | Pulled from github: | | | .new() * | | const_get *| | +--- SoftwareSpec | | | > Ignore silently.| + | bleything/plist | | +----------+--+ +-----------++ | | | +-------------------+ + +---------------------+ | | | +------------------------+ | + | +--------+------------+ | Uses properties: | | + /lib/cask* | | | | | + +------------------------+ | | | * title | | + | The Meat of the Matter | | +----*-----+ | * url | | + +------------------------+ | |+--------+| | * version | | + | || .run() || +------------+-----------+ | +------------------------------+ |+--------+| | | + +--------------+ + + + + Uninstalling a cask: Listing/Searching casks: + + +----------------------+ +-----------------+ +-------------------+ + | Cask::CLI::Uninstall | | Cask::CLI::List | | Cask::CLI::Search | + | .run() | | .run() | | .run() | + +----------------------+ +-----------------+ +-------------------+ + --------- * ---------- ---------------- * ------------------ + | | + +-------+---------+ v + | * | +------------------------------+ + | Cask | .load() | | Cask.all_titles | + +-------+---------+ +------------------------------+ + | | All: Taps/*/Casks/*.rb *-+ | + v | | | + +----------------------+ | +- <----- map <---------+ | + | Cask::Installer | | | | + | .uninstall() | | +--> From: | + +------------+---------+ | Taps/example/Casks/cask.rb | + | | | + v | To: example/cask | + +---------------+ +---+--------------------------+ + | Remove entire | | + | tree in | | +----------------------+ + | Cellar | +->| Filter by installed | + +---------------+ | or keywords… or not +-+ + ---- DONE. ---- +----------------------+ | + v + +----------------+ + | Pretty listing | + +----------------+ + ----- DONE ----- + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 99ab20742f988..0b2ed8d6ebfc6 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,13 @@ following issues: - [#41](https://github.com/phinze/homebrew-cask/issues/41) — Better version management - [#69](https://github.com/phinze/homebrew-cask/issues/69) — Features for installing different types - [#82](https://github.com/phinze/homebrew-cask/issues/82) — Checksums + + +Code maps +--------- + +I've also spent (and am still spending) some time creating +code maps to visualize how it all works. Here they are: + +> ![Map 0](http://i.imgur.com/5YDBO.png) +> Incomplete map. Vanilla phinze/cask v.0.5.4 \ No newline at end of file From a84a1ed86e393b79a67b2e80659f4fda5ed4aa56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Fri, 7 Dec 2012 20:07:10 +1300 Subject: [PATCH 03/17] Complete code map for vanilla --- MAP | 117 +++++++++++++++++++++++++++++++++++------------------- README.md | 4 +- 2 files changed, 79 insertions(+), 42 deletions(-) diff --git a/MAP b/MAP index fc703e606b42a..17de7bee46889 100644 --- a/MAP +++ b/MAP @@ -1,4 +1,4 @@ -0 | +1 | FILES | PATHWAYS -------- | ----------- | @@ -27,7 +27,7 @@ /lib/plist/ | | | | >CURL< | | +---------------------+ | v <-fallback-+ v +------------------------+ | +-------------------+ | PList parser | | +-------------+ +-+----------+ | CurlDownloadStrategy | +->| Otherwise: | - | ------------- | | | NullCommand | | Cask::CLI | | ^ | | | | + | ------------- | | | NullCommand | | Cask::CLI | | | | | | | | Pulled from github: | | | .new() * | | const_get *| | +--- SoftwareSpec | | | > Ignore silently.| | bleything/plist | | +----------+--+ +-----------++ | | | +-------------------+ +---------------------+ | | | +------------------------+ | @@ -38,43 +38,80 @@ +------------------------+ | |+--------+| | * version | | | || .run() || +------------+-----------+ | ------------------------------+ |+--------+| | | - +--------------+ - + | +--------------+ + EXCEPTIONS | + ------------- | + | + CaskNotInstalledError | Uninstalling a cask: Listing/Searching casks: Linkapps + | + < RuntimeError | +----------------------+ +-----------------+ +-------------------+ +---------------------+ + | | Cask::CLI::Uninstall | | Cask::CLI::List | | Cask::CLI::Search | | Cask::CLI::Linkapps | + Param: cask (Cask) | | .run() | | .run() | | .run() | | .run() | + | +----------------------+ +-----------------+ +-------------------+ +---------------------+ + | --------- * ---------- ---------------- * ------------------ --------- * --------- + | | | | + CaskUnavailableError | +-------+---------+ v +-------+---------+ + | | * | +------------------------------+ | * | + < RuntimeError | | Cask | .load() | | Cask.all_titles | | Cask | .load() | + | +-------+---------+ +------------------------------+ +-------+---------+ + Param: cask_name (String) | | | All: Taps/*/Casks/*.rb *-+ | | + | v | | | Err, that's kinda v +------------------------------+ +----------------------+ | +- <----- map <---------+ | | badly named +-------------------------+ + | | Cask::Installer | | | | +------------> | #linkapps | + DSL | | .uninstall() | | +--> From: | Also, that +-------------------------+ + ------ | +------------+---------+ | Taps/example/Casks/cask.rb | method lives | List all .app files in | + | | | | in actions.rb | . and all subdirs (look | + * content_length | v | To: example/cask | :/ :S| in destination_path). | + | +---------------+ +---+--------------------------+ +-------------------------+ + (Basic content checking) | | Remove entire | | | For each: | + | | tree in | | +----------------------+ | | + * homepage | | Cellar | +->| Filter by installed | | > if symlink exists: | + | +---------------+ | or keywords… or not +-+ | * destroy and relink | + (For human use only atm) | ---- DONE. ---- +----------------------+ | | | + | v | > if not symlink: | + * url | +----------------+ | * do nothing, say so | + | | Pretty listing | | | + (To download archive) | +----------------+ | > else: | + | ----- DONE ----- | * create symlink in | + * version | | ~/Applications | + | +-------------------------+ + (For DL, but not rly used) | + | +------------------------------+ - Uninstalling a cask: Listing/Searching casks: - - +----------------------+ +-----------------+ +-------------------+ - | Cask::CLI::Uninstall | | Cask::CLI::List | | Cask::CLI::Search | - | .run() | | .run() | | .run() | - +----------------------+ +-----------------+ +-------------------+ - --------- * ---------- ---------------- * ------------------ - | | - +-------+---------+ v - | * | +------------------------------+ - | Cask | .load() | | Cask.all_titles | - +-------+---------+ +------------------------------+ - | | All: Taps/*/Casks/*.rb *-+ | - v | | | - +----------------------+ | +- <----- map <---------+ | - | Cask::Installer | | | | - | .uninstall() | | +--> From: | - +------------+---------+ | Taps/example/Casks/cask.rb | - | | | - v | To: example/cask | - +---------------+ +---+--------------------------+ - | Remove entire | | - | tree in | | +----------------------+ - | Cellar | +->| Filter by installed | - +---------------+ | or keywords… or not +-+ - ---- DONE. ---- +----------------------+ | - v - +----------------+ - | Pretty listing | - +----------------+ - ----- DONE ----- - - - - - \ No newline at end of file + Editing a cask: Creating a cask: Auditing a cask: +------------------------+ + +--> | Check required fields: | + +-----------------+ +------------------+ | | | + | Cask::CLI::Edit | +-- There is a file --+ | Cask::CLI::Audit | | | * url | + | .run() | | | | .run() | | | * version | + +-----------------+ lib/cli/create.rb +------------------+ | | * homepage | + ------- * ------- | | -------- * ------- | +------------------------+ + | +-- but it's empty. --+ | | + +-------+-------+ +--------+-------+ | +-------------------------+ + | * | | * | +--> | Check URL is valid, | + | Cask | .path | | Cask | .load | | | that the scheme:// | + +-------+-------+ +--------+-------+ | | is known, and that | + | | | | content_length matches.| + v v | +-------------------------+ + +----------------+ +-----------------+ | + | Cask formula |NO +-------+ | Cask::Auditor | | +--------------------------+ + | exists ? +--->| Error | | .audit() | +--> | Don't just stop at first | + +-------+--------+ +-------+ +-----------------+ | | error, create summary | + | | This is just a | | | of all of them. | + v YES | proxy for | | +--------------------------+ + +---------+ | Cask::Audit#run!| | + | Open | +--------+--------+ | + | | | | + | $EDITOR | +----------+ + +---------+ + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index 0b2ed8d6ebfc6..863452fc03ebf 100644 --- a/README.md +++ b/README.md @@ -30,5 +30,5 @@ Code maps I've also spent (and am still spending) some time creating code maps to visualize how it all works. Here they are: -> ![Map 0](http://i.imgur.com/5YDBO.png) -> Incomplete map. Vanilla phinze/cask v.0.5.4 \ No newline at end of file +> ![Map 1](http://i.imgur.com/oBMyI.png) +> Vanilla phinze/cask v.0.5.4 \ No newline at end of file From d12789d4a577740d9ce589dacfe4dc788d8144d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sat, 8 Dec 2012 16:49:38 +1300 Subject: [PATCH 04/17] Echofon is discontinued --- Casks/echofon.rb | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 Casks/echofon.rb diff --git a/Casks/echofon.rb b/Casks/echofon.rb deleted file mode 100644 index 958c634e31b35..0000000000000 --- a/Casks/echofon.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Echofon < Cask - url 'http://file.echofon.com/twitter/mac/bin/Echofon_1.5.8.dmg' - homepage 'http://www.echofon.com/' - version '1.5.8' -end From 82cc199ae6bbb1e98950e71a0573ab48e6a641ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sat, 8 Dec 2012 19:13:12 +1300 Subject: [PATCH 05/17] Replace content_length with md5/sha1/sha256/no_checksum `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. --- Casks/adium.rb | 2 +- Casks/alfred.rb | 2 +- Casks/anvil.rb | 2 +- Casks/aquamacs.rb | 2 +- Casks/arq.rb | 2 +- Casks/at-monitor.rb | 2 +- Casks/back-in-time.rb | 2 +- Casks/bartender.rb | 2 +- Casks/bettertouchtool.rb | 2 +- Casks/boot-x-changer.rb | 2 +- Casks/brackets.rb | 2 +- Casks/caffeine.rb | 2 +- Casks/candybar.rb | 2 +- Casks/changes.rb | 2 +- Casks/chocolat.rb | 2 +- Casks/chromium.rb | 2 +- Casks/clip-menu.rb | 2 +- Casks/colloquy.rb | 2 +- Casks/cura.rb | 2 +- Casks/cyberduck.rb | 2 +- Casks/dia.rb | 2 +- Casks/disk-inventory-x.rb | 2 +- Casks/divvy.rb | 2 +- Casks/dropbox.rb | 2 +- Casks/emacs.rb | 2 +- Casks/firefox-aurora.rb | 6 +- Casks/firefox.rb | 6 +- Casks/fluid.rb | 2 +- Casks/flux.rb | 2 +- Casks/gephi.rb | 4 +- Casks/gfxcardstatus.rb | 2 +- Casks/gimp.rb | 2 +- Casks/github.rb | 2 +- Casks/gitx-l.rb | 2 +- Casks/gitx.rb | 2 +- Casks/gmail-notifr.rb | 2 +- Casks/google-chrome-canary.rb | 4 +- Casks/google-chrome.rb | 4 +- Casks/google-notifier.rb | 2 +- Casks/handbrake.rb | 2 +- Casks/handbrakebatch.rb | 2 +- Casks/hands-off.rb | 2 +- Casks/inkscape.rb | 4 +- Casks/intellij-community.rb | 2 +- Casks/intellij-ultimate.rb | 2 +- Casks/irip.rb | 2 +- Casks/istat-menus.rb | 2 +- Casks/iterm2.rb | 3 +- Casks/jumpcut.rb | 2 +- Casks/justlooking.rb | 2 +- Casks/keepass-x.rb | 4 +- Casks/keyboard-maestro.rb | 2 +- Casks/libre-office.rb | 2 +- Casks/little-snitch.rb | 2 +- Casks/livestation.rb | 2 +- Casks/macvim.rb | 2 +- Casks/makemkv.rb | 1 - Casks/menu-bar-filter.rb | 2 +- Casks/moom.rb | 2 +- Casks/namemangler.rb | 2 +- Casks/notational-velocity.rb | 2 +- Casks/nv-alt.rb | 4 +- Casks/one-password.rb | 2 +- Casks/open-office.rb | 2 +- Casks/paintbrush.rb | 2 +- Casks/pandora-jam.rb | 2 +- Casks/picard.rb | 2 +- Casks/plex.rb | 2 +- Casks/postgres.rb | 2 +- Casks/propane.rb | 2 +- Casks/quicksilver.rb | 2 +- Casks/racket.rb | 4 +- Casks/rdio.rb | 4 +- Casks/ringtones.rb | 2 +- Casks/ripit.rb | 4 +- Casks/rubymine.rb | 4 +- Casks/scrivener.rb | 2 +- Casks/seashore.rb | 2 +- Casks/sequel-pro.rb | 1 + Casks/shortcat.rb | 2 +- Casks/size-up.rb | 2 +- Casks/skype.rb | 2 +- Casks/slate.rb | 2 +- Casks/sourcetree.rb | 2 +- Casks/sparrow.rb | 2 +- Casks/spectacle.rb | 2 +- Casks/spotify.rb | 2 +- Casks/steam.rb | 4 +- Casks/sublime-text.rb | 2 +- Casks/tagalicious.rb | 4 +- Casks/textadept.rb | 1 + Casks/textmate1.rb | 2 +- Casks/textmate2.rb | 2 +- Casks/textwrangler.rb | 4 +- Casks/the-unarchiver.rb | 1 + Casks/thunderbird.rb | 2 +- Casks/time-machine-editor.rb | 2 +- Casks/transmission.rb | 2 +- Casks/transmit.rb | 2 +- Casks/tunewiki.rb | 2 +- Casks/tvmobili.rb | 3 +- Casks/u-torrent.rb | 2 +- Casks/virtualbox.rb | 2 +- Casks/vlc.rb | 2 +- Casks/woodhouse.rb | 4 +- Casks/x-quartz.rb | 2 +- Casks/xbmc.rb | 3 +- Casks/xscope.rb | 2 +- README.md | 35 ++++++++++ lib/cask.rb | 8 ++- lib/cask/audit.rb | 126 ---------------------------------- lib/cask/cli/install.rb | 4 ++ lib/cask/dsl.rb | 51 +++++++++----- lib/cask/exceptions.rb | 2 + lib/cask/installer.rb | 16 +++++ 115 files changed, 225 insertions(+), 268 deletions(-) delete mode 100644 lib/cask/audit.rb diff --git a/Casks/adium.rb b/Casks/adium.rb index 477546428aa60..8d43ad4b18fc7 100644 --- a/Casks/adium.rb +++ b/Casks/adium.rb @@ -2,5 +2,5 @@ class Adium < Cask url 'http://download.adium.im/Adium_1.5.3.dmg' homepage 'http://www.adium.im/' version '1.5.3' - content_length '23726161' + sha1 'ea16f7b65b8b37caa9025f4d68c0dd71845a4027' end diff --git a/Casks/alfred.rb b/Casks/alfred.rb index 53f90ca8dc794..cf6c65147feea 100644 --- a/Casks/alfred.rb +++ b/Casks/alfred.rb @@ -2,5 +2,5 @@ class Alfred < Cask url 'http://cachefly.alfredapp.com/alfred_1.3.1_261.dmg' homepage 'http://www.alfredapp.com/' version '1.3.1_261' - content_length '2706582' + sha1 '92bc216c0b0e1e49d4b98c33971274848ccbb4e1' end diff --git a/Casks/anvil.rb b/Casks/anvil.rb index 3720a427fea89..e76ca8a51eee3 100644 --- a/Casks/anvil.rb +++ b/Casks/anvil.rb @@ -2,5 +2,5 @@ class Anvil < Cask url 'http://anvilformac.com/download' homepage 'http://anvilformac.com/' version 'latest' - content_length '2322000' + no_checksum end diff --git a/Casks/aquamacs.rb b/Casks/aquamacs.rb index 4936f69c60cc1..8481ca706ea0b 100644 --- a/Casks/aquamacs.rb +++ b/Casks/aquamacs.rb @@ -2,5 +2,5 @@ class Aquamacs < Cask url 'http://braeburn.aquamacs.org/~dr/Aquamacs/24/Aquamacs-nightly.tar.bz2' homepage 'http://aquamacs.org/' version '3.x Nightly' - content_length '50220871' + no_checksum end diff --git a/Casks/arq.rb b/Casks/arq.rb index 6ae240a82e218..0212e2252addf 100644 --- a/Casks/arq.rb +++ b/Casks/arq.rb @@ -2,5 +2,5 @@ class Arq < Cask url 'http://www.haystacksoftware.com/arq/Arq.zip' homepage 'http://www.haystacksoftware.com/arq/' version 'latest' - content_length '9118163' + no_checksum end diff --git a/Casks/at-monitor.rb b/Casks/at-monitor.rb index 35c5a81371bae..a4049e931afe3 100644 --- a/Casks/at-monitor.rb +++ b/Casks/at-monitor.rb @@ -2,5 +2,5 @@ class AtMonitor < Cask url 'http://download.atpurpose.com/atMonitor/atMonitor.zip' homepage 'http://www.atpurpose.com/atMonitor/' version 'latest' - content_length '1380053' + no_checksum end diff --git a/Casks/back-in-time.rb b/Casks/back-in-time.rb index c70e28ae880f9..aa72752606de8 100644 --- a/Casks/back-in-time.rb +++ b/Casks/back-in-time.rb @@ -2,5 +2,5 @@ class BackInTime < Cask url 'http://www.tri-edre.com/pub/files/backintime203.dmg' homepage 'http://www.tri-edre.fr/english/backintime.html' version '2.0.3' - content_length '7532553' + sha1 '3c30818d789f5b7da9645f7dd2784b7183f1caf1' end diff --git a/Casks/bartender.rb b/Casks/bartender.rb index 97134a0ed3be2..7e77385b1cac8 100644 --- a/Casks/bartender.rb +++ b/Casks/bartender.rb @@ -2,5 +2,5 @@ class Bartender < Cask url 'http://www.macbartender.com/Demo/Bartender.zip' homepage 'http://www.macbartender.com/' version 'latest' - content_length '4380381' + no_checksum end diff --git a/Casks/bettertouchtool.rb b/Casks/bettertouchtool.rb index ef4418c97ec83..49d4ae87c3727 100644 --- a/Casks/bettertouchtool.rb +++ b/Casks/bettertouchtool.rb @@ -2,5 +2,5 @@ class Bettertouchtool < Cask url 'http://www.boastr.de/BetterTouchTool.zip' homepage 'http://blog.boastr.net/' version 'latest' - content_length '3527830' + no_checksum end diff --git a/Casks/boot-x-changer.rb b/Casks/boot-x-changer.rb index 651fbad8a32c3..eddf775ea8fb9 100644 --- a/Casks/boot-x-changer.rb +++ b/Casks/boot-x-changer.rb @@ -2,5 +2,5 @@ class BootXChanger < Cask url 'http://namedfork.net/_media/bootxchanger_2.0.dmg' homepage 'http://namedfork.net/bootxchanger' version '2.0' - content_length '694615' + sha1 'bc8c80913ba09c1fc2f354b954b321f261bb2e36' end diff --git a/Casks/brackets.rb b/Casks/brackets.rb index c9849bc712dd8..bef6331ce3082 100644 --- a/Casks/brackets.rb +++ b/Casks/brackets.rb @@ -2,5 +2,5 @@ class Brackets < Cask url 'https://github.com/downloads/adobe/brackets/brackets-sprint-16-MAC.dmg' homepage 'http://brackets.io' version 'sprint-16' - content_length '25020067' + sha1 '94322762ecb00baab857e324a98e543d548bf961' end diff --git a/Casks/caffeine.rb b/Casks/caffeine.rb index 2d5c36e597c7f..767c8988bea7a 100644 --- a/Casks/caffeine.rb +++ b/Casks/caffeine.rb @@ -2,5 +2,5 @@ class Caffeine < Cask url 'http://download.lightheadsw.com/download.php?software=caffeine' homepage 'http://lightheadsw.com/caffeine/' version '1.1.1' - content_length '260503' + sha1 'd2fbdad1619934313026fc831e6c6e3dd97ac030' end diff --git a/Casks/candybar.rb b/Casks/candybar.rb index 51460932c944d..9ca5c5815bdd0 100644 --- a/Casks/candybar.rb +++ b/Casks/candybar.rb @@ -2,6 +2,6 @@ class Candybar < Cask url 'http://panic.com/museum/candybar/CandyBar%203.3.4.zip' homepage 'http://panic.com/museum/candybar/' version '3.3.4' - content_length '133007800' + sha1 'f645e9da45a621415a07a7492c45923b1a1fd4d4' end diff --git a/Casks/changes.rb b/Casks/changes.rb index 8cf890cd38f28..9ea280c0f1e34 100644 --- a/Casks/changes.rb +++ b/Casks/changes.rb @@ -2,6 +2,6 @@ class Changes < Cask url 'http://bitbq.com/changes/download.php' homepage 'http://bitbq.com/changes/' version 'latest' - content_length '1990799' + no_checksum end diff --git a/Casks/chocolat.rb b/Casks/chocolat.rb index 0eaad5fb65c97..4a7e8d978acd7 100644 --- a/Casks/chocolat.rb +++ b/Casks/chocolat.rb @@ -2,6 +2,6 @@ class Chocolat < Cask url 'http://chocolatapp.com/download?experiment=&token=' homepage 'http://chocolatapp.com/' version 'latest' - content_length '14545811' + no_checksum end diff --git a/Casks/chromium.rb b/Casks/chromium.rb index 5a3c4df741186..ee9075e6bec32 100644 --- a/Casks/chromium.rb +++ b/Casks/chromium.rb @@ -2,5 +2,5 @@ class Chromium < Cask homepage 'http://www.freesmug.org/chromium' url 'http://sourceforge.net/projects/osxportableapps/files/Chromium/ChromiumOSX_22.0.1229.92.dmg/download' version '22.0.1229.92' - content_length '43991068' + sha1 'afb9ae77e4aa2a6e3321ffa314869698105bb22f' end diff --git a/Casks/clip-menu.rb b/Casks/clip-menu.rb index c4495bd8477f8..6492bf78fb532 100644 --- a/Casks/clip-menu.rb +++ b/Casks/clip-menu.rb @@ -2,5 +2,5 @@ class ClipMenu < Cask url 'https://dl.dropbox.com/u/1140644/clipmenu/ClipMenu_0.4.3.dmg' homepage 'http://www.clipmenu.com/' version '0.4.3' - content_length '1131824' + sha1 '9237d3f1e237f25fdd752e05d383d4b2a4274e3e' end diff --git a/Casks/colloquy.rb b/Casks/colloquy.rb index 70d735d7897be..1da22209531b3 100644 --- a/Casks/colloquy.rb +++ b/Casks/colloquy.rb @@ -2,6 +2,6 @@ class Colloquy < Cask url 'http://colloquy.info/downloads/colloquy-2.4.zip' homepage 'http://colloquy.info/' version '2.4' - content_length '7442191' + sha1 'e0f6d4df8a09c5b48e0d972dc732cc1203b2384c' end diff --git a/Casks/cura.rb b/Casks/cura.rb index 1bde1dbc60a3b..b72c5d26c4104 100644 --- a/Casks/cura.rb +++ b/Casks/cura.rb @@ -2,5 +2,5 @@ class Cura < Cask homepage 'http://daid.github.com/Cura/' url 'http://software.ultimaker.com/current/Cura-12.11-osx64.dmg' version '12.11' - content_length '92558002' + sha1 '8fa56ce33d6a8d7604858e20273635ce3d926b7d' end diff --git a/Casks/cyberduck.rb b/Casks/cyberduck.rb index 4768c3f126964..6d1b2ad536dde 100644 --- a/Casks/cyberduck.rb +++ b/Casks/cyberduck.rb @@ -2,5 +2,5 @@ class Cyberduck < Cask url 'http://cyberduck.ch/Cyberduck-4.2.1.zip' homepage 'http://cyberduck.ch' version '4.2.1' - content_length '24746156' + sha1 '6f1e220830f324ba136b4301b12711f6037176c7' end diff --git a/Casks/dia.rb b/Casks/dia.rb index f759f8453ea6a..2202f7231e41f 100644 --- a/Casks/dia.rb +++ b/Casks/dia.rb @@ -2,5 +2,5 @@ class Dia < Cask homepage 'http://dia-installer.de/' url 'http://downloads.sourceforge.net/dia-installer/dia/0.97.2/Dia-0.97.2-5.dmg' version '0.97.2-5' - content_length '33631850' + sha1 '20bcc65b63f44aaa2788a7183c4a254f6a57d57d' end diff --git a/Casks/disk-inventory-x.rb b/Casks/disk-inventory-x.rb index 0576ac8a5894b..4ed52f36bdf79 100644 --- a/Casks/disk-inventory-x.rb +++ b/Casks/disk-inventory-x.rb @@ -2,5 +2,5 @@ class DiskInventoryX < Cask url 'http://www.derlien.com/download.php?file=DiskInventoryX' homepage 'http://www.derlien.com/' version 'latest' - content_length '2969560' + no_checksum end diff --git a/Casks/divvy.rb b/Casks/divvy.rb index a0889be1173bd..0e9aa4ae2ec74 100644 --- a/Casks/divvy.rb +++ b/Casks/divvy.rb @@ -2,5 +2,5 @@ class Divvy < Cask url 'http://mizage.com/downloads/Divvy.zip' homepage 'http://mizage.com/divvy/' version 'latest' - content_length '2377821' + no_checksum end diff --git a/Casks/dropbox.rb b/Casks/dropbox.rb index 41a9c1f8f2a0d..bd67714e79f3f 100644 --- a/Casks/dropbox.rb +++ b/Casks/dropbox.rb @@ -2,5 +2,5 @@ class Dropbox < Cask url 'https://ddr3luum8vl5r.cloudfront.net/Dropbox%201.4.20.dmg' homepage 'http://www.dropbox.com/' version '1.4.20' - content_length '22599357' + sha1 'cd750534342da71e0eba45f2c9b184242abeadbd' end diff --git a/Casks/emacs.rb b/Casks/emacs.rb index 1780fd5e3b4c0..2e582c8300296 100644 --- a/Casks/emacs.rb +++ b/Casks/emacs.rb @@ -2,5 +2,5 @@ class Emacs < Cask url 'http://bandwidth.porkrind.org/emacs-builds/Emacs-24.2-universal-10.6.8.dmg' homepage 'http://emacsformacosx.com/' version '24.2' - content_length '55354843' + sha1 '0f5d368420d410ab395d7aedcf63f5cc6e6aaf85' end diff --git a/Casks/firefox-aurora.rb b/Casks/firefox-aurora.rb index 20b440313b255..2a52255e5ac2a 100644 --- a/Casks/firefox-aurora.rb +++ b/Casks/firefox-aurora.rb @@ -1,6 +1,6 @@ class FirefoxAurora < Cask - url 'http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-18.0a2.en-US.mac.dmg' + url 'https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-19.0a2.en-US.mac.dmg' homepage 'http://www.mozilla.org/en-US/firefox/aurora/' - version '18.0a2' - content_length '49254741' + version '19.0a2' + no_checksum # This is a nightly end diff --git a/Casks/firefox.rb b/Casks/firefox.rb index 1338feffe3098..36f5e9a4671bb 100644 --- a/Casks/firefox.rb +++ b/Casks/firefox.rb @@ -1,6 +1,6 @@ class Firefox < Cask - url 'http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/16.0.1/mac/en-US/Firefox%2016.0.1.dmg' + url 'http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/17.0.1/mac/en-US/Firefox%2017.0.1.dmg' homepage 'http://www.mozilla.org/en-US/firefox/' - version '16.0.1' - content_length '34958026' + version '17.0.1' + sha1 'a9888ce69440574fabff712549c8ff503fd1acb7' end diff --git a/Casks/fluid.rb b/Casks/fluid.rb index 155529fbdb687..84b64b1a8bd4a 100644 --- a/Casks/fluid.rb +++ b/Casks/fluid.rb @@ -2,5 +2,5 @@ class Fluid < Cask url 'http://fluidapp.com/dist/Fluid_1.6.1.zip' homepage 'http://fluidapp.com/' version '1.6.1' - content_length '2499923' + sha1 '7de2fe4372e9d055bd2bb6f5afcefa549740a7ce' end diff --git a/Casks/flux.rb b/Casks/flux.rb index 5232efd249061..89cbb851e94bb 100644 --- a/Casks/flux.rb +++ b/Casks/flux.rb @@ -2,5 +2,5 @@ class Flux < Cask url 'https://secure.herf.org/flux/Flux.zip' homepage 'http://stereopsis.com/flux/' version 'latest' - content_length '1314863' + no_checksum end diff --git a/Casks/gephi.rb b/Casks/gephi.rb index 01bc25c95912a..3d831fdd6229b 100644 --- a/Casks/gephi.rb +++ b/Casks/gephi.rb @@ -1,6 +1,6 @@ class Gephi < Cask + url 'https://launchpad.net/gephi/0.8/0.8.1beta/+download/gephi-0.8.1-beta.dmg' homepage 'http://gephi.org/' version '0.8.1' - url 'https://launchpad.net/gephi/0.8/0.8.1beta/+download/gephi-0.8.1-beta.dmg' - content_length '39116463' + sha1 '0bd1d9d5b1da69b77217949b788597a952cbd846' end diff --git a/Casks/gfxcardstatus.rb b/Casks/gfxcardstatus.rb index 177c8040d12fc..f13daa9b9c620 100644 --- a/Casks/gfxcardstatus.rb +++ b/Casks/gfxcardstatus.rb @@ -2,5 +2,5 @@ class Gfxcardstatus < Cask homepage 'http://gfx.io/' url 'http://codykrieger.com/downloads/gfxCardStatus-2.3.zip' version '2.3' - content_length '979240' + sha1 '0bd1d9d5b1da69b77217949b788597a952cbd846' end diff --git a/Casks/gimp.rb b/Casks/gimp.rb index ca3ff7f979388..0743a3e05bc48 100644 --- a/Casks/gimp.rb +++ b/Casks/gimp.rb @@ -2,5 +2,5 @@ class Gimp < Cask url 'ftp://ftp.gimp.org/pub/gimp/v2.8/osx/gimp-2.8.2-dmg-2.dmg' homepage 'http://www.gimp.org' version '2.8.2' - content_length '63881252' + sha1 '0bd1d9d5b1da69b77217949b788597a952cbd846' end diff --git a/Casks/github.rb b/Casks/github.rb index f0f08460bbccc..a145f515a585c 100644 --- a/Casks/github.rb +++ b/Casks/github.rb @@ -2,5 +2,5 @@ class Github < Cask url 'https://central.github.com/mac/latest' homepage 'http://mac.github.com' version 'latest' - content_length '10061271' + no_checksum end diff --git a/Casks/gitx-l.rb b/Casks/gitx-l.rb index 69911d197ea0f..0991dcb3ba63f 100644 --- a/Casks/gitx-l.rb +++ b/Casks/gitx-l.rb @@ -2,6 +2,6 @@ class GitxL < Cask url 'https://github.com/downloads/laullon/gitx/GitX-L_v0.8.4.zip' homepage 'http://gitx.laullon.com/' version '0.8.4' - content_length '1383025' + sha1 '86517311dcdc7348e308b542e3d5aad1a304f94f' end diff --git a/Casks/gitx.rb b/Casks/gitx.rb index 4c4419b63c42b..3cf88627989a4 100644 --- a/Casks/gitx.rb +++ b/Casks/gitx.rb @@ -2,5 +2,5 @@ class Gitx < Cask url 'http://frim.frim.nl/GitXStable.app.zip' homepage 'http://gitx.frim.nl/' version 'latest' - content_length '1665028' + no_checksum end diff --git a/Casks/gmail-notifr.rb b/Casks/gmail-notifr.rb index bf531faa9ce01..b776e9d25b3f1 100644 --- a/Casks/gmail-notifr.rb +++ b/Casks/gmail-notifr.rb @@ -2,5 +2,5 @@ class GmailNotifr < Cask url 'https://github.com/downloads/ashchan/gmail-notifr/GmailNotifr-0.6.4.zip' homepage 'http://ashchan.com/projects/gmail-notifr' version '0.6.4' - content_length '11837209' + sha1 '330a87bb9e0ed6209e6ad3f1d09e79b4c92674ef' end diff --git a/Casks/google-chrome-canary.rb b/Casks/google-chrome-canary.rb index 8d9f313ba8d17..bdcdaabbd826d 100644 --- a/Casks/google-chrome-canary.rb +++ b/Casks/google-chrome-canary.rb @@ -1,6 +1,6 @@ class GoogleChromeCanary < Cask - url 'https://storage.googleapis.com/chrome-canary/GoogleChromeCanary.dmg' + url 'https://storage.googleapis.com/chrome-canary/GoogleChromeCanary.dmg' homepage 'https://tools.google.com/dlpage/chromesxs' version 'latest' - content_length '58637811' + no_checksum end diff --git a/Casks/google-chrome.rb b/Casks/google-chrome.rb index ab2ea7f4575f7..1879688330460 100644 --- a/Casks/google-chrome.rb +++ b/Casks/google-chrome.rb @@ -1,6 +1,6 @@ class GoogleChrome < Cask - url 'https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg' + url 'https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg' homepage 'https://www.google.com/chrome/' version 'stable-channel' - content_length '56466358' + no_checksum end diff --git a/Casks/google-notifier.rb b/Casks/google-notifier.rb index a7383eabc86bb..11a6d80e64b65 100644 --- a/Casks/google-notifier.rb +++ b/Casks/google-notifier.rb @@ -2,5 +2,5 @@ class GoogleNotifier < Cask url 'http://dl.google.com/mac/download/GoogleNotifier_1.10.7.dmg' homepage 'http://toolbar.google.com/gmail-helper/notifier_mac.html' version '1.10.7' - content_length '1142033' + sha1 '9ea16ae966033a1c6a5b9d50bb9e8d5080906059' end diff --git a/Casks/handbrake.rb b/Casks/handbrake.rb index fe42158694935..0235e75d8e468 100644 --- a/Casks/handbrake.rb +++ b/Casks/handbrake.rb @@ -2,5 +2,5 @@ class Handbrake < Cask url 'http://handbrake.fr/rotation.php?file=HandBrake-0.9.8-MacOSX.6_GUI_x86_64.dmg' homepage 'http://handbrake.fr/' version '0.9.8' - content_length '7485495' + sha1 'd255b4daa64cc359209e306ff9ef8a24a66e20aa' end diff --git a/Casks/handbrakebatch.rb b/Casks/handbrakebatch.rb index 5dcc9bb8ddbcd..bd44e62fd61f9 100644 --- a/Casks/handbrakebatch.rb +++ b/Casks/handbrakebatch.rb @@ -2,5 +2,5 @@ class Handbrakebatch < Cask url 'http://www.osomac.com/appcasts/handbrakebatch/HandBrakeBatch.zip' homepage 'http://www.osomac.com/apps/osx/handbrake-batch/' version 'latest' - content_length '14008464' + no_checksum end diff --git a/Casks/hands-off.rb b/Casks/hands-off.rb index 2f5d0f788c075..dd0d4232c1179 100644 --- a/Casks/hands-off.rb +++ b/Casks/hands-off.rb @@ -2,5 +2,5 @@ class HandsOff < Cask url 'https://www.metakine.com/files/Hands%20Off!%20v1.5.1.dmg' homepage 'http://www.metakine.com/products/handsoff/' version '1.5.1' - content_length '6204375' + sha1 '6738476c53f73a4924fa38444c5802250b180d4f' end diff --git a/Casks/inkscape.rb b/Casks/inkscape.rb index f7302e8497000..55f2b9ad3c44e 100644 --- a/Casks/inkscape.rb +++ b/Casks/inkscape.rb @@ -1,6 +1,6 @@ class Inkscape < Cask homepage 'http://inkscape.org' url 'http://downloads.sourceforge.net/inkscape/Inkscape-0.48.2-1-SNOWLEOPARD.dmg' - version '0.48.2-1' - content_length '87079397' + version '0.48.2-1' + sha1 '20073844e26dc787da04d951e3a24338758e5e8d' end diff --git a/Casks/intellij-community.rb b/Casks/intellij-community.rb index 5d9f3d46110fa..e31b412852a80 100644 --- a/Casks/intellij-community.rb +++ b/Casks/intellij-community.rb @@ -2,5 +2,5 @@ class IntellijCommunity < Cask url 'http://download.jetbrains.com/idea/ideaIC-11.1.4.dmg' homepage 'https://www.jetbrains.com/idea/index.html' version '11.1.4' - content_length '113789795' + sha1 '20073844e26dc787da04d951e3a24338758e5e8d' end diff --git a/Casks/intellij-ultimate.rb b/Casks/intellij-ultimate.rb index e59b992d55bce..db1baaa1921d9 100644 --- a/Casks/intellij-ultimate.rb +++ b/Casks/intellij-ultimate.rb @@ -2,5 +2,5 @@ class IntellijUltimate < Cask url 'http://download.jetbrains.com/idea/ideaIU-11.1.4.dmg' homepage 'https://www.jetbrains.com/idea/index.html' version '11.1.4' - content_length '198099319' + sha1 '9f2d70d934ac41fe522df99f1fea9ac3b44f31a7' end diff --git a/Casks/irip.rb b/Casks/irip.rb index 46e10ea795f19..4b3545473b014 100644 --- a/Casks/irip.rb +++ b/Casks/irip.rb @@ -2,5 +2,5 @@ class Irip < Cask url 'http://files.thelittleappfactory.com/iRip2/iRip.zip' version 'latest' homepage 'http://thelittleappfactory.com/irip/' - content_length '2085303' + no_checksum end diff --git a/Casks/istat-menus.rb b/Casks/istat-menus.rb index 7f9aacf96a713..4774a87a36a0c 100644 --- a/Casks/istat-menus.rb +++ b/Casks/istat-menus.rb @@ -2,5 +2,5 @@ class IstatMenus < Cask url 'http://s3.amazonaws.com/bjango/files/istatmenus3/istatmenus3.21.zip' homepage 'http://bjango.com/mac/istatmenus/' version '3.21' - content_length '8353594' + sha1 '07b6a0d1f3d6c0ce30fd0e7b62ee9275405bead9' end diff --git a/Casks/iterm2.rb b/Casks/iterm2.rb index 3bacf7254b865..53d80c4d9d3df 100644 --- a/Casks/iterm2.rb +++ b/Casks/iterm2.rb @@ -1,5 +1,6 @@ class Iterm2 < Cask url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20120203.zip' - version '1.0.0.20120203' homepage 'http://www.iterm2.com/' + version '1.0.0.20120203' + sha1 '554d2f9b9fbd7d4930f3a9b6962264bc026237c9' end diff --git a/Casks/jumpcut.rb b/Casks/jumpcut.rb index 2cd711dcd03c4..822fe2204bd25 100644 --- a/Casks/jumpcut.rb +++ b/Casks/jumpcut.rb @@ -2,6 +2,6 @@ class Jumpcut < Cask url 'http://downloads.sourceforge.net/project/jumpcut/jumpcut/0.63/Jumpcut_0.63.tgz' homepage 'http://jumpcut.sourceforge.net/' version '0.63' - content_length '530939' + sha1 '6ac88694f84b549f87c7c20bbf028f1d174d9e40' end diff --git a/Casks/justlooking.rb b/Casks/justlooking.rb index f5b87f61e9076..1984c6f42f4a1 100644 --- a/Casks/justlooking.rb +++ b/Casks/justlooking.rb @@ -2,5 +2,5 @@ class Justlooking < Cask url 'http://chipmunkninja.com/download/JustLooking-3.3.3.dmg' homepage 'http://chipmunkninja.com/JustLooking' version '3.3.3' - content_length '4849204' + sha1 'ac082882d21e77c5c77e99f8fa7bae9f72bac75c' end diff --git a/Casks/keepass-x.rb b/Casks/keepass-x.rb index 717ae06b1bf8b..1184dd07dee8e 100644 --- a/Casks/keepass-x.rb +++ b/Casks/keepass-x.rb @@ -1,6 +1,6 @@ class KeepassX < Cask - url 'http://downloads.sourceforge.net/keepassx/KeePassX-0.4.3.dmg' + url 'http://downloads.sourceforge.net/keepassx/KeePassX-0.4.3.dmg' homepage 'http://www.keepassx.org' version '0.4.3' - content_length '13423385' + sha1 '40f61b33f559f1de61e698b9f46b65c985a98955' end diff --git a/Casks/keyboard-maestro.rb b/Casks/keyboard-maestro.rb index 3165301aa26a8..1181d3d1e7cf7 100644 --- a/Casks/keyboard-maestro.rb +++ b/Casks/keyboard-maestro.rb @@ -2,5 +2,5 @@ class KeyboardMaestro < Cask url 'http://www.keyboardmaestro.com/action/download?km-kmi-2-b' homepage 'http://www.keyboardmaestro.com/' version 'latest' - content_length '19842748' + no_checksum end diff --git a/Casks/libre-office.rb b/Casks/libre-office.rb index c03fc6104d0d7..c523fbd33384c 100644 --- a/Casks/libre-office.rb +++ b/Casks/libre-office.rb @@ -2,5 +2,5 @@ class LibreOffice < Cask url 'http://download.documentfoundation.org/libreoffice/stable/3.5.7/mac/x86/LibO_3.5.7_MacOS_x86_install_en-US.dmg' homepage 'http://www.libreoffice.org/' version '3.5.7' - content_length '178067623' + sha1 'a9c32610d9f9b50be5058c115f62d3660ae74b17' end diff --git a/Casks/little-snitch.rb b/Casks/little-snitch.rb index 4193ef585610a..f0dfaa6f2fbf1 100644 --- a/Casks/little-snitch.rb +++ b/Casks/little-snitch.rb @@ -2,5 +2,5 @@ class LittleSnitch < Cask url 'http://www.obdev.at/downloads/LittleSnitch/LittleSnitch-2.5.4.dmg' homepage 'http://www.obdev.at/products/littlesnitch/index.html' version '2.5.4' - content_length '3133956' + sha1 '217a83098c1eb3df69560e539d86ef4bc6b3b756' end diff --git a/Casks/livestation.rb b/Casks/livestation.rb index ccb7f1b112a81..1e2468e3fc8ff 100644 --- a/Casks/livestation.rb +++ b/Casks/livestation.rb @@ -2,5 +2,5 @@ class Livestation < Cask url 'http://updates.livestation.com/releases/Livestation-3.2.0-intel.dmg' homepage 'http://www.livestation.com' version '3.2.0' - content_length '34333657' + sha1 '7c3334e2c710d8c89bfc91591ffed56c1b74643c' end diff --git a/Casks/macvim.rb b/Casks/macvim.rb index 4eecc027a50d3..f191d2ce6a030 100644 --- a/Casks/macvim.rb +++ b/Casks/macvim.rb @@ -2,5 +2,5 @@ class Macvim < Cask url 'https://github.com/downloads/b4winckler/macvim/MacVim-snapshot-65.tbz' homepage 'http://code.google.com/p/macvim/' version '7.3-65' - content_length '7215380' + sha1 '30f58b03127a7b5f9e2c23fd31d3749e8f3e2197' end diff --git a/Casks/makemkv.rb b/Casks/makemkv.rb index c2aa7058d8096..f5ea2f95b8a55 100644 --- a/Casks/makemkv.rb +++ b/Casks/makemkv.rb @@ -2,5 +2,4 @@ class Makemkv < Cask url 'http://www.makemkv.com/download/makemkv_v1.7.8_osx.dmg' homepage 'http://www.makemkv.com/' version '1.7.8' - content_length '6357149' end diff --git a/Casks/menu-bar-filter.rb b/Casks/menu-bar-filter.rb index 2c466874d3083..85c26f7481955 100644 --- a/Casks/menu-bar-filter.rb +++ b/Casks/menu-bar-filter.rb @@ -2,5 +2,5 @@ class MenuBarFilter < Cask url 'https://github.com/downloads/wez/MenuBarFilter/MenuBarFilter_1.2.2.zip' homepage 'http://wez.github.com/MenuBarFilter/' version '1.2.2' - content_length '501304' + sha1 'aecadf43bdba901e254012cc21e746f39f244bd8' end diff --git a/Casks/moom.rb b/Casks/moom.rb index 1140708820fb9..d8a102ecc4d6c 100644 --- a/Casks/moom.rb +++ b/Casks/moom.rb @@ -2,5 +2,5 @@ class Moom < Cask url 'http://manytricks.com/download/moom' homepage 'http://manytricks.com/moom/' version 'latest' - content_length '6121023' + no_checksum end diff --git a/Casks/namemangler.rb b/Casks/namemangler.rb index 33b20ea2f42f6..460e84ba05e08 100644 --- a/Casks/namemangler.rb +++ b/Casks/namemangler.rb @@ -2,5 +2,5 @@ class Namemangler < Cask url 'http://manytricks.com/download/namemangler' version 'latest' homepage 'http://manytricks.com/namemangler/' - content_length '1614684' + no_checksum end diff --git a/Casks/notational-velocity.rb b/Casks/notational-velocity.rb index 7f0774cefd427..be01ae1082d2e 100644 --- a/Casks/notational-velocity.rb +++ b/Casks/notational-velocity.rb @@ -2,5 +2,5 @@ class NotationalVelocity < Cask url 'http://notational.net/NotationalVelocity.zip' homepage 'http://notational.net' version 'latest' - content_length '2550864' + no_checksum end diff --git a/Casks/nv-alt.rb b/Casks/nv-alt.rb index 3f8f3ffb9ed04..636540c95e061 100644 --- a/Casks/nv-alt.rb +++ b/Casks/nv-alt.rb @@ -1,6 +1,6 @@ class NvAlt < Cask - url 'http://brettterpstra.com/downloads/nvalt2.1.zip?9d7bd4' + url 'http://brettterpstra.com/downloads/nvalt2.1.zip?9d7bd4' homepage 'http://brettterpstra.com/project/nvalt/' version '2.1' - content_length '3587960' + sha1 '686183dd51701ef6f304dec07d8c9049d553185a' end diff --git a/Casks/one-password.rb b/Casks/one-password.rb index c3de291daabad..67c26bff9c0a5 100644 --- a/Casks/one-password.rb +++ b/Casks/one-password.rb @@ -2,5 +2,5 @@ class OnePassword < Cask url 'https://d13itkw33a7sus.cloudfront.net/dist/1P/mac/1Password-3.8.20.zip' homepage 'https://agilebits.com/onepassword' version '3.8.20' - content_length '19241282' + sha1 'b8aaa60f32c0431a95347b8fb4e814472e89bb2b' end diff --git a/Casks/open-office.rb b/Casks/open-office.rb index b12a305c29488..0e93d0807fcd5 100644 --- a/Casks/open-office.rb +++ b/Casks/open-office.rb @@ -2,6 +2,6 @@ class OpenOffice < Cask url 'http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.1/Apache_OpenOffice_incubating_3.4.1_MacOS_x86_install_en-US.dmg/download' homepage 'http://www.openoffice.org/' version '3.4.1' - content_length '166683054' + sha1 '63623a1cc77bfc3c0fe207c317ecd087eded3016' end diff --git a/Casks/paintbrush.rb b/Casks/paintbrush.rb index a2a58d54a395d..3c25e2c4332bd 100644 --- a/Casks/paintbrush.rb +++ b/Casks/paintbrush.rb @@ -2,5 +2,5 @@ class Paintbrush < Cask url 'http://downloads.sourceforge.net/project/paintbrush/Paintbrush%202.x/Paintbrush%202.1.1/Paintbrush-2.1.1.zip?r=http%3A%2F%2Fpaintbrush.sourceforge.net%2Fdownloads%2F&ts=1351154031&use_mirror=superb-dca2' homepage 'http://paintbrush.sourceforge.net/' version '2.1.1' - content_length '1563534' + sha1 'f8dedc7b22ed017dea43d76b5686b226ebe13ef2' end diff --git a/Casks/pandora-jam.rb b/Casks/pandora-jam.rb index 8a0048dc1574d..faf199fd97d9a 100644 --- a/Casks/pandora-jam.rb +++ b/Casks/pandora-jam.rb @@ -2,5 +2,5 @@ class PandoraJam < Cask url 'http://www.bitcartel.com/downloads/pandorajam.zip' homepage 'http://www.bitcartel.com/pandorajam/' version 'latest' - content_length '5366519' + no_checksum end diff --git a/Casks/picard.rb b/Casks/picard.rb index deae97f675d86..406ad32af1804 100644 --- a/Casks/picard.rb +++ b/Casks/picard.rb @@ -2,5 +2,5 @@ class Picard < Cask url 'ftp://ftp.musicbrainz.org/pub/musicbrainz/picard/MusicBrainz-Picard-1.1.dmg' homepage 'http://musicbrainz.org/doc/MusicBrainz_Picard' version '1.1' - content_length '16060349' + sha1 '6dff070ac02541b90f6ced710397bea029c1fc3f' end diff --git a/Casks/plex.rb b/Casks/plex.rb index a2fb94c9d3f12..99fcb854dbb59 100644 --- a/Casks/plex.rb +++ b/Casks/plex.rb @@ -2,5 +2,5 @@ class Plex < Cask url 'http://plex-downloads.s3.amazonaws.com/plex-laika/0.9.5.4/Plex-0.9.5.4-973998f.zip' homepage 'http://plexapp.com' version '0.9.5.4' - content_length '35884558' + sha1 '6d544de6c56861eab05a5621ecee1777cefe49fc' end diff --git a/Casks/postgres.rb b/Casks/postgres.rb index fb8ec7e97c6d3..c1c73ca32be24 100644 --- a/Casks/postgres.rb +++ b/Casks/postgres.rb @@ -2,5 +2,5 @@ class Postgres < Cask url 'http://postgresapp.com/download' homepage 'http://www.postgresapp.com/' version 'latest' - content_length '58088683' + no_checksum end diff --git a/Casks/propane.rb b/Casks/propane.rb index 843b03f7f5a91..902a667323d74 100644 --- a/Casks/propane.rb +++ b/Casks/propane.rb @@ -2,5 +2,5 @@ class Propane < Cask url 'http://propaneapp.com/appcast/Propane.zip' homepage 'http://propaneapp.com/' version 'latest' - content_length '2840383' + no_checksum end diff --git a/Casks/quicksilver.rb b/Casks/quicksilver.rb index fdb1e1d83dbd4..85f873ee2fc06 100644 --- a/Casks/quicksilver.rb +++ b/Casks/quicksilver.rb @@ -2,5 +2,5 @@ class Quicksilver < Cask url 'http://qs0.qsapp.com/plugins/download.php' homepage 'http://qsapp.com/' version 'latest' - content_length '3473822' + no_checksum end diff --git a/Casks/racket.rb b/Casks/racket.rb index b69d572ac7841..2e9dfe193a8e6 100644 --- a/Casks/racket.rb +++ b/Casks/racket.rb @@ -1,6 +1,6 @@ class Racket < Cask - url 'http://download.racket-lang.org/installers/5.3/racket/racket-5.3-bin-x86_64-osx-mac.dmg' + url 'http://download.racket-lang.org/installers/5.3/racket/racket-5.3-bin-x86_64-osx-mac.dmg' homepage 'http://racket-lang.org/' version '5.3' - content_length '66712297' + sha1 'da2642f5cebb16e7098b00988627ee6c45f5edc8' end diff --git a/Casks/rdio.rb b/Casks/rdio.rb index 1a87dd0af52dc..f2af63f4bfdbb 100644 --- a/Casks/rdio.rb +++ b/Casks/rdio.rb @@ -1,6 +1,6 @@ class Rdio < Cask - url 'http://www.rdio.com/media/static/desktop/mac/Rdio.dmg' + url 'http://www.rdio.com/media/static/desktop/mac/Rdio.dmg' homepage 'http://www.rdio.com' version 'latest' - content_length '19387328' + no_checksum end diff --git a/Casks/ringtones.rb b/Casks/ringtones.rb index 79a3dcc41f09a..8813262471a1c 100644 --- a/Casks/ringtones.rb +++ b/Casks/ringtones.rb @@ -2,5 +2,5 @@ class Ringtones < Cask url 'http://files.thelittleappfactory.com/ringtones/Ringtones.zip' version 'latest' homepage 'http://thelittleappfactory.com/ringtones/' - content_length '2519864' + no_checksum end diff --git a/Casks/ripit.rb b/Casks/ripit.rb index 7e2e2d316777e..1161660f8423b 100644 --- a/Casks/ripit.rb +++ b/Casks/ripit.rb @@ -1,6 +1,6 @@ class Ripit < Cask url 'http://files.thelittleappfactory.com/ripit/RipIt.zip' - version 'latest' homepage 'http://thelittleappfactory.com/ripit/' - content_length '8926510' + version 'latest' + no_checksum end diff --git a/Casks/rubymine.rb b/Casks/rubymine.rb index 317caeeaa97bb..2eb992c26a790 100644 --- a/Casks/rubymine.rb +++ b/Casks/rubymine.rb @@ -1,6 +1,6 @@ class Rubymine < Cask - homepage 'http://www.jetbrains.com/ruby/' url 'http://download.jetbrains.com/ruby/RubyMine-4.5.4.dmg' + homepage 'http://www.jetbrains.com/ruby/' version '4.5.4' - content_length '111025727' + sha1 '3f5d4318207f8e1a661a1055089eed63473bbfb3' end diff --git a/Casks/scrivener.rb b/Casks/scrivener.rb index 3e26a91324b0f..43ca96e1de568 100644 --- a/Casks/scrivener.rb +++ b/Casks/scrivener.rb @@ -2,5 +2,5 @@ class Scrivener < Cask url 'http://scrivener.s3.amazonaws.com/Scrivener.dmg' homepage 'http://literatureandlatte.com/scrivener.php' version 'latest' - content_length '31888086' + no_checksum end diff --git a/Casks/seashore.rb b/Casks/seashore.rb index 1169cfc774bdc..73b5c79c81937 100644 --- a/Casks/seashore.rb +++ b/Casks/seashore.rb @@ -2,5 +2,5 @@ class Seashore < Cask url 'https://sourceforge.net/projects/seashore/files/seashore%20binaries/Seashore%200.5.1/Seashore.zip/download' homepage 'http://seashore.sourceforge.net/' version '0.5.1' - content_length '6957082' + sha1 'd8661189b4e526fbb9c73602a77c0c5936eb5297' end diff --git a/Casks/sequel-pro.rb b/Casks/sequel-pro.rb index 199c4e7543876..f382549d70d17 100644 --- a/Casks/sequel-pro.rb +++ b/Casks/sequel-pro.rb @@ -2,4 +2,5 @@ class SequelPro < Cask url 'http://sequel-pro.googlecode.com/files/Sequel_Pro_0.9.9.1.dmg' homepage 'http://www.sequelpro.com/' version '0.9.9.1' + sha1 '25ee92a23c20ee6f004d5d69cafe3e3e15212b6f' end diff --git a/Casks/shortcat.rb b/Casks/shortcat.rb index deabe46542a7c..c78f6802f18bf 100644 --- a/Casks/shortcat.rb +++ b/Casks/shortcat.rb @@ -2,5 +2,5 @@ class Shortcat < Cask url 'http://updates.shortcatapp.com/v0.3.4.1/Shortcat.app.tar.bz2' homepage 'http://shortcatapp.com/' version '0.3.4.1' - content_length '6002039' + sha1 '05a3ef45f3612f5ad3d499aa1d32cf50c28c1aac' end diff --git a/Casks/size-up.rb b/Casks/size-up.rb index dc58165f6cbda..d7c18a23e8047 100644 --- a/Casks/size-up.rb +++ b/Casks/size-up.rb @@ -2,5 +2,5 @@ class SizeUp < Cask url 'http://www.irradiatedsoftware.com/download/SizeUp.zip' homepage 'http://www.irradiatedsoftware.com/sizeup/index.html' version '1.3.2' - content_length '1986416' + sha1 'c26dea7e3341e1467ff08768c9ce8bf53216de6b' end diff --git a/Casks/skype.rb b/Casks/skype.rb index 2433f53d7b718..b6e74b71271a7 100644 --- a/Casks/skype.rb +++ b/Casks/skype.rb @@ -2,5 +2,5 @@ class Skype < Cask homepage 'http://www.skype.com' version '6.0.60.2946' url 'http://download.skype.com/macosx/Skype_6.0.60.2946.dmg' - content_length '34496472' + sha1 'd2d538eeb42e9918fe1c1d84113c74dce99ef57d' end diff --git a/Casks/slate.rb b/Casks/slate.rb index 69209a4434ea9..e6e7e3fbe46cb 100644 --- a/Casks/slate.rb +++ b/Casks/slate.rb @@ -2,5 +2,5 @@ class Slate < Cask url 'http://slate.ninjamonkeysoftware.com/Slate.dmg' homepage 'https://github.com/jigish/slate' version 'latest' - content_length '1431469' + no_checksum end diff --git a/Casks/sourcetree.rb b/Casks/sourcetree.rb index 582d293699aed..0d3920310f36c 100644 --- a/Casks/sourcetree.rb +++ b/Casks/sourcetree.rb @@ -2,5 +2,5 @@ class Sourcetree < Cask url 'http://downloads.atlassian.com/software/sourcetree/SourceTree_1.5.4.dmg' homepage 'http://www.sourcetreeapp.com/' version '1.5.4' - content_length '23812125' + sha1 'ea656b78130e05d3edcc01aa805309082be07c97' end diff --git a/Casks/sparrow.rb b/Casks/sparrow.rb index 4db13f14bc3bd..c2e2877ee9850 100644 --- a/Casks/sparrow.rb +++ b/Casks/sparrow.rb @@ -2,5 +2,5 @@ class Sparrow < Cask url 'http://download.sparrowmailapp.com/appcast/Sparrow-latest.dmg' homepage 'http://www.sparrowmailapp.com/' version 'latest' - content_length '12139098' + no_checksum end diff --git a/Casks/spectacle.rb b/Casks/spectacle.rb index 3432789ff1735..d539051ad1189 100644 --- a/Casks/spectacle.rb +++ b/Casks/spectacle.rb @@ -2,5 +2,5 @@ class Spectacle < Cask url 'http://spectacleapp.com/updates/downloads/Spectacle%200.7.zip' homepage 'http://www.spectacleapp.com/' version '0.7' - content_length '2670235' + sha1 '75fa6d7ba002247a9018d86de5e3fe1926ec8dae' end diff --git a/Casks/spotify.rb b/Casks/spotify.rb index 7074d5d71bf32..edf18cb3d7949 100644 --- a/Casks/spotify.rb +++ b/Casks/spotify.rb @@ -2,5 +2,5 @@ class Spotify < Cask url 'http://download.spotify.com/Spotify.dmg' homepage 'https://www.spotify.com' version 'stable' - content_length '25870514' + no_checksum end diff --git a/Casks/steam.rb b/Casks/steam.rb index e840d5ef4601d..d5109ba0ca833 100644 --- a/Casks/steam.rb +++ b/Casks/steam.rb @@ -1,6 +1,6 @@ class Steam < Cask - url 'http://media.steampowered.com/client/installer/steam.dmg' + url 'http://media.steampowered.com/client/installer/steam.dmg' homepage 'http://store.steampowered.com/about/' version 'stable' - content_length '3265407' + no_checksum end diff --git a/Casks/sublime-text.rb b/Casks/sublime-text.rb index 90c8f989e0848..253ded07ac29a 100644 --- a/Casks/sublime-text.rb +++ b/Casks/sublime-text.rb @@ -2,5 +2,5 @@ class SublimeText < Cask url 'http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.1.dmg' homepage 'http://www.sublimetext.com/2' version '2.0.1' - content_length '8028400' + sha1 'b5f91ee4f62d36c0490c021d5fb134b9e7cb3936' end diff --git a/Casks/tagalicious.rb b/Casks/tagalicious.rb index a89a30b599ec5..d3b7d18f75aa1 100644 --- a/Casks/tagalicious.rb +++ b/Casks/tagalicious.rb @@ -1,6 +1,6 @@ class Tagalicious < Cask url 'http://files.thelittleappfactory.com/tagalicious/Tagalicious.zip' - version 'latest' homepage 'http://files.thelittleappfactory.com/ringtones/Ringtones.zip' - content_length '4685352' + version 'latest' + no_checksum end diff --git a/Casks/textadept.rb b/Casks/textadept.rb index 175dcd41651ac..c596b661faaeb 100644 --- a/Casks/textadept.rb +++ b/Casks/textadept.rb @@ -2,4 +2,5 @@ class Textadept < Cask url 'http://foicica.com/textadept/download/textadept_6.0.osx.zip' homepage 'http://foicica.com/textadept/' version '6.0' + sha1 '5d3628ec0c7a42ec8bad80af0095f39357403417' end diff --git a/Casks/textmate1.rb b/Casks/textmate1.rb index 8ed3c678512a3..5be26027edc40 100644 --- a/Casks/textmate1.rb +++ b/Casks/textmate1.rb @@ -2,5 +2,5 @@ class Textmate1 < Cask url 'http://download.macromates.com/TextMate_1.5.11_r1635.zip' homepage 'http://macromates.com/' version '1.5.11_r1635' - content_length '12998020' + sha1 '41e09022f7f9bd0962e3d7032699064c60d3ae19' end diff --git a/Casks/textmate2.rb b/Casks/textmate2.rb index 7557804bdd340..bb60d710fae65 100644 --- a/Casks/textmate2.rb +++ b/Casks/textmate2.rb @@ -2,5 +2,5 @@ class Textmate2 < Cask url 'https://github.com/downloads/textmate/textmate/TextMate_r9319.tbz' homepage 'http://macromates.com/' version '2.0_r9319' - content_length '14399159' + sha1 '3fdce80a23904642f5a43ea8db1a9ee65ba203b7' end diff --git a/Casks/textwrangler.rb b/Casks/textwrangler.rb index bec3a76584752..70ee2bd31fca1 100644 --- a/Casks/textwrangler.rb +++ b/Casks/textwrangler.rb @@ -1,6 +1,6 @@ class Textwrangler < Cask + url 'http://ash.barebones.com/TextWrangler_4.0.1.dmg' homepage 'http://www.barebones.com/products/textwrangler' version '4.0.1' - url 'http://ash.barebones.com/TextWrangler_4.0.1.dmg' - content_length '5419888' + sha1 '7205c48f94d588682bf82923b579e1674701f218' end diff --git a/Casks/the-unarchiver.rb b/Casks/the-unarchiver.rb index 09f9cadf2a973..df32ae813e6db 100644 --- a/Casks/the-unarchiver.rb +++ b/Casks/the-unarchiver.rb @@ -2,4 +2,5 @@ class TheUnarchiver < Cask url 'http://theunarchiver.googlecode.com/files/TheUnarchiver3.4.zip' homepage 'http://unarchiver.c3.cx/' version '3.4' + sha1 '05e794f1ef9259138fdf19a3592d64ee3ca5a753' end diff --git a/Casks/thunderbird.rb b/Casks/thunderbird.rb index 3dd3ce81800b3..e7fdd699208b2 100644 --- a/Casks/thunderbird.rb +++ b/Casks/thunderbird.rb @@ -2,5 +2,5 @@ class Thunderbird < Cask url 'http://download.cdn.mozilla.net/pub/mozilla.org/thunderbird/releases/16.0.1/mac/en-US/Thunderbird%2016.0.1.dmg' homepage 'http://www.mozilla.org/en-US/thunderbird/' version '16.0.1' - content_length '38435412' + sha1 '50ed989c51c171fd6913883b481e00d5a4cff036' end diff --git a/Casks/time-machine-editor.rb b/Casks/time-machine-editor.rb index fb2b84a19c5d7..8a733c68a6486 100644 --- a/Casks/time-machine-editor.rb +++ b/Casks/time-machine-editor.rb @@ -2,5 +2,5 @@ class TimeMachineEditor < Cask url 'http://timesoftware.free.fr/timemachineeditor/TimeMachineEditor.zip' homepage 'http://timesoftware.free.fr/timemachineeditor/' version 'latest' - content_length '480641' + no_checksum end diff --git a/Casks/transmission.rb b/Casks/transmission.rb index 94758ecddafa9..758304e7bd079 100644 --- a/Casks/transmission.rb +++ b/Casks/transmission.rb @@ -2,5 +2,5 @@ class Transmission < Cask url 'http://download.transmissionbt.com/files/Transmission-2.61.dmg' homepage 'http://www.transmissionbt.com/' version '2.61' - content_length '4659049' + sha1 'ac6cf624c3a4a3b1a692e95fa8de672b8be43391' end diff --git a/Casks/transmit.rb b/Casks/transmit.rb index 60571dbd2a7b9..3527b3b184add 100644 --- a/Casks/transmit.rb +++ b/Casks/transmit.rb @@ -2,5 +2,5 @@ class Transmit < Cask url 'http://www.panic.com/transmit/d/Transmit%204.2.zip' homepage 'http://panic.com/transmit/' version '4.2' - content_length '29172077' + sha1 'f49d0471dbf655a8157dcd89d3db47ba2c97be65' end diff --git a/Casks/tunewiki.rb b/Casks/tunewiki.rb index 7fd629b990700..9d0769fb21d3e 100644 --- a/Casks/tunewiki.rb +++ b/Casks/tunewiki.rb @@ -2,5 +2,5 @@ class Tunewiki < Cask url 'http://www.tunewiki.com/download/desktop/TuneWiki_Installer.dmg' homepage 'http://www.tunewiki.com/' version '2.1.0' - content_length '563712' + sha1 '21285dbe39af0dcc7cb9d688bdedc6786d1b6276' end diff --git a/Casks/tvmobili.rb b/Casks/tvmobili.rb index 6712055741b64..744574b4dfa63 100644 --- a/Casks/tvmobili.rb +++ b/Casks/tvmobili.rb @@ -1,5 +1,6 @@ class Tvmobili < Cask homepage 'http://www.tvmobili.com/' url 'http://www.tvmobili.com/binaries/stable/tvmobili-snowleopard-universal.dmg' - version 'current' + version 'current' + no_checksum end diff --git a/Casks/u-torrent.rb b/Casks/u-torrent.rb index d11aae81c6b42..5a549e461f629 100644 --- a/Casks/u-torrent.rb +++ b/Casks/u-torrent.rb @@ -2,5 +2,5 @@ class UTorrent < Cask homepage 'http://www.utorrent.com/' version '1.5.14' url 'http://download.utorrent.com/1.5.14/uTorrent.dmg' - content_length '2690009' + sha1 '4399d289b7719e4c17b6806d94a68e6aa886d1d1' end diff --git a/Casks/virtualbox.rb b/Casks/virtualbox.rb index c51823e8ed667..63c402eac037d 100644 --- a/Casks/virtualbox.rb +++ b/Casks/virtualbox.rb @@ -2,5 +2,5 @@ class Virtualbox < Cask homepage 'http://www.virtualbox.org' version '4.2.4.81684' url 'http://download.virtualbox.org/virtualbox/4.2.4/VirtualBox-4.2.4-81684-OSX.dmg' - content_length '105730333' + sha1 '9d04a165838fbaaa633794478b868a985b350ade' end diff --git a/Casks/vlc.rb b/Casks/vlc.rb index f9e891d5da8d7..b60637e9f8754 100644 --- a/Casks/vlc.rb +++ b/Casks/vlc.rb @@ -2,5 +2,5 @@ class Vlc < Cask homepage 'http://www.videolan.org/vlc/' url 'http://downloads.sourceforge.net/project/vlc/2.0.3/macosx/vlc-2.0.3.dmg' version '2.0.3' - content_length '43127356' + sha1 'fb49e0da2584eb87abf7f8a93961cb86aa85c579' end diff --git a/Casks/woodhouse.rb b/Casks/woodhouse.rb index 37e0dd1f3b7bf..3aee9d4ba5f78 100644 --- a/Casks/woodhouse.rb +++ b/Casks/woodhouse.rb @@ -1,6 +1,6 @@ class Woodhouse < Cask url 'https://github.com/downloads/phinze/woodhouse/Woodhouse-0.4.0.dmg' - version '0.4.0' homepage 'https://github.com/phinze/woodhouse/' - content_length '964857' + version '0.4.0' + sha1 'cc1f63f6a1d6732d3c223e185b95fcba2ce77418' end diff --git a/Casks/x-quartz.rb b/Casks/x-quartz.rb index 8838f1f2605e5..6b4323c7f4733 100644 --- a/Casks/x-quartz.rb +++ b/Casks/x-quartz.rb @@ -2,5 +2,5 @@ class XQuartz < Cask url 'http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.4.dmg' homepage 'http://xquartz.macosforge.org/' version '2.7.4' - content_length '70144166' + sha1 '98b2ca8580046d5b91250c5a244c8182437dc9d7' end diff --git a/Casks/xbmc.rb b/Casks/xbmc.rb index 5df3f69ad8e66..bac4e417c8789 100644 --- a/Casks/xbmc.rb +++ b/Casks/xbmc.rb @@ -2,6 +2,5 @@ class Xbmc < Cask homepage 'http://xbmc.org/' version '12.0.beta.1' url 'http://mirrors.xbmc.org/releases/osx/xbmc-12.0-Frodo_beta1-x86_64.dmg' - content_length '52627325' + sha1 '3170629b89adc0bbcb7f4096233deb357d0e65cd' end - diff --git a/Casks/xscope.rb b/Casks/xscope.rb index 1a0f9876998e4..2c514a700db49 100644 --- a/Casks/xscope.rb +++ b/Casks/xscope.rb @@ -2,5 +2,5 @@ class Xscope < Cask url 'http://iconfactory.com/assets/software/xscope/xScope-3.5.1.zip' homepage 'http://iconfactory.com/software/xscope' version '3.5.1' - content_length '25577535' + sha1 'b355b3aab636ce535d67d8496d2211b4c2589272' end diff --git a/README.md b/README.md index 863452fc03ebf..9be0517caeda2 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,41 @@ following issues: - [#82](https://github.com/phinze/homebrew-cask/issues/82) — Checksums +Checksums +--------- + +`content_length` has been removed. In its stead, there +are four new checksumming methods: + +* `md5`, `sha1`, `sha256` all take a hexdigest string, e.g: + + ```ruby + class Candybar < Cask + url 'http://panic.com/museum/candybar/CandyBar%203.3.4.zip' + homepage 'http://panic.com/museum/candybar/' + version '3.3.4' + sha1 'f645e9da45a621415a07a7492c45923b1a1fd4d4' + end + ``` + +* `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. + + ```ruby + class Bartender < Cask + url 'http://www.macbartender.com/Demo/Bartender.zip' + homepage 'http://www.macbartender.com/' + version 'latest' + no_checksum + end + ``` + +`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. + + Code maps --------- diff --git a/lib/cask.rb b/lib/cask.rb index 8219358fb613f..c2d20688f38bb 100644 --- a/lib/cask.rb +++ b/lib/cask.rb @@ -48,7 +48,9 @@ def self.load(cask_title) end def self.title - self.name.gsub(/([a-z\d])([A-Z])/,'\1-\2').downcase + # Have to gsub it twice to deal with edge cases such as: + # BootXChange which should yield: boot-x-change, not boot-xchange + self.name.gsub(/([a-zA-Z\d])([A-Z])/,'\1-\2').gsub(/([a-zA-Z\d])([A-Z])/,'\1-\2').downcase end attr_reader :title @@ -63,6 +65,10 @@ def destination_path def installed? destination_path.exist? end + + def path + self.class.path @title + end def to_s @title diff --git a/lib/cask/audit.rb b/lib/cask/audit.rb deleted file mode 100644 index f961c7e5edb9a..0000000000000 --- a/lib/cask/audit.rb +++ /dev/null @@ -1,126 +0,0 @@ -class Cask::Audit - attr_reader :cask, :errors, :warnings, :headers, :response_status - - def initialize(cask, fetcher=Cask::Fetcher) - @cask = cask - @errors = [] - @warnings = [] - @headers = {} - @fetcher = fetcher - end - - def run! - _check_required_fields - return if errors? - _get_data_from_request - return if errors? - _check_response_status - return if errors? - _check_content_length - end - - def add_error(message) - @errors << message - end - - def add_warning(message) - @warnings << message - end - - def errors? - !@errors.empty? - end - - def warnings? - !@warnings.empty? - end - - def result - if errors? - "#{Tty.red}failed#{Tty.reset}" - elsif warnings? - "#{Tty.yellow}warning#{Tty.reset}" - else - "#{Tty.green}passed#{Tty.reset}" - end - end - - def summary - summary = ["audit for #{cask}: #{result}"] - - @errors.each do |error| - summary << " #{Tty.red}-#{Tty.reset} #{error}" - end - - @warnings.each do |warning| - summary << " #{Tty.yellow}-#{Tty.reset} #{warning}" - end - - summary.join("\n") - end - - def _check_required_fields - add_error "url is required" unless cask.url - add_error "version is required" unless cask.version - add_error "homepage is required" unless cask.homepage - end - - http_responses = [ - 'HTTP/1.0 200 OK', - 'HTTP/1.1 200 OK' - ] - - OK_RESPONSES = { - 'http' => http_responses, - 'https' => http_responses, - 'ftp' => [ 'OK' ] - } - - def _check_response_status - ok = OK_RESPONSES[cask.url.scheme] - unless ok.include?(@response_status) - add_error "unexpected http response, expecting #{ok.map(&:inspect).join(' or ')}, got #{@response_status.inspect}" - end - end - - def _check_content_length - remote_content_length = @headers['Content-Length'] - if cask.content_length.nil? - add_warning "specify content_length so we can check against URL, currently: content_length '#{remote_content_length}'" - else - unless cask.content_length == remote_content_length - add_warning "unexpected content_length for #{cask}; specified #{cask.content_length.inspect}, but got #{remote_content_length.inspect}" - end - end - end - - def _get_data_from_request - response = @fetcher.head(cask.url) - - if response.empty? - add_error "timeout while requesting #{cask.url}" - return - end - - response_lines = response.split("\n").map(&:chomp) - - case cask.url.scheme - when 'http', 'https' then - @response_status = response_lines.grep(/^HTTP/).last - http_headers = response_lines[(response_lines.index(@response_status)+1)..-1] - http_headers.each { |line| - header_name, header_value = line.split(': ') - @headers[header_name] = header_value - } - when 'ftp' then - @response_status = 'OK' - response_lines.each { |line| - header_name, header_value = line.split(': ') - @headers[header_name] = header_value - } - else - add_error "unknown scheme for #{cask.url}" - end - end - -end diff --git a/lib/cask/cli/install.rb b/lib/cask/cli/install.rb index 1bfad31b27469..06e949fbf12b6 100644 --- a/lib/cask/cli/install.rb +++ b/lib/cask/cli/install.rb @@ -6,6 +6,10 @@ def self.run(*cask_names) Cask::Installer.install(cask) rescue CaskUnavailableError => e onoe e + rescue ChecksumMissingError => e + onoe e + rescue ChecksumMismatchError => e + onoe e end end end diff --git a/lib/cask/dsl.rb b/lib/cask/dsl.rb index d19ff7c7831ec..dd817daa5ed0d 100644 --- a/lib/cask/dsl.rb +++ b/lib/cask/dsl.rb @@ -1,25 +1,17 @@ +require 'formula_support' + module Cask::DSL def self.included(base) base.extend(ClassMethods) end - - def content_length; self.class.content_length; end - - def homepage; self.class.homepage; end - - def url; self.class.url; end - - def version; self.class.version; end - + + def url; self.class.url end + def version; self.class.version end + def homepage; self.class.homepage end + + def sums; self.class.sums || [] end + module ClassMethods - def content_length(content_length=nil) - @content_length ||= content_length - end - - def homepage(homepage=nil) - @homepage ||= homepage - end - def url(url=nil) @url ||= (url && URI.parse(url)) end @@ -27,5 +19,30 @@ def url(url=nil) def version(version=nil) @version ||= version end + + def homepage(homepage=nil) + @homepage ||= homepage + end + + attr_reader :sums + + def md5(md5=nil) + @sums ||= [] + @sums << Checksum.new(:md5, md5) unless md5.nil? + end + + def sha1(sha1=nil) + @sums ||= [] + @sums << Checksum.new(:sha1, sha1) unless sha1.nil? + end + + def sha256(sha2=nil) + @sums ||= [] + @sums << Checksum.new(:sha2, sha2) unless sha2.nil? + end + + def no_checksum + @sums = 0 + end end end diff --git a/lib/cask/exceptions.rb b/lib/cask/exceptions.rb index 3f68370f663eb..32002f2f664f4 100644 --- a/lib/cask/exceptions.rb +++ b/lib/cask/exceptions.rb @@ -1,3 +1,5 @@ +require 'exceptions' + class CaskNotInstalledError < RuntimeError attr_reader :cask def initialize cask diff --git a/lib/cask/installer.rb b/lib/cask/installer.rb index 6f5325a16dd7b..f2cb1e2511212 100644 --- a/lib/cask/installer.rb +++ b/lib/cask/installer.rb @@ -1,9 +1,13 @@ +require 'digest' + class Cask::Installer class << self def install(cask) require 'formula_support' downloader = CurlDownloadStrategy.new(cask.title, SoftwareSpec.new(cask.url.to_s, cask.version)) downloaded_path = downloader.fetch + + _check_sums(downloaded_path, cask.sums) unless cask.sums === 0 FileUtils.mkdir_p cask.destination_path @@ -19,6 +23,18 @@ def uninstall(cask) cask.destination_path.rmtree end + + def _check_sums(path, sums) + has_sum = false + sums.each do |sum| + unless sum.empty? + computed = Checksum.new(sum.hash_type, Digest.const_get(sum.hash_type.to_s.upcase).file(path).hexdigest) + raise ChecksumMismatchError.new(sum, computed) unless sum == computed + has_sum = true + end + end + raise ChecksumMissingError.new("Checksum required. SHA1: '#{Digest::SHA1.file(path).hexdigest}'") unless has_sum + end def _with_extracted_mountpoints(path) if _dmg?(path) From f63e7cdec298803f9c006a651ac2c4783644e5ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sat, 8 Dec 2012 19:18:38 +1300 Subject: [PATCH 06/17] Audit is more thorough and based on homebrew's It checks whitespace, URLs, and code style just like Homebrew's one, albeit modified to fit Casks (a lot of compiling-related stuff was removed). --- README.md | 9 ++ lib/cask/auditor.rb | 220 +++++++++++++++++++++++++++++++++++++++++- lib/cask/cli/audit.rb | 18 +++- 3 files changed, 241 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9be0517caeda2..4f147661f2459 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,15 @@ are four new checksumming methods: provide the computed checksum so the cask can be easily amended. +Audit +----- + +`brew cask audit` has had a facelift, and is now based on `brew audit`. +It checks whitespace, URLs, and code style just like Homebrew's one, +albeit modified to fit Casks (a lot of compiling-related stuff was +removed). + + Code maps --------- diff --git a/lib/cask/auditor.rb b/lib/cask/auditor.rb index 1fe2dae6c35ad..2c71c7655df9e 100644 --- a/lib/cask/auditor.rb +++ b/lib/cask/auditor.rb @@ -1,7 +1,217 @@ class Cask::Auditor - def self.audit(cask) - audit = Cask::Audit.new(cask) - audit.run! - puts audit.summary + attr :f + attr :text + attr :problems, true + + def initialize f + @f = f + @problems = [] + @text = IO.read f.path end -end + + def audit_file + unless f.path.stat.mode.to_s(8) == "100644" + problem "Incorrect file permissions: chmod 644 #{f.path}" + end + + if /.+\z/ =~ text + problem "File should end with a newline" + end + end + + def audit_urls + unless f.homepage =~ %r[^https?://] + problem "The homepage should start with http or https." + end + + # Google Code homepages should end in a slash + if f.homepage =~ %r[^https?://code\.google\.com/p/[^/]+[^/]$] + problem "Google Code homepage should end with a slash." + end + + urls = [(f.url rescue nil), (f.stable.url rescue nil), (f.devel.url rescue nil), (f.head.url rescue nil)].compact + + # Check GNU urls; doesn't apply to mirrors + if urls.any? { |p| p =~ %r[^(https?|ftp)://(.+)/gnu/] } + problem "\"ftpmirror.gnu.org\" is preferred for GNU software." + end + + # the rest of the checks apply to mirrors as well + urls.concat([(f.stable.mirrors rescue nil), (f.devel.mirrors rescue nil)].flatten.compact) + + # Check protocols + if urls.any? { |p| p =~ %r[^(https?|ftp)://] } + problem "This url's protocol is not supported." + end + + # Check SourceForge urls + urls.each do |p| + # Is it a filedownload (instead of svnroot) + next if p =~ %r[/svnroot/] + next if p =~ %r[svn\.sourceforge] + + # Is it a sourceforge http(s) URL? + next unless p =~ %r[^https?://.*\bsourceforge\.] + + if p =~ /(\?|&)use_mirror=/ + problem "Update this url (don't use #{$1}use_mirror)." + end + + if p =~ /\/download$/ + problem "Update this url (don't use /download)." + end + + if p =~ %r[^http://prdownloads\.] + problem "Update this url (don't use prdownloads). See:\nhttp://librelist.com/browser/homebrew/2011/1/12/prdownloads-is-bad/" + end + + if p =~ %r[^http://\w+\.dl\.] + problem "Update this url (don't use specific dl mirrors)." + end + end + end + + # This isn't used for the moment + def audit_specs + problem "Head-only (no stable download)" if f.head_only? + + [:stable, :devel].each do |spec| + s = f.send(spec) + next if s.nil? + + if s.version.to_s.empty? + problem "Invalid or missing #{spec} version" + else + version_text = s.version unless s.version.detected_from_url? + version_url = Version.parse(s.url) + if version_url.to_s == version_text.to_s + problem "#{spec} version #{version_text} is redundant with version scanned from URL" + end + end + + cksum = s.checksum + next if cksum.nil? + + len = case cksum.hash_type + when :md5 then 32 + when :sha1 then 40 + when :sha256 then 64 + end + + problem "md5 is broken, deprecated: use sha1 instead" if cksum.hash_type == :md5 + + if cksum.empty? + problem "#{cksum.hash_type} is empty" + else + problem "#{cksum.hash_type} should be #{len} characters" unless cksum.hexdigest.length == len + problem "#{cksum.hash_type} contains invalid characters" unless cksum.hexdigest =~ /^[a-fA-F0-9]+$/ + problem "#{cksum.hash_type} should be lowercase" unless cksum.hexdigest == cksum.hexdigest.downcase + end + end + end + + def audit_text + if text =~ /<(Formula|AmazonWebServicesFormula|ScriptFileFormula|GithubGistFormula)/ + problem "Use a space in class inheritance: class Foo < #{$1}" + end + + # FileUtils is included in Formula + if text =~ /FileUtils\.(\w+)/ + problem "Don't need 'FileUtils.' before #{$1}." + end + + # Check for string interpolation of single values. + if text =~ /(system|gsub!) .* ['"]#\{(\w+(\.\w+)?)\}['"]/ + problem "Don't need to interpolate \"#{$2}\" with #{$1}" + end + + # Check for string concatenation; prefer interpolation + if text =~ /(#\{\w+\s*\+\s*['"][^}]+\})/ + problem "Try not to concatenate paths in string interpolation:\n #{$1}" + end + + # Prefer formula path shortcuts in Pathname+ + if text =~ %r{\(\s*(prefix\s*\+\s*(['"])(applications|share)[/'"])} + problem "\"(#{$1}...#{$2})\" should be \"(#{$3}+...)\"" + end + + if text =~ %r[((man)\s*\+\s*(['"])(man[1-8])(['"]))] + problem "\"#{$1}\" should be \"#{$4}\"" + end + + # Prefer formula path shortcuts in strings + if text =~ %r[(\#\{prefix\}/(applications|share))] + problem "\"#{$1}\" should be \"\#{#{$2}}\"" + end + + if text =~ %r[((\#\{prefix\}/share/man/|\#\{man\}/)(man[1-8]))] + problem "\"#{$1}\" should be \"\#{#{$3}}\"" + end + + if text =~ %r[((\#\{share\}/(man)))[/'"]] + problem "\"#{$1}\" should be \"\#{#{$3}}\"" + end + + if text =~ %r[(\#\{prefix\}/share/(info|man))] + problem "\"#{$1}\" should be \"\#{#{$2}}\"" + end + + # No trailing whitespace, please + if text =~ /(\t|[ ])+$/ + problem "Trailing whitespace was found" + end + + if text =~ /if\s+ARGV\.include\?\s+'--(HEAD|devel)'/ + problem "Use \"if ARGV.build_#{$1.downcase}?\" instead" + end + + if text =~ /^[ ]*\t/ + problem "Use spaces instead of tabs for indentation" + end + + if text =~ /system\s+['"](env|export)/ + problem "Use ENV instead of invoking '#{$1}' to modify the environment" + end + + if text =~ /version == ['"]HEAD['"]/ + problem "Use 'build.head?' instead of inspecting 'version'" + end + + if text =~ /build\.include\?\s+['"]\-\-(.*)['"]/ + problem "Reference '#{$1}' without dashes" + end + + if text =~ /ARGV\.(?!(debug|verbose|find)\?)/ + problem "Use build instead of ARGV to check options" + end + + if text =~ /def options/ + problem "Use new-style option definitions" + end + + if text =~ /MACOS_VERSION/ + problem "Use MacOS.version instead of MACOS_VERSION" + end + + if text =~ /(MacOS.((snow_)?leopard|leopard|(mountain_)?lion)\?)/ + problem "#{$1} is deprecated, use a comparison to MacOS.version instead" + end + + if text =~ /skip_clean\s+:all/ + problem "`skip_clean :all` is deprecated; brew no longer strips symbols" + end + end + + def audit + audit_file + #audit_specs + audit_urls + audit_text + end + + private + + def problem p + @problems << p + end +end \ No newline at end of file diff --git a/lib/cask/cli/audit.rb b/lib/cask/cli/audit.rb index 4839e54b73ec8..59e1531e443a8 100644 --- a/lib/cask/cli/audit.rb +++ b/lib/cask/cli/audit.rb @@ -1,8 +1,24 @@ class Cask::CLI::Audit def self.run(*args) + formula_count = 0 + problem_count = 0 + casks_to_audit = args.empty? ? Cask.all : args.map { |arg| Cask.load(arg) } casks_to_audit.each do |cask| - Cask::Auditor.audit(cask) + ca = Cask::Auditor.new(cask) + ca.audit + + unless ca.problems.empty? + puts "#{cask.title}:" + ca.problems.each { |p| puts " * #{p}" } + puts + formula_count += 1 + problem_count += ca.problems.size + end + end + + unless problem_count.zero? + ofail "#{problem_count} problems in #{formula_count} casks" end end From 0e95ebfc5695f6b0b52489d6614efa49fabb80a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sun, 9 Dec 2012 12:08:39 +1300 Subject: [PATCH 07/17] Edit map --- MAP | 104 +++++++++++++++++++++++++++--------------------------- README.md | 7 +++- 2 files changed, 58 insertions(+), 53 deletions(-) diff --git a/MAP b/MAP index 17de7bee46889..dc607eaa9fe6d 100644 --- a/MAP +++ b/MAP @@ -1,4 +1,4 @@ -1 | +2 | FILES | PATHWAYS -------- | ----------- | @@ -17,13 +17,13 @@ | Casks Library | | +-+------+---+ | | +------------------+ +---------------+ | | | v | | Extract and | | +-------+ +---+ +----------------------+ | | copy to Cellar | - /Gemfile | | | | Cask::Installer | | +----------+-------+ - /Rakefile | v +---------+----------+ | .install() | | | - /test/ | +------------+ | self. * | +--------+-------------+ | | - +----------------+ | | Cask.init | | lookup_ | _command | | | +-----*-----+ - | Used for tests | | | | +---------+----------+ | | |+---------+| - +----------------+ | +------------+ | v | || DONE. || - | +---------+-------+ +------------------------+ | |+---------+| + /Gemfile | | | | Cask::Installer | | +------------------+ + /Rakefile | v +---------+----------+ | .install() | | ------ DONE ------ + /test/ | +------------+ | self. * | +--------+-------------+ | + +----------------+ | | Cask.init | | lookup_ | _command | | | + | Used for tests | | | | +---------+----------+ | | + +----------------+ | +------------+ | v | + | +---------+-------+ +------------------------+ | /lib/plist/ | | | | >CURL< | | +---------------------+ | v <-fallback-+ v +------------------------+ | +-------------------+ | PList parser | | +-------------+ +-+----------+ | CurlDownloadStrategy | +->| Otherwise: | @@ -36,11 +36,11 @@ +------------------------+ | | | * title | | | The Meat of the Matter | | +----*-----+ | * url | | +------------------------+ | |+--------+| | * version | | - | || .run() || +------------+-----------+ | -------------------------------+ |+--------+| | | - | +--------------+ - EXCEPTIONS | - ------------- | + | || .run() || +------------+-----------+ |YES +------------------------------+ |+--------+| | +-+---------+NO +-------+ + | +----------->| Checksums +--->| Error | + EXCEPTIONS | | match? | +-------+ + ------------- | +-----------+ | CaskNotInstalledError | Uninstalling a cask: Listing/Searching casks: Linkapps | @@ -61,53 +61,53 @@ DSL | | .uninstall() | | +--> From: | Also, that +-------------------------+ ------ | +------------+---------+ | Taps/example/Casks/cask.rb | method lives | List all .app files in | | | | | in actions.rb | . and all subdirs (look | - * content_length | v | To: example/cask | :/ :S| in destination_path). | + * homepage | v | To: example/cask | :/ :S| in destination_path). | | +---------------+ +---+--------------------------+ +-------------------------+ - (Basic content checking) | | Remove entire | | | For each: | + (For human use only atm) | | Remove entire | | | For each: | | | tree in | | +----------------------+ | | - * homepage | | Cellar | +->| Filter by installed | | > if symlink exists: | + * url | | Cellar | +->| Filter by installed | | > if symlink exists: | | +---------------+ | or keywords… or not +-+ | * destroy and relink | - (For human use only atm) | ---- DONE. ---- +----------------------+ | | | + (To download archive) | ---- DONE. ---- +----------------------+ | | | | v | > if not symlink: | - * url | +----------------+ | * do nothing, say so | + * version | +----------------+ | * do nothing, say so | | | Pretty listing | | | - (To download archive) | +----------------+ | > else: | + (For DL, but not rly used) | +----------------+ | > else: | | ----- DONE ----- | * create symlink in | - * version | | ~/Applications | + * md5 / sha1 / sha256 | | ~/Applications | | +-------------------------+ - (For DL, but not rly used) | + (For checksumming) | | -------------------------------+ - - - Editing a cask: Creating a cask: Auditing a cask: +------------------------+ - +--> | Check required fields: | - +-----------------+ +------------------+ | | | - | Cask::CLI::Edit | +-- There is a file --+ | Cask::CLI::Audit | | | * url | - | .run() | | | | .run() | | | * version | - +-----------------+ lib/cli/create.rb +------------------+ | | * homepage | - ------- * ------- | | -------- * ------- | +------------------------+ - | +-- but it's empty. --+ | | - +-------+-------+ +--------+-------+ | +-------------------------+ - | * | | * | +--> | Check URL is valid, | - | Cask | .path | | Cask | .load | | | that the scheme:// | - +-------+-------+ +--------+-------+ | | is known, and that | - | | | | content_length matches.| - v v | +-------------------------+ - +----------------+ +-----------------+ | - | Cask formula |NO +-------+ | Cask::Auditor | | +--------------------------+ - | exists ? +--->| Error | | .audit() | +--> | Don't just stop at first | - +-------+--------+ +-------+ +-----------------+ | | error, create summary | - | | This is just a | | | of all of them. | - v YES | proxy for | | +--------------------------+ - +---------+ | Cask::Audit#run!| | - | Open | +--------+--------+ | - | | | | - | $EDITOR | +----------+ - +---------+ - - - + * no_checksum | + | + (To avoid checksumming) | + | Editing a cask: Creating a cask: Auditing a cask: +---------------+ + | +-->| File mod 644? | + | +-----------------+ +------------------+ | +---------------+ + | | Cask::CLI::Edit | +-- There is a file --+ | Cask::CLI::Audit | | + | | .run() | | | | .run() | | +---------------+ + | +-----------------+ lib/cli/create.rb +------------------+ +-->| Correct URLs? | + | ------- * ------- | | -------- * ------- | +---------------+ + | | +-- but it's empty. --+ | | + | +-------+-------+ +--------+-------+ | +-----------------+ + | | * | | * | +-->| Bad whitespace? | + | | Cask | .path | | Cask | .load | | +-----------------+ + | +-------+-------+ +--------+-------+ | + | | | | +------------------+ + | v v +-->| Good code style? | + | +----------------+ +-----------------+ | +------------------+ + | | Cask formula |NO +-------+ | Cask::Auditor | | + | | exists ? +--->| Error | | .new() | | +--------------+ + | +-------+--------+ +-------+ +-----------------+ + | Checksumming | Disabled + | | | ca.audit *------+--+ +--------------+ for now + | v YES | | + +---------+ | ca.problems * | + | Open | +-------------+---+ + | | | + | $EDITOR | v ANY? + +---------+ +-------+ + | Error | + +-------+ + diff --git a/README.md b/README.md index 4f147661f2459..4263e4f28ba7a 100644 --- a/README.md +++ b/README.md @@ -75,4 +75,9 @@ I've also spent (and am still spending) some time creating code maps to visualize how it all works. Here they are: > ![Map 1](http://i.imgur.com/oBMyI.png) -> Vanilla phinze/cask v.0.5.4 \ No newline at end of file +> Vanilla phinze/cask v.0.5.4 + +- - - - - + +> ![Map 2](https://f.cloud.github.com/assets/155787/2089/f3b428e2-418b-11e2-9ac9-db796fa166c7.png) +> Current situation \ No newline at end of file From 81ccea93fcface93fc999a6ca88e3b0f3359643b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Mon, 10 Dec 2012 10:59:06 +1300 Subject: [PATCH 08/17] Install to prefix/Caskroom --- MAP | 4 ++-- README.md | 14 +++++++++++--- lib/cask.rb | 11 ++++++----- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/MAP b/MAP index dc607eaa9fe6d..86ffaf9c8bebb 100644 --- a/MAP +++ b/MAP @@ -1,4 +1,4 @@ -2 | +3 | FILES | PATHWAYS -------- | ----------- | @@ -16,7 +16,7 @@ +---------------+ | +---------+ | * * | +-------+---------+ | v | Casks Library | | +-+------+---+ | | +------------------+ +---------------+ | | | v | | Extract and | - | +-------+ +---+ +----------------------+ | | copy to Cellar | + | +-------+ +---+ +----------------------+ | | copy to Caskroom | /Gemfile | | | | Cask::Installer | | +------------------+ /Rakefile | v +---------+----------+ | .install() | | ------ DONE ------ /test/ | +------------+ | self. * | +--------+-------------+ | diff --git a/README.md b/README.md index 4263e4f28ba7a..f949a2f211c85 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,13 @@ following issues: - [#113](https://github.com/phinze/homebrew-cask/issues/113) — Uninstalling removes symlinks/aliases/shortcuts - [#105](https://github.com/phinze/homebrew-cask/issues/105) — Features to help manage multiple .app folders - [#99](https://github.com/phinze/homebrew-cask/issues/99) — Spotlight visibility -- [#89](https://github.com/phinze/homebrew-cask/issues/89) — Don't make `brew doctor` complain +- [#89](https://github.com/phinze/homebrew-cask/issues/89) — ~~Don't make `brew doctor` complain~~ (done for unlinked kegs, not for formulae) - [#72](https://github.com/phinze/homebrew-cask/issues/72) — Features for metadata - [#38](https://github.com/phinze/homebrew-cask/issues/38) — Moar configuration - [#30](https://github.com/phinze/homebrew-cask/pull/30) — Config: install/link path - [#41](https://github.com/phinze/homebrew-cask/issues/41) — Better version management - [#69](https://github.com/phinze/homebrew-cask/issues/69) — Features for installing different types -- [#82](https://github.com/phinze/homebrew-cask/issues/82) — Checksums +- [#82](https://github.com/phinze/homebrew-cask/issues/82) — ~~Checksums~~ Checksums @@ -68,6 +68,14 @@ albeit modified to fit Casks (a lot of compiling-related stuff was removed). +Caskroom +-------- + +Casks are now installed in `$HOMEBREW_PREFIX/Caskroom/$name/$version/` +instead of in the Cellar. This stops Homebrew from complaining about +unlinked kegs, and from listing our casks on `brew list`. + + Code maps --------- @@ -79,5 +87,5 @@ code maps to visualize how it all works. Here they are: - - - - - -> ![Map 2](https://f.cloud.github.com/assets/155787/2089/f3b428e2-418b-11e2-9ac9-db796fa166c7.png) +> ![Map 3](https://f.cloud.github.com/assets/155787/2685/a7a77568-424d-11e2-9fa5-88986c1f2c32.png) > Current situation \ No newline at end of file diff --git a/lib/cask.rb b/lib/cask.rb index c2d20688f38bb..cfeb31272ebe2 100644 --- a/lib/cask.rb +++ b/lib/cask.rb @@ -18,20 +18,21 @@ def self.tapspath HOMEBREW_PREFIX.join "Library", "Taps" end - def self.cellarpath - HOMEBREW_CELLAR + def self.caskroom + HOMEBREW_PREFIX.join "Caskroom" end def self.appdir @appdir ||= Pathname.new(File.expand_path("~/Applications")) end - def self.set_appdir(canned_appdir) - @appdir = canned_appdir + def self.set_appdir(_appdir) + @appdir = _appdir end def self.init HOMEBREW_CACHE.mkpath unless HOMEBREW_CACHE.exist? + caskroom.mkpath unless caskroom.exist? appdir.mkpath unless appdir.exist? end @@ -59,7 +60,7 @@ def initialize(title=self.class.title) end def destination_path - HOMEBREW_CELLAR.join(self.title).join(self.version) + self.class.caskroom.join(self.title).join(self.version) end def installed? From 7de87cea5f40132a69503eff7c67cc1e481997ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Mon, 10 Dec 2012 12:35:22 +1300 Subject: [PATCH 09/17] Linkpath is changeable using an option --- MAP | 10 +++++----- README.md | 28 +++++++++++++++++++++++++--- lib/cask/cli.rb | 18 +++++++++++++++--- lib/cask/cli/linkapps.rb | 2 +- 4 files changed, 46 insertions(+), 12 deletions(-) diff --git a/MAP b/MAP index 86ffaf9c8bebb..a9f22357563d4 100644 --- a/MAP +++ b/MAP @@ -1,4 +1,4 @@ -3 | +4 | FILES | PATHWAYS -------- | ----------- | @@ -73,11 +73,11 @@ | | Pretty listing | | | (For DL, but not rly used) | +----------------+ | > else: | | ----- DONE ----- | * create symlink in | - * md5 / sha1 / sha256 | | ~/Applications | + * md5 / sha1 / sha256 | | {Cask.appdir} | | +-------------------------+ - (For checksumming) | - | - * no_checksum | + (For checksumming) | ^ + | | This can be set + * no_checksum | | with an option | (To avoid checksumming) | | Editing a cask: Creating a cask: Auditing a cask: +---------------+ diff --git a/README.md b/README.md index f949a2f211c85..a0f623533a560 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ following issues: - [#99](https://github.com/phinze/homebrew-cask/issues/99) — Spotlight visibility - [#89](https://github.com/phinze/homebrew-cask/issues/89) — ~~Don't make `brew doctor` complain~~ (done for unlinked kegs, not for formulae) - [#72](https://github.com/phinze/homebrew-cask/issues/72) — Features for metadata -- [#38](https://github.com/phinze/homebrew-cask/issues/38) — Moar configuration -- [#30](https://github.com/phinze/homebrew-cask/pull/30) — Config: install/link path +- [#38](https://github.com/phinze/homebrew-cask/issues/38) — ~~Moar configuration~~ +- [#30](https://github.com/phinze/homebrew-cask/pull/30) — ~~Config: install/link path~~ - [#41](https://github.com/phinze/homebrew-cask/issues/41) — Better version management - [#69](https://github.com/phinze/homebrew-cask/issues/69) — Features for installing different types - [#82](https://github.com/phinze/homebrew-cask/issues/82) — ~~Checksums~~ @@ -75,6 +75,28 @@ Casks are now installed in `$HOMEBREW_PREFIX/Caskroom/$name/$version/` instead of in the Cellar. This stops Homebrew from complaining about unlinked kegs, and from listing our casks on `brew list`. +Configuration +------------- + +You can now configure some aspects of `brew cask`'s operation. You can set +options on the command: + + $ brew cask install adium --linkpath=/Applications + +or you can set them in the `HOMEBREW_CASK_OPTS` environment variable: + +```bash +# ~/.bashrc, somewhere at the end of the file + +export HOMEBREW_CASK_OPTS='--linkpath=/Applications' +``` + +Command-line options override environment ones. + +### Available options: + +* `--linkpath` — Where applications are linked / aliased. Defaults to ~/Applications. + Code maps --------- @@ -87,5 +109,5 @@ code maps to visualize how it all works. Here they are: - - - - - -> ![Map 3](https://f.cloud.github.com/assets/155787/2685/a7a77568-424d-11e2-9fa5-88986c1f2c32.png) +> ![Map 4](https://f.cloud.github.com/assets/155787/2748/f04feb64-4258-11e2-8022-a84b1fa57b3d.png) > Current situation \ No newline at end of file diff --git a/lib/cask/cli.rb b/lib/cask/cli.rb index 66c20f81fc3c6..891214e7d5d45 100644 --- a/lib/cask/cli.rb +++ b/lib/cask/cli.rb @@ -1,3 +1,6 @@ +require 'optparse' +require 'shellwords' + class Cask::CLI def self.commands Cask::CLI.constants - ["NullCommand"] @@ -14,6 +17,7 @@ def self.lookup_command(command) def self.process(arguments) Cask.init command, *rest = *arguments + process_options(rest) lookup_command(command).run(*rest) end @@ -34,6 +38,14 @@ def self.nice_listing(cask_list) } list.sort end + + def self.process_options(args) + OptionParser.new do |opts| + opts.on("--linkpath=MANDATORY") do |v| + Cask.set_appdir Pathname.new v + end + end.parse!(Shellwords.shellsplit(ENV['HOMEBREW_CASK_OPTS']) + args) + end class NullCommand @@ -43,7 +55,7 @@ def initialize(attempted_name) def run(*args) purpose - if @attempted_name + if @attempted_name and @attempted_name != "help" puts "!! " puts "!! no command with name: #{@attempted_name}" puts "!! " @@ -52,10 +64,10 @@ def run(*args) end def purpose - puts <<-PURPOSE.gsub(/^ {6}/, '') + puts <<-PURPOSE.undent {{ brew-cask }} brew-cask provides a friendly homebrew-style CLI workflow for the - administration Mac applications distributed as binaries + administration of Mac applications distributed as binaries PURPOSE end diff --git a/lib/cask/cli/linkapps.rb b/lib/cask/cli/linkapps.rb index 0b7ff9035e013..0d349143e1659 100644 --- a/lib/cask/cli/linkapps.rb +++ b/lib/cask/cli/linkapps.rb @@ -7,6 +7,6 @@ def self.run(*args) end def self.help - "makes a symlink from all cask-installed .app files into ~/Applications" + "makes a symlink from all cask-installed .app files into #{Cask.appdir}" end end From 478eef04aa97b604a573c542dd6ed58e2c8e6075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Mon, 10 Dec 2012 13:28:11 +1300 Subject: [PATCH 10/17] Add `brew cask info` --- README.md | 13 +++++++++++++ lib/cask.rb | 23 +++++++++++++++++++++++ lib/cask/cli/info.rb | 16 ++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 lib/cask/cli/info.rb diff --git a/README.md b/README.md index a0f623533a560..1560cb51ef012 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,19 @@ Command-line options override environment ones. * `--linkpath` — Where applications are linked / aliased. Defaults to ~/Applications. +Cask info +--------- + +`brew cask info ` now gives: + +```plain +adium: 1.5.3 +http://www.adium.im/ +/usr/local/Caskroom/adium/1.5.3 (2947 files, 69M) +https://github.com/phinze/cask/commits/master/Casks/adium.rb +``` + + Code maps --------- diff --git a/lib/cask.rb b/lib/cask.rb index cfeb31272ebe2..1b9cdd91ed940 100644 --- a/lib/cask.rb +++ b/lib/cask.rb @@ -70,6 +70,29 @@ def installed? def path self.class.path @title end + + def info + installation = if self.installed? + "#{self.destination_path} (#{self.destination_path.abv})" + else + "Not installed" + end + + <<-PURPOSE.undent + #{self}: #{self.version} + #{self.homepage} + #{installation} + #{self.github_info} + PURPOSE + end + + def github_info + tap = self.title + tap = self.class.all_titles.grep(/#{tap}$/).first unless tap =~ /\// + tap, name = tap.split "/" + user, repo = tap.split "-" + "https://github.com/#{user}/#{repo}/commits/master/Casks/#{name}.rb" + end def to_s @title diff --git a/lib/cask/cli/info.rb b/lib/cask/cli/info.rb new file mode 100644 index 0000000000000..c8eb659ec681a --- /dev/null +++ b/lib/cask/cli/info.rb @@ -0,0 +1,16 @@ +class Cask::CLI::Info + def self.run(*cask_names) + cask_names.each do |cask_name| + begin + cask = Cask.load(cask_name) + puts cask.info + rescue CaskUnavailableError => e + onoe e + end + end + end + + def self.help + "displays information about the cask of the given name" + end +end From b5d2476e21af8dde8fb4f00bb99c591169a91389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Mon, 10 Dec 2012 14:05:43 +1300 Subject: [PATCH 11/17] Add `brew cask open` --- README.md | 4 +++- lib/cask/cli/info.rb | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1560cb51ef012..cdfd499dc6137 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ following issues: - [#105](https://github.com/phinze/homebrew-cask/issues/105) — Features to help manage multiple .app folders - [#99](https://github.com/phinze/homebrew-cask/issues/99) — Spotlight visibility - [#89](https://github.com/phinze/homebrew-cask/issues/89) — ~~Don't make `brew doctor` complain~~ (done for unlinked kegs, not for formulae) -- [#72](https://github.com/phinze/homebrew-cask/issues/72) — Features for metadata +- [#72](https://github.com/phinze/homebrew-cask/issues/72) — ~~Features for metadata~~ - [#38](https://github.com/phinze/homebrew-cask/issues/38) — ~~Moar configuration~~ - [#30](https://github.com/phinze/homebrew-cask/pull/30) — ~~Config: install/link path~~ - [#41](https://github.com/phinze/homebrew-cask/issues/41) — Better version management @@ -110,6 +110,8 @@ http://www.adium.im/ https://github.com/phinze/cask/commits/master/Casks/adium.rb ``` +And you can use `brew cask open ` to open its homepage. + Code maps --------- diff --git a/lib/cask/cli/info.rb b/lib/cask/cli/info.rb index c8eb659ec681a..3d436ffba526f 100644 --- a/lib/cask/cli/info.rb +++ b/lib/cask/cli/info.rb @@ -14,3 +14,20 @@ def self.help "displays information about the cask of the given name" end end + +class Cask::CLI::Open + def self.run(*cask_names) + cask_names.each do |cask_name| + begin + cask = Cask.load(cask_name) + exec "open", cask.homepage + rescue CaskUnavailableError => e + onoe e + end + end + end + + def self.help + "opens the homepage of the cask of the given name" + end +end \ No newline at end of file From 74b09869882c61371f89f6a5c9b291d740ac122c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Mon, 10 Dec 2012 22:01:07 +1300 Subject: [PATCH 12/17] Use stable / devel / edge specs Can now specify alternate specs for *devel* (checksummed, versioned) and *edge* (un-checksummed, unversioned) using blocks, see README.md. --- Casks/adium.rb | 1 - Casks/anvil.rb | 6 +- Casks/aquamacs.rb | 1 - Casks/arq.rb | 6 +- Casks/at-monitor.rb | 6 +- Casks/bartender.rb | 6 +- Casks/bettertouchtool.rb | 6 +- Casks/boot-x-changer.rb | 1 - Casks/candybar.rb | 3 +- Casks/changes.rb | 6 +- Casks/chocolat.rb | 6 +- Casks/chromium.rb | 3 +- Casks/clip-menu.rb | 1 - Casks/colloquy.rb | 1 - Casks/cyberduck.rb | 1 - Casks/disk-inventory-x.rb | 6 +- Casks/divvy.rb | 6 +- Casks/firefox-aurora.rb | 8 ++- Casks/firefox.rb | 12 ++++ Casks/fluid.rb | 1 - Casks/flux.rb | 6 +- Casks/gfxcardstatus.rb | 1 - Casks/github.rb | 6 +- Casks/gitx-l.rb | 1 - Casks/gitx.rb | 6 +- Casks/gmail-notifr.rb | 1 - Casks/google-chrome-canary.rb | 6 +- Casks/google-chrome.rb | 1 - Casks/google-notifier.rb | 1 - Casks/handbrakebatch.rb | 6 +- Casks/hands-off.rb | 1 - Casks/intellij-community.rb | 1 - Casks/intellij-ultimate.rb | 1 - Casks/irip.rb | 6 +- Casks/istat-menus.rb | 1 - Casks/iterm2.rb | 1 - Casks/jumpcut.rb | 1 - Casks/justlooking.rb | 1 - Casks/keepass-x.rb | 1 - Casks/keyboard-maestro.rb | 6 +- Casks/little-snitch.rb | 1 - Casks/livestation.rb | 1 - Casks/menu-bar-filter.rb | 1 - Casks/moom.rb | 6 +- Casks/namemangler.rb | 6 +- Casks/notational-velocity.rb | 6 +- Casks/nv-alt.rb | 1 - Casks/one-password.rb | 1 - Casks/open-office.rb | 3 +- Casks/paintbrush.rb | 3 +- Casks/pandora-jam.rb | 6 +- Casks/picard.rb | 1 - Casks/plex.rb | 1 - Casks/postgres.rb | 7 ++- Casks/propane.rb | 6 +- Casks/quicksilver.rb | 6 +- Casks/racket.rb | 1 - Casks/rdio.rb | 6 +- Casks/ringtones.rb | 6 +- Casks/ripit.rb | 6 +- Casks/rubymine.rb | 1 - Casks/scrivener.rb | 6 +- Casks/scrup.rb | 1 - Casks/seashore.rb | 4 +- Casks/sequel-pro.rb | 1 - Casks/skype.rb | 1 - Casks/slate.rb | 6 +- Casks/sourcetree.rb | 1 - Casks/sparrow.rb | 7 ++- Casks/spotify.rb | 1 - Casks/steam.rb | 1 - Casks/tagalicious.rb | 6 +- Casks/textwrangler.rb | 1 - Casks/the-unarchiver.rb | 1 - Casks/time-machine-editor.rb | 6 +- Casks/transmission.rb | 1 - Casks/tvmobili.rb | 1 - Casks/vlc.rb | 1 - Casks/woodhouse.rb | 1 - Casks/x-quartz.rb | 1 - Casks/xscope.rb | 1 - MAP | 106 +++++++++++++++++----------------- README.md | 104 ++++++++++++++++++++++----------- lib/cask.rb | 69 ++++++++++++++++++---- lib/cask/actions.rb | 2 +- lib/cask/auditor.rb | 17 +++--- lib/cask/cli.rb | 29 +++++++++- lib/cask/dsl.rb | 76 ++++++++++++++++-------- lib/cask/installer.rb | 16 +---- 89 files changed, 390 insertions(+), 296 deletions(-) diff --git a/Casks/adium.rb b/Casks/adium.rb index 8d43ad4b18fc7..8de5db65ddd96 100644 --- a/Casks/adium.rb +++ b/Casks/adium.rb @@ -1,6 +1,5 @@ class Adium < Cask url 'http://download.adium.im/Adium_1.5.3.dmg' homepage 'http://www.adium.im/' - version '1.5.3' sha1 'ea16f7b65b8b37caa9025f4d68c0dd71845a4027' end diff --git a/Casks/anvil.rb b/Casks/anvil.rb index e76ca8a51eee3..02103104a1551 100644 --- a/Casks/anvil.rb +++ b/Casks/anvil.rb @@ -1,6 +1,6 @@ class Anvil < Cask - url 'http://anvilformac.com/download' homepage 'http://anvilformac.com/' - version 'latest' - no_checksum + edge do + url 'http://anvilformac.com/download' + end end diff --git a/Casks/aquamacs.rb b/Casks/aquamacs.rb index 8481ca706ea0b..b20993b472bcf 100644 --- a/Casks/aquamacs.rb +++ b/Casks/aquamacs.rb @@ -2,5 +2,4 @@ class Aquamacs < Cask url 'http://braeburn.aquamacs.org/~dr/Aquamacs/24/Aquamacs-nightly.tar.bz2' homepage 'http://aquamacs.org/' version '3.x Nightly' - no_checksum end diff --git a/Casks/arq.rb b/Casks/arq.rb index 0212e2252addf..e026dcd0b8cff 100644 --- a/Casks/arq.rb +++ b/Casks/arq.rb @@ -1,6 +1,6 @@ class Arq < Cask - url 'http://www.haystacksoftware.com/arq/Arq.zip' homepage 'http://www.haystacksoftware.com/arq/' - version 'latest' - no_checksum + edge do + url 'http://www.haystacksoftware.com/arq/Arq.zip' + end end diff --git a/Casks/at-monitor.rb b/Casks/at-monitor.rb index a4049e931afe3..994d31eaf18a4 100644 --- a/Casks/at-monitor.rb +++ b/Casks/at-monitor.rb @@ -1,6 +1,6 @@ class AtMonitor < Cask - url 'http://download.atpurpose.com/atMonitor/atMonitor.zip' homepage 'http://www.atpurpose.com/atMonitor/' - version 'latest' - no_checksum + edge do + url 'http://download.atpurpose.com/atMonitor/atMonitor.zip' + end end diff --git a/Casks/bartender.rb b/Casks/bartender.rb index 7e77385b1cac8..6cdc99da457c0 100644 --- a/Casks/bartender.rb +++ b/Casks/bartender.rb @@ -1,6 +1,6 @@ class Bartender < Cask - url 'http://www.macbartender.com/Demo/Bartender.zip' homepage 'http://www.macbartender.com/' - version 'latest' - no_checksum + edge do + url 'http://www.macbartender.com/Demo/Bartender.zip' + end end diff --git a/Casks/bettertouchtool.rb b/Casks/bettertouchtool.rb index 49d4ae87c3727..68ed5bce044d5 100644 --- a/Casks/bettertouchtool.rb +++ b/Casks/bettertouchtool.rb @@ -1,6 +1,6 @@ class Bettertouchtool < Cask - url 'http://www.boastr.de/BetterTouchTool.zip' homepage 'http://blog.boastr.net/' - version 'latest' - no_checksum + edge do + url 'http://www.boastr.de/BetterTouchTool.zip' + end end diff --git a/Casks/boot-x-changer.rb b/Casks/boot-x-changer.rb index eddf775ea8fb9..da8237b8fc570 100644 --- a/Casks/boot-x-changer.rb +++ b/Casks/boot-x-changer.rb @@ -1,6 +1,5 @@ class BootXChanger < Cask url 'http://namedfork.net/_media/bootxchanger_2.0.dmg' homepage 'http://namedfork.net/bootxchanger' - version '2.0' sha1 'bc8c80913ba09c1fc2f354b954b321f261bb2e36' end diff --git a/Casks/candybar.rb b/Casks/candybar.rb index 9ca5c5815bdd0..1c5c535307965 100644 --- a/Casks/candybar.rb +++ b/Casks/candybar.rb @@ -1,7 +1,6 @@ class Candybar < Cask - url 'http://panic.com/museum/candybar/CandyBar%203.3.4.zip' + url 'http://panic.com/museum/candybar/CandyBar 3.3.4.zip' homepage 'http://panic.com/museum/candybar/' - version '3.3.4' sha1 'f645e9da45a621415a07a7492c45923b1a1fd4d4' end diff --git a/Casks/changes.rb b/Casks/changes.rb index 9ea280c0f1e34..1e8bef1dc8fbe 100644 --- a/Casks/changes.rb +++ b/Casks/changes.rb @@ -1,7 +1,7 @@ class Changes < Cask - url 'http://bitbq.com/changes/download.php' homepage 'http://bitbq.com/changes/' - version 'latest' - no_checksum + edge do + url 'http://bitbq.com/changes/download.php' + end end diff --git a/Casks/chocolat.rb b/Casks/chocolat.rb index 4a7e8d978acd7..fc8cb5873c419 100644 --- a/Casks/chocolat.rb +++ b/Casks/chocolat.rb @@ -1,7 +1,7 @@ class Chocolat < Cask - url 'http://chocolatapp.com/download?experiment=&token=' homepage 'http://chocolatapp.com/' - version 'latest' - no_checksum + edge do + url 'http://chocolatapp.com/download?experiment=&token=' + end end diff --git a/Casks/chromium.rb b/Casks/chromium.rb index ee9075e6bec32..e095d761c9e81 100644 --- a/Casks/chromium.rb +++ b/Casks/chromium.rb @@ -1,6 +1,5 @@ class Chromium < Cask homepage 'http://www.freesmug.org/chromium' - url 'http://sourceforge.net/projects/osxportableapps/files/Chromium/ChromiumOSX_22.0.1229.92.dmg/download' - version '22.0.1229.92' + url 'http://sourceforge.net/projects/osxportableapps/files/Chromium/ChromiumOSX_22.0.1229.92.dmg' sha1 'afb9ae77e4aa2a6e3321ffa314869698105bb22f' end diff --git a/Casks/clip-menu.rb b/Casks/clip-menu.rb index 6492bf78fb532..edc91ff7eedb8 100644 --- a/Casks/clip-menu.rb +++ b/Casks/clip-menu.rb @@ -1,6 +1,5 @@ class ClipMenu < Cask url 'https://dl.dropbox.com/u/1140644/clipmenu/ClipMenu_0.4.3.dmg' homepage 'http://www.clipmenu.com/' - version '0.4.3' sha1 '9237d3f1e237f25fdd752e05d383d4b2a4274e3e' end diff --git a/Casks/colloquy.rb b/Casks/colloquy.rb index 1da22209531b3..5dda0a7044bf1 100644 --- a/Casks/colloquy.rb +++ b/Casks/colloquy.rb @@ -1,7 +1,6 @@ class Colloquy < Cask url 'http://colloquy.info/downloads/colloquy-2.4.zip' homepage 'http://colloquy.info/' - version '2.4' sha1 'e0f6d4df8a09c5b48e0d972dc732cc1203b2384c' end diff --git a/Casks/cyberduck.rb b/Casks/cyberduck.rb index 6d1b2ad536dde..2a2065f38853c 100644 --- a/Casks/cyberduck.rb +++ b/Casks/cyberduck.rb @@ -1,6 +1,5 @@ class Cyberduck < Cask url 'http://cyberduck.ch/Cyberduck-4.2.1.zip' homepage 'http://cyberduck.ch' - version '4.2.1' sha1 '6f1e220830f324ba136b4301b12711f6037176c7' end diff --git a/Casks/disk-inventory-x.rb b/Casks/disk-inventory-x.rb index 4ed52f36bdf79..2fb080578daf8 100644 --- a/Casks/disk-inventory-x.rb +++ b/Casks/disk-inventory-x.rb @@ -1,6 +1,6 @@ class DiskInventoryX < Cask - url 'http://www.derlien.com/download.php?file=DiskInventoryX' homepage 'http://www.derlien.com/' - version 'latest' - no_checksum + edge do + url 'http://www.derlien.com/download.php?file=DiskInventoryX' + end end diff --git a/Casks/divvy.rb b/Casks/divvy.rb index 0e9aa4ae2ec74..fadd8ca62c6a0 100644 --- a/Casks/divvy.rb +++ b/Casks/divvy.rb @@ -1,6 +1,6 @@ class Divvy < Cask - url 'http://mizage.com/downloads/Divvy.zip' homepage 'http://mizage.com/divvy/' - version 'latest' - no_checksum + edge do + url 'http://mizage.com/downloads/Divvy.zip' + end end diff --git a/Casks/firefox-aurora.rb b/Casks/firefox-aurora.rb index 2a52255e5ac2a..1d82a913ed62e 100644 --- a/Casks/firefox-aurora.rb +++ b/Casks/firefox-aurora.rb @@ -1,6 +1,8 @@ class FirefoxAurora < Cask - url 'https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-19.0a2.en-US.mac.dmg' homepage 'http://www.mozilla.org/en-US/firefox/aurora/' - version '19.0a2' - no_checksum # This is a nightly + + edge do + url 'https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-19.0a2.en-US.mac.dmg' + version '19.0a2' + end end diff --git a/Casks/firefox.rb b/Casks/firefox.rb index 36f5e9a4671bb..e77caa7a9fc93 100644 --- a/Casks/firefox.rb +++ b/Casks/firefox.rb @@ -3,4 +3,16 @@ class Firefox < Cask homepage 'http://www.mozilla.org/en-US/firefox/' version '17.0.1' sha1 'a9888ce69440574fabff712549c8ff503fd1acb7' + + # Beta: + devel do + url 'http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/18.0b3/mac/en-US/Firefox%2018.0b3.dmg' + version '18.0b3' + sha1 '31e383782b4fbbcbf3a1ef578d82cbf6861912cb' + end + + # Nightly + edge do + url 'http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-20.0a1.en-US.mac.dmg' + end end diff --git a/Casks/fluid.rb b/Casks/fluid.rb index 84b64b1a8bd4a..c3dd22ecf12bd 100644 --- a/Casks/fluid.rb +++ b/Casks/fluid.rb @@ -1,6 +1,5 @@ class Fluid < Cask url 'http://fluidapp.com/dist/Fluid_1.6.1.zip' homepage 'http://fluidapp.com/' - version '1.6.1' sha1 '7de2fe4372e9d055bd2bb6f5afcefa549740a7ce' end diff --git a/Casks/flux.rb b/Casks/flux.rb index 89cbb851e94bb..4dd6d583839e0 100644 --- a/Casks/flux.rb +++ b/Casks/flux.rb @@ -1,6 +1,6 @@ class Flux < Cask - url 'https://secure.herf.org/flux/Flux.zip' homepage 'http://stereopsis.com/flux/' - version 'latest' - no_checksum + edge do + url 'https://secure.herf.org/flux/Flux.zip' + end end diff --git a/Casks/gfxcardstatus.rb b/Casks/gfxcardstatus.rb index f13daa9b9c620..6602088e3053a 100644 --- a/Casks/gfxcardstatus.rb +++ b/Casks/gfxcardstatus.rb @@ -1,6 +1,5 @@ class Gfxcardstatus < Cask homepage 'http://gfx.io/' url 'http://codykrieger.com/downloads/gfxCardStatus-2.3.zip' - version '2.3' sha1 '0bd1d9d5b1da69b77217949b788597a952cbd846' end diff --git a/Casks/github.rb b/Casks/github.rb index a145f515a585c..bf95745acc5c0 100644 --- a/Casks/github.rb +++ b/Casks/github.rb @@ -1,6 +1,6 @@ class Github < Cask - url 'https://central.github.com/mac/latest' homepage 'http://mac.github.com' - version 'latest' - no_checksum + edge do + url 'https://central.github.com/mac/latest' + end end diff --git a/Casks/gitx-l.rb b/Casks/gitx-l.rb index 0991dcb3ba63f..bf339784851c3 100644 --- a/Casks/gitx-l.rb +++ b/Casks/gitx-l.rb @@ -1,7 +1,6 @@ class GitxL < Cask url 'https://github.com/downloads/laullon/gitx/GitX-L_v0.8.4.zip' homepage 'http://gitx.laullon.com/' - version '0.8.4' sha1 '86517311dcdc7348e308b542e3d5aad1a304f94f' end diff --git a/Casks/gitx.rb b/Casks/gitx.rb index 3cf88627989a4..a71502ef6b413 100644 --- a/Casks/gitx.rb +++ b/Casks/gitx.rb @@ -1,6 +1,6 @@ class Gitx < Cask - url 'http://frim.frim.nl/GitXStable.app.zip' homepage 'http://gitx.frim.nl/' - version 'latest' - no_checksum + edge do + url 'http://frim.frim.nl/GitXStable.app.zip' + end end diff --git a/Casks/gmail-notifr.rb b/Casks/gmail-notifr.rb index b776e9d25b3f1..d24cc7fb9364a 100644 --- a/Casks/gmail-notifr.rb +++ b/Casks/gmail-notifr.rb @@ -1,6 +1,5 @@ class GmailNotifr < Cask url 'https://github.com/downloads/ashchan/gmail-notifr/GmailNotifr-0.6.4.zip' homepage 'http://ashchan.com/projects/gmail-notifr' - version '0.6.4' sha1 '330a87bb9e0ed6209e6ad3f1d09e79b4c92674ef' end diff --git a/Casks/google-chrome-canary.rb b/Casks/google-chrome-canary.rb index bdcdaabbd826d..dfc249ad2c8bb 100644 --- a/Casks/google-chrome-canary.rb +++ b/Casks/google-chrome-canary.rb @@ -1,6 +1,6 @@ class GoogleChromeCanary < Cask - url 'https://storage.googleapis.com/chrome-canary/GoogleChromeCanary.dmg' homepage 'https://tools.google.com/dlpage/chromesxs' - version 'latest' - no_checksum + edge do + url 'https://storage.googleapis.com/chrome-canary/GoogleChromeCanary.dmg' + end end diff --git a/Casks/google-chrome.rb b/Casks/google-chrome.rb index 1879688330460..abaddf26a5faa 100644 --- a/Casks/google-chrome.rb +++ b/Casks/google-chrome.rb @@ -2,5 +2,4 @@ class GoogleChrome < Cask url 'https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg' homepage 'https://www.google.com/chrome/' version 'stable-channel' - no_checksum end diff --git a/Casks/google-notifier.rb b/Casks/google-notifier.rb index 11a6d80e64b65..fbd515c706608 100644 --- a/Casks/google-notifier.rb +++ b/Casks/google-notifier.rb @@ -1,6 +1,5 @@ class GoogleNotifier < Cask url 'http://dl.google.com/mac/download/GoogleNotifier_1.10.7.dmg' homepage 'http://toolbar.google.com/gmail-helper/notifier_mac.html' - version '1.10.7' sha1 '9ea16ae966033a1c6a5b9d50bb9e8d5080906059' end diff --git a/Casks/handbrakebatch.rb b/Casks/handbrakebatch.rb index bd44e62fd61f9..a3238a4da8d76 100644 --- a/Casks/handbrakebatch.rb +++ b/Casks/handbrakebatch.rb @@ -1,6 +1,6 @@ class Handbrakebatch < Cask - url 'http://www.osomac.com/appcasts/handbrakebatch/HandBrakeBatch.zip' homepage 'http://www.osomac.com/apps/osx/handbrake-batch/' - version 'latest' - no_checksum + edge do + url 'http://www.osomac.com/appcasts/handbrakebatch/HandBrakeBatch.zip' + end end diff --git a/Casks/hands-off.rb b/Casks/hands-off.rb index dd0d4232c1179..c919adb3971c2 100644 --- a/Casks/hands-off.rb +++ b/Casks/hands-off.rb @@ -1,6 +1,5 @@ class HandsOff < Cask url 'https://www.metakine.com/files/Hands%20Off!%20v1.5.1.dmg' homepage 'http://www.metakine.com/products/handsoff/' - version '1.5.1' sha1 '6738476c53f73a4924fa38444c5802250b180d4f' end diff --git a/Casks/intellij-community.rb b/Casks/intellij-community.rb index e31b412852a80..54cf68ee992d0 100644 --- a/Casks/intellij-community.rb +++ b/Casks/intellij-community.rb @@ -1,6 +1,5 @@ class IntellijCommunity < Cask url 'http://download.jetbrains.com/idea/ideaIC-11.1.4.dmg' homepage 'https://www.jetbrains.com/idea/index.html' - version '11.1.4' sha1 '20073844e26dc787da04d951e3a24338758e5e8d' end diff --git a/Casks/intellij-ultimate.rb b/Casks/intellij-ultimate.rb index db1baaa1921d9..1260e2cd577e8 100644 --- a/Casks/intellij-ultimate.rb +++ b/Casks/intellij-ultimate.rb @@ -1,6 +1,5 @@ class IntellijUltimate < Cask url 'http://download.jetbrains.com/idea/ideaIU-11.1.4.dmg' homepage 'https://www.jetbrains.com/idea/index.html' - version '11.1.4' sha1 '9f2d70d934ac41fe522df99f1fea9ac3b44f31a7' end diff --git a/Casks/irip.rb b/Casks/irip.rb index 4b3545473b014..1add36bc72a0b 100644 --- a/Casks/irip.rb +++ b/Casks/irip.rb @@ -1,6 +1,6 @@ class Irip < Cask - url 'http://files.thelittleappfactory.com/iRip2/iRip.zip' - version 'latest' homepage 'http://thelittleappfactory.com/irip/' - no_checksum + edge do + url 'http://files.thelittleappfactory.com/iRip2/iRip.zip' + end end diff --git a/Casks/istat-menus.rb b/Casks/istat-menus.rb index 4774a87a36a0c..c83e561fb58dd 100644 --- a/Casks/istat-menus.rb +++ b/Casks/istat-menus.rb @@ -1,6 +1,5 @@ class IstatMenus < Cask url 'http://s3.amazonaws.com/bjango/files/istatmenus3/istatmenus3.21.zip' homepage 'http://bjango.com/mac/istatmenus/' - version '3.21' sha1 '07b6a0d1f3d6c0ce30fd0e7b62ee9275405bead9' end diff --git a/Casks/iterm2.rb b/Casks/iterm2.rb index 53d80c4d9d3df..5fc6eec65f6d7 100644 --- a/Casks/iterm2.rb +++ b/Casks/iterm2.rb @@ -1,6 +1,5 @@ class Iterm2 < Cask url 'http://iterm2.googlecode.com/files/iTerm2-1_0_0_20120203.zip' homepage 'http://www.iterm2.com/' - version '1.0.0.20120203' sha1 '554d2f9b9fbd7d4930f3a9b6962264bc026237c9' end diff --git a/Casks/jumpcut.rb b/Casks/jumpcut.rb index 822fe2204bd25..79689fba06edb 100644 --- a/Casks/jumpcut.rb +++ b/Casks/jumpcut.rb @@ -1,7 +1,6 @@ class Jumpcut < Cask url 'http://downloads.sourceforge.net/project/jumpcut/jumpcut/0.63/Jumpcut_0.63.tgz' homepage 'http://jumpcut.sourceforge.net/' - version '0.63' sha1 '6ac88694f84b549f87c7c20bbf028f1d174d9e40' end diff --git a/Casks/justlooking.rb b/Casks/justlooking.rb index 1984c6f42f4a1..83cb948a14e7b 100644 --- a/Casks/justlooking.rb +++ b/Casks/justlooking.rb @@ -1,6 +1,5 @@ class Justlooking < Cask url 'http://chipmunkninja.com/download/JustLooking-3.3.3.dmg' homepage 'http://chipmunkninja.com/JustLooking' - version '3.3.3' sha1 'ac082882d21e77c5c77e99f8fa7bae9f72bac75c' end diff --git a/Casks/keepass-x.rb b/Casks/keepass-x.rb index 1184dd07dee8e..70feccfcda295 100644 --- a/Casks/keepass-x.rb +++ b/Casks/keepass-x.rb @@ -1,6 +1,5 @@ class KeepassX < Cask url 'http://downloads.sourceforge.net/keepassx/KeePassX-0.4.3.dmg' homepage 'http://www.keepassx.org' - version '0.4.3' sha1 '40f61b33f559f1de61e698b9f46b65c985a98955' end diff --git a/Casks/keyboard-maestro.rb b/Casks/keyboard-maestro.rb index 1181d3d1e7cf7..ae7d8cc35246f 100644 --- a/Casks/keyboard-maestro.rb +++ b/Casks/keyboard-maestro.rb @@ -1,6 +1,6 @@ class KeyboardMaestro < Cask - url 'http://www.keyboardmaestro.com/action/download?km-kmi-2-b' homepage 'http://www.keyboardmaestro.com/' - version 'latest' - no_checksum + edge do + url 'http://www.keyboardmaestro.com/action/download?km-kmi-2-b' + end end diff --git a/Casks/little-snitch.rb b/Casks/little-snitch.rb index f0dfaa6f2fbf1..36e81cdfbffe5 100644 --- a/Casks/little-snitch.rb +++ b/Casks/little-snitch.rb @@ -1,6 +1,5 @@ class LittleSnitch < Cask url 'http://www.obdev.at/downloads/LittleSnitch/LittleSnitch-2.5.4.dmg' homepage 'http://www.obdev.at/products/littlesnitch/index.html' - version '2.5.4' sha1 '217a83098c1eb3df69560e539d86ef4bc6b3b756' end diff --git a/Casks/livestation.rb b/Casks/livestation.rb index 1e2468e3fc8ff..a59d3315567c0 100644 --- a/Casks/livestation.rb +++ b/Casks/livestation.rb @@ -1,6 +1,5 @@ class Livestation < Cask url 'http://updates.livestation.com/releases/Livestation-3.2.0-intel.dmg' homepage 'http://www.livestation.com' - version '3.2.0' sha1 '7c3334e2c710d8c89bfc91591ffed56c1b74643c' end diff --git a/Casks/menu-bar-filter.rb b/Casks/menu-bar-filter.rb index 85c26f7481955..9de88e74d1957 100644 --- a/Casks/menu-bar-filter.rb +++ b/Casks/menu-bar-filter.rb @@ -1,6 +1,5 @@ class MenuBarFilter < Cask url 'https://github.com/downloads/wez/MenuBarFilter/MenuBarFilter_1.2.2.zip' homepage 'http://wez.github.com/MenuBarFilter/' - version '1.2.2' sha1 'aecadf43bdba901e254012cc21e746f39f244bd8' end diff --git a/Casks/moom.rb b/Casks/moom.rb index d8a102ecc4d6c..5151f98b55540 100644 --- a/Casks/moom.rb +++ b/Casks/moom.rb @@ -1,6 +1,6 @@ class Moom < Cask - url 'http://manytricks.com/download/moom' homepage 'http://manytricks.com/moom/' - version 'latest' - no_checksum + edge do + url 'http://manytricks.com/download/moom' + end end diff --git a/Casks/namemangler.rb b/Casks/namemangler.rb index 460e84ba05e08..6e6ca6fcc36d1 100644 --- a/Casks/namemangler.rb +++ b/Casks/namemangler.rb @@ -1,6 +1,6 @@ class Namemangler < Cask - url 'http://manytricks.com/download/namemangler' - version 'latest' homepage 'http://manytricks.com/namemangler/' - no_checksum + edge do + url 'http://manytricks.com/download/namemangler' + end end diff --git a/Casks/notational-velocity.rb b/Casks/notational-velocity.rb index be01ae1082d2e..6f899c443cd7c 100644 --- a/Casks/notational-velocity.rb +++ b/Casks/notational-velocity.rb @@ -1,6 +1,6 @@ class NotationalVelocity < Cask - url 'http://notational.net/NotationalVelocity.zip' homepage 'http://notational.net' - version 'latest' - no_checksum + edge do + url 'http://notational.net/NotationalVelocity.zip' + end end diff --git a/Casks/nv-alt.rb b/Casks/nv-alt.rb index 636540c95e061..dab874a7a1d3f 100644 --- a/Casks/nv-alt.rb +++ b/Casks/nv-alt.rb @@ -1,6 +1,5 @@ class NvAlt < Cask url 'http://brettterpstra.com/downloads/nvalt2.1.zip?9d7bd4' homepage 'http://brettterpstra.com/project/nvalt/' - version '2.1' sha1 '686183dd51701ef6f304dec07d8c9049d553185a' end diff --git a/Casks/one-password.rb b/Casks/one-password.rb index 67c26bff9c0a5..0a10b86e02e78 100644 --- a/Casks/one-password.rb +++ b/Casks/one-password.rb @@ -1,6 +1,5 @@ class OnePassword < Cask url 'https://d13itkw33a7sus.cloudfront.net/dist/1P/mac/1Password-3.8.20.zip' homepage 'https://agilebits.com/onepassword' - version '3.8.20' sha1 'b8aaa60f32c0431a95347b8fb4e814472e89bb2b' end diff --git a/Casks/open-office.rb b/Casks/open-office.rb index 0e93d0807fcd5..b457ebc5b7d2d 100644 --- a/Casks/open-office.rb +++ b/Casks/open-office.rb @@ -1,7 +1,6 @@ class OpenOffice < Cask - url 'http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.1/Apache_OpenOffice_incubating_3.4.1_MacOS_x86_install_en-US.dmg/download' + url 'http://sourceforge.net/projects/openofficeorg.mirror/files/stable/3.4.1/Apache_OpenOffice_incubating_3.4.1_MacOS_x86_install_en-US.dmg' homepage 'http://www.openoffice.org/' - version '3.4.1' sha1 '63623a1cc77bfc3c0fe207c317ecd087eded3016' end diff --git a/Casks/paintbrush.rb b/Casks/paintbrush.rb index 3c25e2c4332bd..d813b0547ab5b 100644 --- a/Casks/paintbrush.rb +++ b/Casks/paintbrush.rb @@ -1,6 +1,5 @@ class Paintbrush < Cask - url 'http://downloads.sourceforge.net/project/paintbrush/Paintbrush%202.x/Paintbrush%202.1.1/Paintbrush-2.1.1.zip?r=http%3A%2F%2Fpaintbrush.sourceforge.net%2Fdownloads%2F&ts=1351154031&use_mirror=superb-dca2' + url 'http://downloads.sourceforge.net/project/paintbrush/Paintbrush%202.x/Paintbrush%202.1.1/Paintbrush-2.1.1.zip?r=http%3A%2F%2Fpaintbrush.sourceforge.net%2Fdownloads%2F&ts=1351154031' homepage 'http://paintbrush.sourceforge.net/' - version '2.1.1' sha1 'f8dedc7b22ed017dea43d76b5686b226ebe13ef2' end diff --git a/Casks/pandora-jam.rb b/Casks/pandora-jam.rb index faf199fd97d9a..37e4129ffca74 100644 --- a/Casks/pandora-jam.rb +++ b/Casks/pandora-jam.rb @@ -1,6 +1,6 @@ class PandoraJam < Cask - url 'http://www.bitcartel.com/downloads/pandorajam.zip' homepage 'http://www.bitcartel.com/pandorajam/' - version 'latest' - no_checksum + edge do + url 'http://www.bitcartel.com/downloads/pandorajam.zip' + end end diff --git a/Casks/picard.rb b/Casks/picard.rb index 406ad32af1804..37c35fcd5fa10 100644 --- a/Casks/picard.rb +++ b/Casks/picard.rb @@ -1,6 +1,5 @@ class Picard < Cask url 'ftp://ftp.musicbrainz.org/pub/musicbrainz/picard/MusicBrainz-Picard-1.1.dmg' homepage 'http://musicbrainz.org/doc/MusicBrainz_Picard' - version '1.1' sha1 '6dff070ac02541b90f6ced710397bea029c1fc3f' end diff --git a/Casks/plex.rb b/Casks/plex.rb index 99fcb854dbb59..d62bca6f006d4 100644 --- a/Casks/plex.rb +++ b/Casks/plex.rb @@ -1,6 +1,5 @@ class Plex < Cask url 'http://plex-downloads.s3.amazonaws.com/plex-laika/0.9.5.4/Plex-0.9.5.4-973998f.zip' homepage 'http://plexapp.com' - version '0.9.5.4' sha1 '6d544de6c56861eab05a5621ecee1777cefe49fc' end diff --git a/Casks/postgres.rb b/Casks/postgres.rb index c1c73ca32be24..6de83845cdd88 100644 --- a/Casks/postgres.rb +++ b/Casks/postgres.rb @@ -1,6 +1,7 @@ class Postgres < Cask - url 'http://postgresapp.com/download' homepage 'http://www.postgresapp.com/' - version 'latest' - no_checksum + + edge do + url 'http://postgresapp.com/download' + end end diff --git a/Casks/propane.rb b/Casks/propane.rb index 902a667323d74..203e62e25319d 100644 --- a/Casks/propane.rb +++ b/Casks/propane.rb @@ -1,6 +1,6 @@ class Propane < Cask - url 'http://propaneapp.com/appcast/Propane.zip' homepage 'http://propaneapp.com/' - version 'latest' - no_checksum + edge do + url 'http://propaneapp.com/appcast/Propane.zip' + end end diff --git a/Casks/quicksilver.rb b/Casks/quicksilver.rb index 85f873ee2fc06..bc8ead9e3c1cc 100644 --- a/Casks/quicksilver.rb +++ b/Casks/quicksilver.rb @@ -1,6 +1,6 @@ class Quicksilver < Cask - url 'http://qs0.qsapp.com/plugins/download.php' homepage 'http://qsapp.com/' - version 'latest' - no_checksum + edge do + url 'http://qs0.qsapp.com/plugins/download.php' + end end diff --git a/Casks/racket.rb b/Casks/racket.rb index 2e9dfe193a8e6..177a1adc8d557 100644 --- a/Casks/racket.rb +++ b/Casks/racket.rb @@ -1,6 +1,5 @@ class Racket < Cask url 'http://download.racket-lang.org/installers/5.3/racket/racket-5.3-bin-x86_64-osx-mac.dmg' homepage 'http://racket-lang.org/' - version '5.3' sha1 'da2642f5cebb16e7098b00988627ee6c45f5edc8' end diff --git a/Casks/rdio.rb b/Casks/rdio.rb index f2af63f4bfdbb..c25e92d4304ea 100644 --- a/Casks/rdio.rb +++ b/Casks/rdio.rb @@ -1,6 +1,6 @@ class Rdio < Cask - url 'http://www.rdio.com/media/static/desktop/mac/Rdio.dmg' homepage 'http://www.rdio.com' - version 'latest' - no_checksum + edge do + url 'http://www.rdio.com/media/static/desktop/mac/Rdio.dmg' + end end diff --git a/Casks/ringtones.rb b/Casks/ringtones.rb index 8813262471a1c..c7c3279caaaf2 100644 --- a/Casks/ringtones.rb +++ b/Casks/ringtones.rb @@ -1,6 +1,6 @@ class Ringtones < Cask - url 'http://files.thelittleappfactory.com/ringtones/Ringtones.zip' - version 'latest' homepage 'http://thelittleappfactory.com/ringtones/' - no_checksum + edge do + url 'http://files.thelittleappfactory.com/ringtones/Ringtones.zip' + end end diff --git a/Casks/ripit.rb b/Casks/ripit.rb index 1161660f8423b..8b943d85a4feb 100644 --- a/Casks/ripit.rb +++ b/Casks/ripit.rb @@ -1,6 +1,6 @@ class Ripit < Cask - url 'http://files.thelittleappfactory.com/ripit/RipIt.zip' homepage 'http://thelittleappfactory.com/ripit/' - version 'latest' - no_checksum + edge do + url 'http://files.thelittleappfactory.com/ripit/RipIt.zip' + end end diff --git a/Casks/rubymine.rb b/Casks/rubymine.rb index 2eb992c26a790..75246c5eeab43 100644 --- a/Casks/rubymine.rb +++ b/Casks/rubymine.rb @@ -1,6 +1,5 @@ class Rubymine < Cask url 'http://download.jetbrains.com/ruby/RubyMine-4.5.4.dmg' homepage 'http://www.jetbrains.com/ruby/' - version '4.5.4' sha1 '3f5d4318207f8e1a661a1055089eed63473bbfb3' end diff --git a/Casks/scrivener.rb b/Casks/scrivener.rb index 43ca96e1de568..51ac7b7292cad 100644 --- a/Casks/scrivener.rb +++ b/Casks/scrivener.rb @@ -1,6 +1,6 @@ class Scrivener < Cask - url 'http://scrivener.s3.amazonaws.com/Scrivener.dmg' homepage 'http://literatureandlatte.com/scrivener.php' - version 'latest' - no_checksum + edge do + url 'http://scrivener.s3.amazonaws.com/Scrivener.dmg' + end end diff --git a/Casks/scrup.rb b/Casks/scrup.rb index 17b26002b4ab3..3d857e603d17f 100644 --- a/Casks/scrup.rb +++ b/Casks/scrup.rb @@ -1,5 +1,4 @@ class Scrup < Cask url 'http://hunch.se/scrup/dist/scrup-1.3.2.zip' homepage 'https://github.com/rsms/scrup' - version '1.3.2' end diff --git a/Casks/seashore.rb b/Casks/seashore.rb index 73b5c79c81937..757c40e5c8fdf 100644 --- a/Casks/seashore.rb +++ b/Casks/seashore.rb @@ -1,6 +1,6 @@ class Seashore < Cask - url 'https://sourceforge.net/projects/seashore/files/seashore%20binaries/Seashore%200.5.1/Seashore.zip/download' - homepage 'http://seashore.sourceforge.net/' + url 'https://sourceforge.net/projects/seashore/files/seashore binaries/Seashore 0.5.1/Seashore.zip' version '0.5.1' + homepage 'http://seashore.sourceforge.net/' sha1 'd8661189b4e526fbb9c73602a77c0c5936eb5297' end diff --git a/Casks/sequel-pro.rb b/Casks/sequel-pro.rb index f382549d70d17..d9d3716f44752 100644 --- a/Casks/sequel-pro.rb +++ b/Casks/sequel-pro.rb @@ -1,6 +1,5 @@ class SequelPro < Cask url 'http://sequel-pro.googlecode.com/files/Sequel_Pro_0.9.9.1.dmg' homepage 'http://www.sequelpro.com/' - version '0.9.9.1' sha1 '25ee92a23c20ee6f004d5d69cafe3e3e15212b6f' end diff --git a/Casks/skype.rb b/Casks/skype.rb index b6e74b71271a7..89e14b95a0aab 100644 --- a/Casks/skype.rb +++ b/Casks/skype.rb @@ -1,6 +1,5 @@ class Skype < Cask homepage 'http://www.skype.com' - version '6.0.60.2946' url 'http://download.skype.com/macosx/Skype_6.0.60.2946.dmg' sha1 'd2d538eeb42e9918fe1c1d84113c74dce99ef57d' end diff --git a/Casks/slate.rb b/Casks/slate.rb index e6e7e3fbe46cb..764062e161870 100644 --- a/Casks/slate.rb +++ b/Casks/slate.rb @@ -1,6 +1,6 @@ class Slate < Cask - url 'http://slate.ninjamonkeysoftware.com/Slate.dmg' homepage 'https://github.com/jigish/slate' - version 'latest' - no_checksum + edge do + url 'http://slate.ninjamonkeysoftware.com/Slate.dmg' + end end diff --git a/Casks/sourcetree.rb b/Casks/sourcetree.rb index 0d3920310f36c..45cd7c357a0a4 100644 --- a/Casks/sourcetree.rb +++ b/Casks/sourcetree.rb @@ -1,6 +1,5 @@ class Sourcetree < Cask url 'http://downloads.atlassian.com/software/sourcetree/SourceTree_1.5.4.dmg' homepage 'http://www.sourcetreeapp.com/' - version '1.5.4' sha1 'ea656b78130e05d3edcc01aa805309082be07c97' end diff --git a/Casks/sparrow.rb b/Casks/sparrow.rb index c2e2877ee9850..eb6623993f82d 100644 --- a/Casks/sparrow.rb +++ b/Casks/sparrow.rb @@ -1,6 +1,7 @@ class Sparrow < Cask - url 'http://download.sparrowmailapp.com/appcast/Sparrow-latest.dmg' homepage 'http://www.sparrowmailapp.com/' - version 'latest' - no_checksum + + edge do + url 'http://download.sparrowmailapp.com/appcast/Sparrow-latest.dmg' + end end diff --git a/Casks/spotify.rb b/Casks/spotify.rb index edf18cb3d7949..4b11de9876ea4 100644 --- a/Casks/spotify.rb +++ b/Casks/spotify.rb @@ -2,5 +2,4 @@ class Spotify < Cask url 'http://download.spotify.com/Spotify.dmg' homepage 'https://www.spotify.com' version 'stable' - no_checksum end diff --git a/Casks/steam.rb b/Casks/steam.rb index d5109ba0ca833..08545ad81b375 100644 --- a/Casks/steam.rb +++ b/Casks/steam.rb @@ -2,5 +2,4 @@ class Steam < Cask url 'http://media.steampowered.com/client/installer/steam.dmg' homepage 'http://store.steampowered.com/about/' version 'stable' - no_checksum end diff --git a/Casks/tagalicious.rb b/Casks/tagalicious.rb index d3b7d18f75aa1..a75bae7e75ca7 100644 --- a/Casks/tagalicious.rb +++ b/Casks/tagalicious.rb @@ -1,6 +1,6 @@ class Tagalicious < Cask - url 'http://files.thelittleappfactory.com/tagalicious/Tagalicious.zip' homepage 'http://files.thelittleappfactory.com/ringtones/Ringtones.zip' - version 'latest' - no_checksum + edge do + url 'http://files.thelittleappfactory.com/tagalicious/Tagalicious.zip' + end end diff --git a/Casks/textwrangler.rb b/Casks/textwrangler.rb index 70ee2bd31fca1..e4d8f6e9fb7c4 100644 --- a/Casks/textwrangler.rb +++ b/Casks/textwrangler.rb @@ -1,6 +1,5 @@ class Textwrangler < Cask url 'http://ash.barebones.com/TextWrangler_4.0.1.dmg' homepage 'http://www.barebones.com/products/textwrangler' - version '4.0.1' sha1 '7205c48f94d588682bf82923b579e1674701f218' end diff --git a/Casks/the-unarchiver.rb b/Casks/the-unarchiver.rb index df32ae813e6db..09b4e2f7842f5 100644 --- a/Casks/the-unarchiver.rb +++ b/Casks/the-unarchiver.rb @@ -1,6 +1,5 @@ class TheUnarchiver < Cask url 'http://theunarchiver.googlecode.com/files/TheUnarchiver3.4.zip' homepage 'http://unarchiver.c3.cx/' - version '3.4' sha1 '05e794f1ef9259138fdf19a3592d64ee3ca5a753' end diff --git a/Casks/time-machine-editor.rb b/Casks/time-machine-editor.rb index 8a733c68a6486..523c5f168b587 100644 --- a/Casks/time-machine-editor.rb +++ b/Casks/time-machine-editor.rb @@ -1,6 +1,6 @@ class TimeMachineEditor < Cask - url 'http://timesoftware.free.fr/timemachineeditor/TimeMachineEditor.zip' homepage 'http://timesoftware.free.fr/timemachineeditor/' - version 'latest' - no_checksum + edge do + url 'http://timesoftware.free.fr/timemachineeditor/TimeMachineEditor.zip' + end end diff --git a/Casks/transmission.rb b/Casks/transmission.rb index 758304e7bd079..96697c0cf0e03 100644 --- a/Casks/transmission.rb +++ b/Casks/transmission.rb @@ -1,6 +1,5 @@ class Transmission < Cask url 'http://download.transmissionbt.com/files/Transmission-2.61.dmg' homepage 'http://www.transmissionbt.com/' - version '2.61' sha1 'ac6cf624c3a4a3b1a692e95fa8de672b8be43391' end diff --git a/Casks/tvmobili.rb b/Casks/tvmobili.rb index 744574b4dfa63..3ec94d9391baf 100644 --- a/Casks/tvmobili.rb +++ b/Casks/tvmobili.rb @@ -2,5 +2,4 @@ class Tvmobili < Cask homepage 'http://www.tvmobili.com/' url 'http://www.tvmobili.com/binaries/stable/tvmobili-snowleopard-universal.dmg' version 'current' - no_checksum end diff --git a/Casks/vlc.rb b/Casks/vlc.rb index b60637e9f8754..11e9d8f2e89f2 100644 --- a/Casks/vlc.rb +++ b/Casks/vlc.rb @@ -1,6 +1,5 @@ class Vlc < Cask homepage 'http://www.videolan.org/vlc/' url 'http://downloads.sourceforge.net/project/vlc/2.0.3/macosx/vlc-2.0.3.dmg' - version '2.0.3' sha1 'fb49e0da2584eb87abf7f8a93961cb86aa85c579' end diff --git a/Casks/woodhouse.rb b/Casks/woodhouse.rb index 3aee9d4ba5f78..189c5890c2d1c 100644 --- a/Casks/woodhouse.rb +++ b/Casks/woodhouse.rb @@ -1,6 +1,5 @@ class Woodhouse < Cask url 'https://github.com/downloads/phinze/woodhouse/Woodhouse-0.4.0.dmg' homepage 'https://github.com/phinze/woodhouse/' - version '0.4.0' sha1 'cc1f63f6a1d6732d3c223e185b95fcba2ce77418' end diff --git a/Casks/x-quartz.rb b/Casks/x-quartz.rb index 6b4323c7f4733..1f72e9d15c414 100644 --- a/Casks/x-quartz.rb +++ b/Casks/x-quartz.rb @@ -1,6 +1,5 @@ class XQuartz < Cask url 'http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.4.dmg' homepage 'http://xquartz.macosforge.org/' - version '2.7.4' sha1 '98b2ca8580046d5b91250c5a244c8182437dc9d7' end diff --git a/Casks/xscope.rb b/Casks/xscope.rb index 2c514a700db49..ed7c2b4a03d0f 100644 --- a/Casks/xscope.rb +++ b/Casks/xscope.rb @@ -1,6 +1,5 @@ class Xscope < Cask url 'http://iconfactory.com/assets/software/xscope/xScope-3.5.1.zip' homepage 'http://iconfactory.com/software/xscope' - version '3.5.1' sha1 'b355b3aab636ce535d67d8496d2211b4c2589272' end diff --git a/MAP b/MAP index a9f22357563d4..2cb6b747ef090 100644 --- a/MAP +++ b/MAP @@ -1,4 +1,4 @@ -4 | +5 | FILES | PATHWAYS -------- | ----------- | @@ -10,37 +10,37 @@ /brew-cask.rb | -- * --------- * -- +--------------------+ | | * zip | +------------------+ | | | --------- * -------- | | * tar | | Homebrew formula | | v v | | | * tar+bzip | - +------------------+ | +---------+ +------------+ +-------+---------+ | | * tar+gzip | - | | require | | Cask::CLI | | * | | +--------------+------+ - /Casks/ | | "cask" | | .process() | | Cask | .load() | | | - +---------------+ | +---------+ | * * | +-------+---------+ | v - | Casks Library | | +-+------+---+ | | +------------------+ - +---------------+ | | | v | | Extract and | - | +-------+ +---+ +----------------------+ | | copy to Caskroom | - /Gemfile | | | | Cask::Installer | | +------------------+ - /Rakefile | v +---------+----------+ | .install() | | ------ DONE ------ - /test/ | +------------+ | self. * | +--------+-------------+ | - +----------------+ | | Cask.init | | lookup_ | _command | | | - | Used for tests | | | | +---------+----------+ | | - +----------------+ | +------------+ | v | - | +---------+-------+ +------------------------+ | - /lib/plist/ | | | | >CURL< | | - +---------------------+ | v <-fallback-+ v +------------------------+ | +-------------------+ - | PList parser | | +-------------+ +-+----------+ | CurlDownloadStrategy | +->| Otherwise: | - | ------------- | | | NullCommand | | Cask::CLI | | | | | | | - | Pulled from github: | | | .new() * | | const_get *| | +--- SoftwareSpec | | | > Ignore silently.| - | bleything/plist | | +----------+--+ +-----------++ | | | +-------------------+ - +---------------------+ | | | +------------------------+ | - | +--------+------------+ | Uses properties: | | - /lib/cask* | | | | | - +------------------------+ | | | * title | | - | The Meat of the Matter | | +----*-----+ | * url | | - +------------------------+ | |+--------+| | * version | | - | || .run() || +------------+-----------+ |YES -------------------------------+ |+--------+| | +-+---------+NO +-------+ - | +----------->| Checksums +--->| Error | - EXCEPTIONS | | match? | +-------+ - ------------- | +-----------+ + +------------------+ | +---------+ +----------------+ +-------+---------+ | | * tar+gzip | + | | require | | Cask::CLI | | * | | +--------------+------+ + /Casks/ | | "cask" | | .process() | | Cask | .load() | | | + +---------------+ | +---------+ | * * | +-------+---------+ | v + | Casks Library | | +-+----------+---+ | | +------------------+ + +---------------+ | | | v | | Extract and | + | +-------+ v +----------------------+ | | copy to Caskroom | + /Gemfile | | +--------------------+ | Cask::Installer | | +------------------+ + /Rakefile | v | self. * | | .install() | | ------ DONE ------ + /test/ | +------------+ | lookup_ | _command | +--------+-------------+ | + +----------------+ | | Cask.init | +---------+----------+ | | + | Used for tests | | +------------+ | | | + +----------------+ | +------+-----+ v | + | +--->+ Parse opts | +------------------------+ | + /lib/plist/ | +------+ | +------+-----+ | >CURL< | | + +---------------------+ | | Cask |<--+ | +------------------------+ | +-------------------+ + | PList parser | | +------+ +---------+-------+ | CurlDownloadStrategy | +->| Otherwise: | + | ------------- | | | | | | | | | | + | Pulled from github: | | v <-fallback-+ v | +--- SoftwareSpec | | | > Ignore silently.| + | bleything/plist | | +-------------+ +-+----------+ | | | +-------------------+ + +---------------------+ | | NullCommand | | Cask::CLI | +------------------------+ | + | | .new() * | | const_get *| | Uses properties: | | + /lib/cask* | +----------+--+ +-----------++ | | | + +------------------------+ | | | | * title | | + | The Meat of the Matter | | +--------+------------+ | * url | | + +------------------------+ | | | * version | | + | | +------------+-----------+ |YES +------------------------------+ +----*-----+ | +-+---------+NO +-------+ + | |+--------+| +----------->| Checksums +--->| Error | + EXCEPTIONS | || .run() || | match? | +-------+ + ------------- | |+--------+| +-----------+ | CaskNotInstalledError | Uninstalling a cask: Listing/Searching casks: Linkapps | @@ -63,7 +63,7 @@ | | | | in actions.rb | . and all subdirs (look | * homepage | v | To: example/cask | :/ :S| in destination_path). | | +---------------+ +---+--------------------------+ +-------------------------+ - (For human use only atm) | | Remove entire | | | For each: | + (For brew info/open) | | Remove entire | | | For each: | | | tree in | | +----------------------+ | | * url | | Cellar | +->| Filter by installed | | > if symlink exists: | | +---------------+ | or keywords… or not +-+ | * destroy and relink | @@ -71,38 +71,38 @@ | v | > if not symlink: | * version | +----------------+ | * do nothing, say so | | | Pretty listing | | | - (For DL, but not rly used) | +----------------+ | > else: | + (To set or override ver.) | +----------------+ | > else: | | ----- DONE ----- | * create symlink in | * md5 / sha1 / sha256 | | {Cask.appdir} | | +-------------------------+ (For checksumming) | ^ | | This can be set - * no_checksum | | with an option + * stable / devel / edge | | with an option | - (To avoid checksumming) | + (Spec blocks) | | Editing a cask: Creating a cask: Auditing a cask: +---------------+ - | +-->| File mod 644? | + * mirror | +--*| File mod 644? | | +-----------------+ +------------------+ | +---------------+ - | | Cask::CLI::Edit | +-- There is a file --+ | Cask::CLI::Audit | | + (Add a download mirror) | | Cask::CLI::Edit | +-- There is a file --+ | Cask::CLI::Audit | | | | .run() | | | | .run() | | +---------------+ - | +-----------------+ lib/cli/create.rb +------------------+ +-->| Correct URLs? | +------------------------------+ +-----------------+ lib/cli/create.rb +------------------+ +--*| Correct URLs? | | ------- * ------- | | -------- * ------- | +---------------+ - | | +-- but it's empty. --+ | | - | +-------+-------+ +--------+-------+ | +-----------------+ - | | * | | * | +-->| Bad whitespace? | - | | Cask | .path | | Cask | .load | | +-----------------+ + OPTIONS | | +-- but it's empty. --+ | | + ---------- | +-------+-------+ +--------+-------+ | +-----------------+ + | | * | | * | +--*| Bad whitespace? | + ––linkpath=PATH | | Cask | .path | | Cask | .load | | +-----------------+ | +-------+-------+ +--------+-------+ | - | | | | +------------------+ - | v v +-->| Good code style? | - | +----------------+ +-----------------+ | +------------------+ + ––edge / devel / stable | | | | +------------------+ + | v v +--*| Good code style? | + ––[no–]ignore–edge–only | +----------------+ +-----------------+ | +------------------+ | | Cask formula |NO +-------+ | Cask::Auditor | | - | | exists ? +--->| Error | | .new() | | +--------------+ - | +-------+--------+ +-------+ +-----------------+ + | Checksumming | Disabled - | | | ca.audit *------+--+ +--------------+ for now - | v YES | | - +---------+ | ca.problems * | - | Open | +-------------+---+ - | | | + Also can be set using | | exists ? +--->| Error | | .new() | | +--------------+ + | +-------+--------+ +-------+ +-----------------+ +--*| Checksumming | + HOMEBREW_CASK_OPTS env var. | | | ca.audit <------+--+ +--------------+ + | v YES | | | +------------------------------+ +---------+ | ca.problems * | | +--------------------+ + | Open | +-------------+---+ +--*| Redundant version? | + | | | +--------------------+ | $EDITOR | v ANY? +---------+ +-------+ | Error | diff --git a/README.md b/README.md index cdfd499dc6137..b70c37eb319e6 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ following issues: - [#72](https://github.com/phinze/homebrew-cask/issues/72) — ~~Features for metadata~~ - [#38](https://github.com/phinze/homebrew-cask/issues/38) — ~~Moar configuration~~ - [#30](https://github.com/phinze/homebrew-cask/pull/30) — ~~Config: install/link path~~ -- [#41](https://github.com/phinze/homebrew-cask/issues/41) — Better version management +- [#41](https://github.com/phinze/homebrew-cask/issues/41) — ~~Better version management~~ - [#69](https://github.com/phinze/homebrew-cask/issues/69) — Features for installing different types - [#82](https://github.com/phinze/homebrew-cask/issues/82) — ~~Checksums~~ @@ -27,45 +27,28 @@ following issues: Checksums --------- -`content_length` has been removed. In its stead, there -are four new checksumming methods: - -* `md5`, `sha1`, `sha256` all take a hexdigest string, e.g: - - ```ruby - class Candybar < Cask - url 'http://panic.com/museum/candybar/CandyBar%203.3.4.zip' - homepage 'http://panic.com/museum/candybar/' - version '3.3.4' - sha1 'f645e9da45a621415a07a7492c45923b1a1fd4d4' - end - ``` - -* `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. +`content_length` has been removed. In its stead, there are +`md5`, `sha1`, and `sha256` which all take a hexdigest string, e.g: - ```ruby - class Bartender < Cask - url 'http://www.macbartender.com/Demo/Bartender.zip' - homepage 'http://www.macbartender.com/' - version 'latest' - no_checksum - end - ``` +```ruby +class Candybar < Cask + url 'http://panic.com/museum/candybar/CandyBar 3.3.4.zip' + homepage 'http://panic.com/museum/candybar/' + sha1 'f645e9da45a621415a07a7492c45923b1a1fd4d4' +end +``` -`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. +`brew cask install` will warn if there is no checksum provided, and +error if the sums do not match. Audit ----- `brew cask audit` has had a facelift, and is now based on `brew audit`. -It checks whitespace, URLs, and code style just like Homebrew's one, -albeit modified to fit Casks (a lot of compiling-related stuff was -removed). +It checks whitespace, URLs, checksums, versions, and code style just +like Homebrew's one, albeit modified to fit Casks (a lot of stuff +related to compiling was removed). Caskroom @@ -75,6 +58,54 @@ Casks are now installed in `$HOMEBREW_PREFIX/Caskroom/$name/$version/` instead of in the Cellar. This stops Homebrew from complaining about unlinked kegs, and from listing our casks on `brew list`. + +Devel & Edge +------------ + +You can now specify alternate specs for *devel* (checksummed, versioned) +and *edge* (un-checksummed, unversioned) using blocks, e.g. + +```ruby +class Firefox < Cask + url 'http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/17.0.1/mac/en-US/Firefox%2017.0.1.dmg' + homepage 'http://www.mozilla.org/en-US/firefox/' + version '17.0.1' + sha1 'a9888ce69440574fabff712549c8ff503fd1acb7' + + # Beta + devel do + url 'http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/18.0b3/mac/en-US/Firefox%2018.0b3.dmg' + version '18.0b3' + sha1 '31e383782b4fbbcbf3a1ef578d82cbf6861912cb' + end + + # Nightly + edge do + url 'http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-20.0a1.en-US.mac.dmg' + end +end +``` + +If the top level `url` is unspecified, then the *edge* spec will be used, e.g. + +```ruby +class FirefoxAurora < Cask + homepage 'http://www.mozilla.org/en-US/firefox/aurora/' + + edge do + url 'https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-19.0a2.en-US.mac.dmg' + version '19.0a2' + end +end +``` + +### Version parsing + +Additionally, we will attempt to parse the URL to get the version, so if +the correct version is within the URL, there is no need to specify it +explicitely using `version`. This also applies to *devel* specs. + + Configuration ------------- @@ -95,7 +126,12 @@ Command-line options override environment ones. ### Available options: -* `--linkpath` — Where applications are linked / aliased. Defaults to ~/Applications. +* `--linkpath=PATH` — Where applications are linked / aliased. Defaults to ~/Applications. +* `--edge` — Use the edge spec for that cask. +* `--devel` — Use the devel spec for that cask. +* `--stable` — Use the stable spec for that cask. Useful to override the ENV. +* `--[no-]ignore-edge-only` — Ignore “edge-only” problems when auditing casks. If you're + working with `brew cask audit` a lot, I recommend you put it in your `HOMEBREW_CASK_OPTS`. Cask info @@ -124,5 +160,5 @@ code maps to visualize how it all works. Here they are: - - - - - -> ![Map 4](https://f.cloud.github.com/assets/155787/2748/f04feb64-4258-11e2-8022-a84b1fa57b3d.png) +> ![Map 5](https://f.cloud.github.com/assets/155787/3085/16d3675a-42a1-11e2-8de3-d7d237552f1b.png) > Current situation \ No newline at end of file diff --git a/lib/cask.rb b/lib/cask.rb index 1b9cdd91ed940..ebce7c777d289 100644 --- a/lib/cask.rb +++ b/lib/cask.rb @@ -22,14 +22,18 @@ def self.caskroom HOMEBREW_PREFIX.join "Caskroom" end - def self.appdir - @appdir ||= Pathname.new(File.expand_path("~/Applications")) - end - - def self.set_appdir(_appdir) - @appdir = _appdir - end + def self.appdir; @appdir ||= Pathname.new(File.expand_path("~/Applications")); end + def self.appdir=(a) @appdir = a; end + def self.audit_ignore_edge; @ignore_edge || false; end + def self.audit_ignore_edge=(i) @ignore_edge = i; end + def self.install_edge!; @spec = :edge end + def self.install_edge?; @spec == :edge end + def self.install_devel!; @spec = :devel end + def self.install_devel?; @spec == :devel end + def self.install_stable!; @spec = :stable end + def self.install_stable?; @spec == :stable end + def self.init HOMEBREW_CACHE.mkpath unless HOMEBREW_CACHE.exist? caskroom.mkpath unless caskroom.exist? @@ -54,11 +58,35 @@ def self.title self.name.gsub(/([a-zA-Z\d])([A-Z])/,'\1-\2').gsub(/([a-zA-Z\d])([A-Z])/,'\1-\2').downcase end - attr_reader :title + attr_reader :title, :homepage + attr_reader :stable, :devel, :edge, :active_spec + def initialize(title=self.class.title) + set_instance_variable :homepage + set_instance_variable :stable + set_instance_variable :devel + set_instance_variable :edge + @title = title + validate_variable :title + + @stable = @stable.spec if @stable.is_a? Cask::DSL::SpecBlock + @active_spec = if @edge and Cask.install_edge? then @edge # --edge + elsif @devel and Cask.install_devel? then @devel # --devel + elsif @stable and Cask.install_stable? then @stable # --stable + elsif @stable.nil? and @edge then Cask.install_edge!; @edge # edge-only + else Cask.install_stable!; @stable # default + end + + raise "No url provided for cask #{title}" if @active_spec.url.nil? + raise "No version provided for cask #{title}" if @active_spec.version.nil? end + def url; @active_spec.url; end + def version; @active_spec.version; end + def specs; @active_spec.specs; end + def mirrors; @active_spec.mirrors; end + def destination_path self.class.caskroom.join(self.title).join(self.version) end @@ -66,11 +94,11 @@ def destination_path def installed? destination_path.exist? end - + def path self.class.path @title end - + def info installation = if self.installed? "#{self.destination_path} (#{self.destination_path.abv})" @@ -78,14 +106,18 @@ def info "Not installed" end + version = if Cask.install_edge? then "latest (edge)" + else self.version + end + <<-PURPOSE.undent - #{self}: #{self.version} + #{self}: #{version} #{self.homepage} #{installation} #{self.github_info} PURPOSE end - + def github_info tap = self.title tap = self.class.all_titles.grep(/#{tap}$/).first unless tap =~ /\// @@ -97,4 +129,17 @@ def github_info def to_s @title end + +private + + def validate_variable name + v = instance_variable_get("@#{name}") + raise "Invalid @#{name}" if v.to_s.empty? or v.to_s =~ /\s/ + end + + def set_instance_variable(type) + return if instance_variable_defined? "@#{type}" + class_value = self.class.send(type) + instance_variable_set("@#{type}", class_value) if class_value + end end diff --git a/lib/cask/actions.rb b/lib/cask/actions.rb index 1de53bad85c92..bac500348760f 100644 --- a/lib/cask/actions.rb +++ b/lib/cask/actions.rb @@ -5,7 +5,7 @@ def linkapps target = destination_path.join(app) if destination.symlink? # destination exists but is symlink; removing and relinking - ohai "[#{self}] linking #{File.basename(destination)}" + ohai "[#{self}] re-linking #{File.basename(destination)}" destination.delete destination.make_symlink(target) elsif destination.directory? || destination.file? diff --git a/lib/cask/auditor.rb b/lib/cask/auditor.rb index 2c71c7655df9e..dbe661ccf5a47 100644 --- a/lib/cask/auditor.rb +++ b/lib/cask/auditor.rb @@ -2,7 +2,7 @@ class Cask::Auditor attr :f attr :text attr :problems, true - + def initialize f @f = f @problems = [] @@ -29,7 +29,7 @@ def audit_urls problem "Google Code homepage should end with a slash." end - urls = [(f.url rescue nil), (f.stable.url rescue nil), (f.devel.url rescue nil), (f.head.url rescue nil)].compact + urls = [(f.stable.url rescue nil), (f.devel.url rescue nil), (f.edge.url rescue nil)].compact # Check GNU urls; doesn't apply to mirrors if urls.any? { |p| p =~ %r[^(https?|ftp)://(.+)/gnu/] } @@ -40,8 +40,12 @@ def audit_urls urls.concat([(f.stable.mirrors rescue nil), (f.devel.mirrors rescue nil)].flatten.compact) # Check protocols - if urls.any? { |p| p =~ %r[^(https?|ftp)://] } - problem "This url's protocol is not supported." + protos = [] + urls.each { |p| + protos << p.split(":")[0] unless p =~ %r[^(https?|ftp)://] + } + if protos.any? + problem "These protocols are not supported: '#{protos.join("', '")}'." end # Check SourceForge urls @@ -71,9 +75,8 @@ def audit_urls end end - # This isn't used for the moment def audit_specs - problem "Head-only (no stable download)" if f.head_only? + problem "Edge-only (no stable download)" if f.stable.nil? and f.devel.nil? and f.edge and !Cask.audit_ignore_edge [:stable, :devel].each do |spec| s = f.send(spec) @@ -204,7 +207,7 @@ def audit_text def audit audit_file - #audit_specs + audit_specs audit_urls audit_text end diff --git a/lib/cask/cli.rb b/lib/cask/cli.rb index 891214e7d5d45..5363b812aaa11 100644 --- a/lib/cask/cli.rb +++ b/lib/cask/cli.rb @@ -17,7 +17,7 @@ def self.lookup_command(command) def self.process(arguments) Cask.init command, *rest = *arguments - process_options(rest) + rest = process_options(rest) lookup_command(command).run(*rest) end @@ -40,11 +40,34 @@ def self.nice_listing(cask_list) end def self.process_options(args) + allrgs = Shellwords.shellsplit(ENV['HOMEBREW_CASK_OPTS'] || "") + args OptionParser.new do |opts| opts.on("--linkpath=MANDATORY") do |v| - Cask.set_appdir Pathname.new v + v.sub! "~", ENV['HOME'] if v =~ /^~/ + Cask.appdir = Pathname.new v end - end.parse!(Shellwords.shellsplit(ENV['HOMEBREW_CASK_OPTS']) + args) + + opts.on("--edge") do + Cask.install_edge! + end + + opts.on("--devel") do + Cask.install_devel! + end + + opts.on("--stable") do + Cask.install_stable! + end + + opts.on("--ignore-edge-only") do |i| + Cask.audit_ignore_edge = true + end + + opts.on("--no-ignore-edge-only") do |i| + Cask.audit_ignore_edge = false + end + end.parse!(allrgs) + return allrgs end diff --git a/lib/cask/dsl.rb b/lib/cask/dsl.rb index dd817daa5ed0d..77856e38037c4 100644 --- a/lib/cask/dsl.rb +++ b/lib/cask/dsl.rb @@ -5,44 +5,74 @@ def self.included(base) base.extend(ClassMethods) end - def url; self.class.url end - def version; self.class.version end - def homepage; self.class.homepage end - - def sums; self.class.sums || [] end - module ClassMethods - def url(url=nil) - @url ||= (url && URI.parse(url)) + def stable(&block) + return @stable unless block_given? + blk = SpecBlock.new + blk.instance_eval &block + @stable = blk.spec end - - def version(version=nil) - @version ||= version + + def edge(&block) + return @edge unless block_given? + blk = SpecBlock.new HeadSoftwareSpec + blk.instance_eval &block + @edge = blk.spec + end + + def devel(&block) + return @devel unless block_given? + blk = SpecBlock.new + blk.instance_eval &block + @devel = blk.spec end def homepage(homepage=nil) @homepage ||= homepage end - attr_reader :sums + # The methods below define the + # (shortcuts for the) stable spec. + def url(url=nil) + @stable ||= SpecBlock.new + @stable.url url + end - def md5(md5=nil) - @sums ||= [] - @sums << Checksum.new(:md5, md5) unless md5.nil? + def version(version=nil) + @stable ||= SpecBlock.new + @stable.version version + end + + def md5(sum=nil) + @stable ||= SpecBlock.new + @stable.md5 sum + end + + def sha1(sum=nil) + @stable ||= SpecBlock.new + @stable.sha1 sum end - def sha1(sha1=nil) - @sums ||= [] - @sums << Checksum.new(:sha1, sha1) unless sha1.nil? + def sha256(sum=nil) + @stable ||= SpecBlock.new + @stable.sha256 sum end - def sha256(sha2=nil) - @sums ||= [] - @sums << Checksum.new(:sha2, sha2) unless sha2.nil? + def mirror(mirror=nil) + @stable ||= SpecBlock.new + @stable.mirror mirror + end + end + + class SpecBlock + attr_reader :spec + + def initialize(spec_klass=SoftwareSpec) + @spec = spec_klass.new end - def no_checksum - @sums = 0 + def method_missing(m, *args) + @spec.send(m, *args) end end end diff --git a/lib/cask/installer.rb b/lib/cask/installer.rb index f2cb1e2511212..08a1c71ba7a6a 100644 --- a/lib/cask/installer.rb +++ b/lib/cask/installer.rb @@ -4,10 +4,10 @@ class Cask::Installer class << self def install(cask) require 'formula_support' - downloader = CurlDownloadStrategy.new(cask.title, SoftwareSpec.new(cask.url.to_s, cask.version)) + downloader = CurlDownloadStrategy.new(cask.title, cask.active_spec) downloaded_path = downloader.fetch - _check_sums(downloaded_path, cask.sums) unless cask.sums === 0 + cask.active_spec.verify_download_integrity downloaded_path FileUtils.mkdir_p cask.destination_path @@ -23,18 +23,6 @@ def uninstall(cask) cask.destination_path.rmtree end - - def _check_sums(path, sums) - has_sum = false - sums.each do |sum| - unless sum.empty? - computed = Checksum.new(sum.hash_type, Digest.const_get(sum.hash_type.to_s.upcase).file(path).hexdigest) - raise ChecksumMismatchError.new(sum, computed) unless sum == computed - has_sum = true - end - end - raise ChecksumMissingError.new("Checksum required. SHA1: '#{Digest::SHA1.file(path).hexdigest}'") unless has_sum - end def _with_extracted_mountpoints(path) if _dmg?(path) From 5955244095643f94575e3efb3aacc2c95836a0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Mon, 10 Dec 2012 22:17:16 +1300 Subject: [PATCH 13/17] Remove additional checks --- lib/cask/auditor.rb | 49 +-------------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/lib/cask/auditor.rb b/lib/cask/auditor.rb index dbe661ccf5a47..1636533fab09d 100644 --- a/lib/cask/auditor.rb +++ b/lib/cask/auditor.rb @@ -118,11 +118,6 @@ def audit_text problem "Use a space in class inheritance: class Foo < #{$1}" end - # FileUtils is included in Formula - if text =~ /FileUtils\.(\w+)/ - problem "Don't need 'FileUtils.' before #{$1}." - end - # Check for string interpolation of single values. if text =~ /(system|gsub!) .* ['"]#\{(\w+(\.\w+)?)\}['"]/ problem "Don't need to interpolate \"#{$2}\" with #{$1}" @@ -133,41 +128,11 @@ def audit_text problem "Try not to concatenate paths in string interpolation:\n #{$1}" end - # Prefer formula path shortcuts in Pathname+ - if text =~ %r{\(\s*(prefix\s*\+\s*(['"])(applications|share)[/'"])} - problem "\"(#{$1}...#{$2})\" should be \"(#{$3}+...)\"" - end - - if text =~ %r[((man)\s*\+\s*(['"])(man[1-8])(['"]))] - problem "\"#{$1}\" should be \"#{$4}\"" - end - - # Prefer formula path shortcuts in strings - if text =~ %r[(\#\{prefix\}/(applications|share))] - problem "\"#{$1}\" should be \"\#{#{$2}}\"" - end - - if text =~ %r[((\#\{prefix\}/share/man/|\#\{man\}/)(man[1-8]))] - problem "\"#{$1}\" should be \"\#{#{$3}}\"" - end - - if text =~ %r[((\#\{share\}/(man)))[/'"]] - problem "\"#{$1}\" should be \"\#{#{$3}}\"" - end - - if text =~ %r[(\#\{prefix\}/share/(info|man))] - problem "\"#{$1}\" should be \"\#{#{$2}}\"" - end - # No trailing whitespace, please if text =~ /(\t|[ ])+$/ problem "Trailing whitespace was found" end - if text =~ /if\s+ARGV\.include\?\s+'--(HEAD|devel)'/ - problem "Use \"if ARGV.build_#{$1.downcase}?\" instead" - end - if text =~ /^[ ]*\t/ problem "Use spaces instead of tabs for indentation" end @@ -177,15 +142,7 @@ def audit_text end if text =~ /version == ['"]HEAD['"]/ - problem "Use 'build.head?' instead of inspecting 'version'" - end - - if text =~ /build\.include\?\s+['"]\-\-(.*)['"]/ - problem "Reference '#{$1}' without dashes" - end - - if text =~ /ARGV\.(?!(debug|verbose|find)\?)/ - problem "Use build instead of ARGV to check options" + problem "Use 'Cask.install_edge?' instead of inspecting 'version'" end if text =~ /def options/ @@ -199,10 +156,6 @@ def audit_text if text =~ /(MacOS.((snow_)?leopard|leopard|(mountain_)?lion)\?)/ problem "#{$1} is deprecated, use a comparison to MacOS.version instead" end - - if text =~ /skip_clean\s+:all/ - problem "`skip_clean :all` is deprecated; brew no longer strips symbols" - end end def audit From c85da16b5f02abcd1165b145b294d35c01e7b658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Tue, 11 Dec 2012 00:57:57 +1300 Subject: [PATCH 14/17] Remove `brew cask linkapps` in favour of `install` in DSL Also change `--linkpath` option to `--[app|pref]dir`. --- Casks/brackets.rb | 2 + MAP | 136 +++++++++++++++++++-------------------- README.md | 42 ++++++++++-- lib/cask.rb | 9 ++- lib/cask/actions.rb | 19 ------ lib/cask/cli.rb | 9 ++- lib/cask/cli/linkapps.rb | 12 ---- lib/cask/dsl.rb | 49 ++++++-------- lib/cask/installer.rb | 2 + lib/cask/link.rb | 48 ++++++++++++++ 10 files changed, 187 insertions(+), 141 deletions(-) delete mode 100644 lib/cask/actions.rb delete mode 100644 lib/cask/cli/linkapps.rb create mode 100644 lib/cask/link.rb diff --git a/Casks/brackets.rb b/Casks/brackets.rb index bef6331ce3082..8064bdac79e70 100644 --- a/Casks/brackets.rb +++ b/Casks/brackets.rb @@ -3,4 +3,6 @@ class Brackets < Cask homepage 'http://brackets.io' version 'sprint-16' sha1 '94322762ecb00baab857e324a98e543d548bf961' + + install :app => 'Brackets Sprint 16.app' end diff --git a/MAP b/MAP index 2cb6b747ef090..b4e5f91d01f24 100644 --- a/MAP +++ b/MAP @@ -1,4 +1,4 @@ -5 | +6 | FILES | PATHWAYS -------- | ----------- | @@ -17,24 +17,24 @@ | Casks Library | | +-+----------+---+ | | +------------------+ +---------------+ | | | v | | Extract and | | +-------+ v +----------------------+ | | copy to Caskroom | - /Gemfile | | +--------------------+ | Cask::Installer | | +------------------+ - /Rakefile | v | self. * | | .install() | | ------ DONE ------ - /test/ | +------------+ | lookup_ | _command | +--------+-------------+ | - +----------------+ | | Cask.init | +---------+----------+ | | - | Used for tests | | +------------+ | | | - +----------------+ | +------+-----+ v | - | +--->+ Parse opts | +------------------------+ | + /Gemfile | | +--------------------+ | Cask::Installer | | +----------+-------+ + /Rakefile | v | self. * | | .install() | | | + /test/ | +------------+ | lookup_ | _command | +--------+-------------+ | v + +----------------+ | | Cask.init | +---------+----------+ | | +----------------+ + | Used for tests | | +------------+ | | | | Install / Link | + +----------------+ | +------+-----+ v | +----------------+ + | +--->+ Parse opts | +------------------------+ | ----- DONE ----- /lib/plist/ | +------+ | +------+-----+ | >CURL< | | - +---------------------+ | | Cask |<--+ | +------------------------+ | +-------------------+ - | PList parser | | +------+ +---------+-------+ | CurlDownloadStrategy | +->| Otherwise: | - | ------------- | | | | | | | | | | - | Pulled from github: | | v <-fallback-+ v | +--- SoftwareSpec | | | > Ignore silently.| - | bleything/plist | | +-------------+ +-+----------+ | | | +-------------------+ - +---------------------+ | | NullCommand | | Cask::CLI | +------------------------+ | - | | .new() * | | const_get *| | Uses properties: | | - /lib/cask* | +----------+--+ +-----------++ | | | - +------------------------+ | | | | * title | | - | The Meat of the Matter | | +--------+------------+ | * url | | + +---------------------+ | | Cask |<--+ | +------------------------+ | + | PList parser | | +------+ +---------+-------+ | CurlDownloadStrategy | | + | ------------- | | | | | | | | + | Pulled from github: | | v <-fallback-+ v | +--- SoftwareSpec | | + | bleything/plist | | +-------------+ +-+----------+ | | | + +---------------------+ | | NullCommand | | Cask::CLI | +------------------------+ | +-------------------+ + | | .new() * | | const_get *| | Uses properties: | +->| Otherwise: | + /lib/cask* | +----------+--+ +-----------++ | | | | | + +------------------------+ | | | | * title | | | > Ignore silently.| + | The Meat of the Matter | | +--------+------------+ | * url | | +-------------------+ +------------------------+ | | | * version | | | | +------------+-----------+ |YES ------------------------------+ +----*-----+ | +-+---------+NO +-------+ @@ -42,42 +42,42 @@ EXCEPTIONS | || .run() || | match? | +-------+ ------------- | |+--------+| +-----------+ | - CaskNotInstalledError | Uninstalling a cask: Listing/Searching casks: Linkapps + CaskNotInstalledError | Uninstalling a cask: Listing/Searching casks: | - < RuntimeError | +----------------------+ +-----------------+ +-------------------+ +---------------------+ - | | Cask::CLI::Uninstall | | Cask::CLI::List | | Cask::CLI::Search | | Cask::CLI::Linkapps | - Param: cask (Cask) | | .run() | | .run() | | .run() | | .run() | - | +----------------------+ +-----------------+ +-------------------+ +---------------------+ - | --------- * ---------- ---------------- * ------------------ --------- * --------- - | | | | - CaskUnavailableError | +-------+---------+ v +-------+---------+ - | | * | +------------------------------+ | * | - < RuntimeError | | Cask | .load() | | Cask.all_titles | | Cask | .load() | - | +-------+---------+ +------------------------------+ +-------+---------+ - Param: cask_name (String) | | | All: Taps/*/Casks/*.rb *-+ | | - | v | | | Err, that's kinda v -------------------------------+ +----------------------+ | +- <----- map <---------+ | | badly named +-------------------------+ - | | Cask::Installer | | | | +------------> | #linkapps | - DSL | | .uninstall() | | +--> From: | Also, that +-------------------------+ - ------ | +------------+---------+ | Taps/example/Casks/cask.rb | method lives | List all .app files in | - | | | | in actions.rb | . and all subdirs (look | - * homepage | v | To: example/cask | :/ :S| in destination_path). | - | +---------------+ +---+--------------------------+ +-------------------------+ - (For brew info/open) | | Remove entire | | | For each: | - | | tree in | | +----------------------+ | | - * url | | Cellar | +->| Filter by installed | | > if symlink exists: | - | +---------------+ | or keywords… or not +-+ | * destroy and relink | - (To download archive) | ---- DONE. ---- +----------------------+ | | | - | v | > if not symlink: | - * version | +----------------+ | * do nothing, say so | - | | Pretty listing | | | - (To set or override ver.) | +----------------+ | > else: | - | ----- DONE ----- | * create symlink in | - * md5 / sha1 / sha256 | | {Cask.appdir} | - | +-------------------------+ - (For checksumming) | ^ - | | This can be set - * stable / devel / edge | | with an option + < RuntimeError | +----------------------+ +-----------------+ +-------------------+ + | | Cask::CLI::Uninstall | | Cask::CLI::List | | Cask::CLI::Search | + Param: cask (Cask) | | .run() | | .run() | | .run() | + | +----------------------+ +-----------------+ +-------------------+ + | --------- * ---------- ---------------- * ------------------ + | | | + CaskUnavailableError | +-------+---------+ v + | | * | +------------------------------+ + < RuntimeError | | Cask | .load() | | Cask.all_titles | + | +-------+---------+ +------------------------------+ + Param: cask_name (String) | | | All: Taps/*/Casks/*.rb *-+ | + | v | | | +------------------------------+ +----------------------+ | +- <----- map <---------+ | + | | Cask::Installer | | | | + DSL | | .uninstall() | | +--> From: | + ------ | +------------+---------+ | Taps/example/Casks/cask.rb | + | | | | + * homepage | v | To: example/cask | + | +---------------+ +---+--------------------------+ + (For brew info/open) | | Remove entire | | + | | tree in | | +----------------------+ + * url | | Cellar | +->| Filter by installed | + | +---------------+ | or keywords… or not +-+ + (To download archive) | ---- DONE. ---- +----------------------+ | + | v + * version | +----------------+ + | | Pretty listing | + (To set or override ver.) | +----------------+ + | ----- DONE ----- + * md5 / sha1 / sha256 | + | + (For checksumming) | + | + * stable / devel / edge | | (Spec blocks) | | Editing a cask: Creating a cask: Auditing a cask: +---------------+ @@ -85,26 +85,26 @@ | +-----------------+ +------------------+ | +---------------+ (Add a download mirror) | | Cask::CLI::Edit | +-- There is a file --+ | Cask::CLI::Audit | | | | .run() | | | | .run() | | +---------------+ -------------------------------+ +-----------------+ lib/cli/create.rb +------------------+ +--*| Correct URLs? | + * install | +-----------------+ lib/cli/create.rb +------------------+ +--*| Correct URLs? | | ------- * ------- | | -------- * ------- | +---------------+ - OPTIONS | | +-- but it's empty. --+ | | - ---------- | +-------+-------+ +--------+-------+ | +-----------------+ - | | * | | * | +--*| Bad whitespace? | - ––linkpath=PATH | | Cask | .path | | Cask | .load | | +-----------------+ - | +-------+-------+ +--------+-------+ | - ––edge / devel / stable | | | | +------------------+ + (Link files into system) | | +-- but it's empty. --+ | | + | +-------+-------+ +--------+-------+ | +-----------------+ +------------------------------+ | * | | * | +--*| Bad whitespace? | + | | Cask | .path | | Cask | .load | | +-----------------+ + OPTIONS | +-------+-------+ +--------+-------+ | + ---------- | | | | +------------------+ | v v +--*| Good code style? | - ––[no–]ignore–edge–only | +----------------+ +-----------------+ | +------------------+ + ––[app|pref]dir=PATH | +----------------+ +-----------------+ | +------------------+ | | Cask formula |NO +-------+ | Cask::Auditor | | - Also can be set using | | exists ? +--->| Error | | .new() | | +--------------+ + ––edge / devel / stable | | exists ? +--->| Error | | .new() | | +--------------+ | +-------+--------+ +-------+ +-----------------+ +--*| Checksumming | - HOMEBREW_CASK_OPTS env var. | | | ca.audit <------+--+ +--------------+ + ––[no–]ignore–edge–only | | | ca.audit <------+--+ +--------------+ | v YES | | | -------------------------------+ +---------+ | ca.problems * | | +--------------------+ - | Open | +-------------+---+ +--*| Redundant version? | - | | | +--------------------+ - | $EDITOR | v ANY? - +---------+ +-------+ + Also can be set using | +---------+ | ca.problems * | | +--------------------+ + | | Open | +-------------+---+ +--*| Redundant version? | + HOMEBREW_CASK_OPTS env var. | | | | +--------------------+ + | | $EDITOR | v ANY? +------------------------------+ +---------+ +-------+ | Error | +-------+ diff --git a/README.md b/README.md index b70c37eb319e6..1d7c654015031 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,14 @@ of installing Casks. It develops ideas exposed in the following issues: - [#113](https://github.com/phinze/homebrew-cask/issues/113) — Uninstalling removes symlinks/aliases/shortcuts -- [#105](https://github.com/phinze/homebrew-cask/issues/105) — Features to help manage multiple .app folders +- [#105](https://github.com/phinze/homebrew-cask/issues/105) — ~~Features to help manage multiple .app folders~~ - [#99](https://github.com/phinze/homebrew-cask/issues/99) — Spotlight visibility - [#89](https://github.com/phinze/homebrew-cask/issues/89) — ~~Don't make `brew doctor` complain~~ (done for unlinked kegs, not for formulae) - [#72](https://github.com/phinze/homebrew-cask/issues/72) — ~~Features for metadata~~ - [#38](https://github.com/phinze/homebrew-cask/issues/38) — ~~Moar configuration~~ - [#30](https://github.com/phinze/homebrew-cask/pull/30) — ~~Config: install/link path~~ - [#41](https://github.com/phinze/homebrew-cask/issues/41) — ~~Better version management~~ -- [#69](https://github.com/phinze/homebrew-cask/issues/69) — Features for installing different types +- [#69](https://github.com/phinze/homebrew-cask/issues/69) — ~~Features for installing different types~~ - [#82](https://github.com/phinze/homebrew-cask/issues/82) — ~~Checksums~~ @@ -106,27 +106,57 @@ the correct version is within the URL, there is no need to specify it explicitely using `version`. This also applies to *devel* specs. +Linking +------- + +Moar breaking changes: `brew cask linkapps` is removed. Linking is done at +install-time, and by default has the same behaviour (link every `.app` found +recursively). However, that behaviour can be overridden in the formula: + +```ruby +class Brackets < Cask + url 'https://github.com/downloads/adobe/brackets/brackets-sprint-16-MAC.dmg' + homepage 'http://brackets.io' + version 'sprint-16' + sha1 '94322762ecb00baab857e324a98e543d548bf961' + + install :app => 'Brackets Sprint 16.app' +end +``` + +`install` is spec-specific (so you have a different one for *devel* and *edge*), +and takes a hash with a single pair of the form: + + :type => 'path/to/file.ext' + +You can have as many `install ...` statements as necessary. Currently, the only +types supported are `app` (`.app` files, linked into `~/Applications` or whatever +`--appdir` is set to) and `pref` (`.prefPane` files, linked into `~/Library/PreferencePanes` +or whatever `--prefdir` is set to). + + Configuration ------------- You can now configure some aspects of `brew cask`'s operation. You can set options on the command: - $ brew cask install adium --linkpath=/Applications + $ brew cask install adium --appdir=/Applications or you can set them in the `HOMEBREW_CASK_OPTS` environment variable: ```bash # ~/.bashrc, somewhere at the end of the file -export HOMEBREW_CASK_OPTS='--linkpath=/Applications' +export HOMEBREW_CASK_OPTS='--appdir=/Applications' ``` Command-line options override environment ones. ### Available options: -* `--linkpath=PATH` — Where applications are linked / aliased. Defaults to ~/Applications. +* `--appdir=PATH` — Where applications are linked / aliased. Defaults to ~/Applications. +* `--prefdir=PATH` — Where preference panes are linked / aliased. Defaults to ~/Library/PreferencePanes. * `--edge` — Use the edge spec for that cask. * `--devel` — Use the devel spec for that cask. * `--stable` — Use the stable spec for that cask. Useful to override the ENV. @@ -160,5 +190,5 @@ code maps to visualize how it all works. Here they are: - - - - - -> ![Map 5](https://f.cloud.github.com/assets/155787/3085/16d3675a-42a1-11e2-8de3-d7d237552f1b.png) +> ![Map 6](https://f.cloud.github.com/assets/155787/3354/b7475b0a-42c0-11e2-97be-0f751a9a0eb0.png) > Current situation \ No newline at end of file diff --git a/lib/cask.rb b/lib/cask.rb index ebce7c777d289..a8cc6396a7773 100644 --- a/lib/cask.rb +++ b/lib/cask.rb @@ -10,7 +10,7 @@ class Cask::CLI; end end class Cask - include Cask::Actions + include Cask::Link include Cask::DSL include Cask::Scopes @@ -22,10 +22,13 @@ def self.caskroom HOMEBREW_PREFIX.join "Caskroom" end - def self.appdir; @appdir ||= Pathname.new(File.expand_path("~/Applications")); end - def self.appdir=(a) @appdir = a; end + def self.audit_ignore_edge; @ignore_edge || false; end def self.audit_ignore_edge=(i) @ignore_edge = i; end + def self.appdir; @appdir ||= Pathname.new(File.expand_path("~/Applications")); end + def self.appdir=(a) @appdir = a; end + def self.prefdir; @prefdir ||= Pathname.new(File.expand_path("~/Library/PreferencePanes")); end + def self.prefdir=(a) @prefdir = a; end def self.install_edge!; @spec = :edge end def self.install_edge?; @spec == :edge end diff --git a/lib/cask/actions.rb b/lib/cask/actions.rb deleted file mode 100644 index bac500348760f..0000000000000 --- a/lib/cask/actions.rb +++ /dev/null @@ -1,19 +0,0 @@ -module Cask::Actions - def linkapps - Pathname.glob("#{destination_path}/**/*.app").each do |app| - destination = Cask.appdir.join(app.basename) - target = destination_path.join(app) - if destination.symlink? - # destination exists but is symlink; removing and relinking - ohai "[#{self}] re-linking #{File.basename(destination)}" - destination.delete - destination.make_symlink(target) - elsif destination.directory? || destination.file? - ohai "[#{self}] NOT linking #{File.basename(destination)} - already exists" - else - ohai "[#{self}] linking #{File.basename(destination)}" - destination.make_symlink(target) - end - end - end -end diff --git a/lib/cask/cli.rb b/lib/cask/cli.rb index 5363b812aaa11..1a12e19a505da 100644 --- a/lib/cask/cli.rb +++ b/lib/cask/cli.rb @@ -42,9 +42,12 @@ def self.nice_listing(cask_list) def self.process_options(args) allrgs = Shellwords.shellsplit(ENV['HOMEBREW_CASK_OPTS'] || "") + args OptionParser.new do |opts| - opts.on("--linkpath=MANDATORY") do |v| - v.sub! "~", ENV['HOME'] if v =~ /^~/ - Cask.appdir = Pathname.new v + opts.on("--appdir=MANDATORY") do |v| + Cask.appdir = Pathname.new File.expand_path(v) + end + + opts.on("--prefdir=MANDATORY") do |v| + Cask.prefdir = Pathname.new File.expand_path(v) end opts.on("--edge") do diff --git a/lib/cask/cli/linkapps.rb b/lib/cask/cli/linkapps.rb deleted file mode 100644 index 0d349143e1659..0000000000000 --- a/lib/cask/cli/linkapps.rb +++ /dev/null @@ -1,12 +0,0 @@ -class Cask::CLI::Linkapps - def self.run(*args) - casks_to_link = args.empty? ? Cask.installed : args - casks_to_link.each do |cask_name| - Cask.load(cask_name).linkapps - end - end - - def self.help - "makes a symlink from all cask-installed .app files into #{Cask.appdir}" - end -end diff --git a/lib/cask/dsl.rb b/lib/cask/dsl.rb index 77856e38037c4..6fe7c780cc221 100644 --- a/lib/cask/dsl.rb +++ b/lib/cask/dsl.rb @@ -31,36 +31,16 @@ def homepage(homepage=nil) @homepage ||= homepage end - # The methods below define the - # (shortcuts for the) stable spec. - def url(url=nil) - @stable ||= SpecBlock.new - @stable.url url - end - - def version(version=nil) - @stable ||= SpecBlock.new - @stable.version version - end - - def md5(sum=nil) - @stable ||= SpecBlock.new - @stable.md5 sum - end - - def sha1(sum=nil) - @stable ||= SpecBlock.new - @stable.sha1 sum - end - - def sha256(sum=nil) - @stable ||= SpecBlock.new - @stable.sha256 sum - end - - def mirror(mirror=nil) - @stable ||= SpecBlock.new - @stable.mirror mirror + %w(url version md5 sha1 sha256 mirror install).each do |m| + class_eval <<-CODE.undent + def #{m}(val=nil) + unless val.nil? + @stable ||= SpecBlock.new + @stable.#{m}(val) + end + return @stable ? @stable.spec.#{m} : @#{m} + end + CODE end end @@ -71,8 +51,17 @@ def initialize(spec_klass=SoftwareSpec) @spec = spec_klass.new end + def install(opts) + @spec.install = opts + end + def method_missing(m, *args) @spec.send(m, *args) end end end + +class SoftwareSpec + attr_reader :install + def install=(opts) @install ||= []; @install << opts; end +end \ No newline at end of file diff --git a/lib/cask/installer.rb b/lib/cask/installer.rb index 08a1c71ba7a6a..671cffe02741e 100644 --- a/lib/cask/installer.rb +++ b/lib/cask/installer.rb @@ -15,6 +15,8 @@ def install(cask) `ditto '#{mountpoint}' '#{cask.destination_path}' 2>/dev/null` end + cask.link! + ohai "Success! #{cask} installed to #{cask.destination_path}" end diff --git a/lib/cask/link.rb b/lib/cask/link.rb new file mode 100644 index 0000000000000..4145ca628b0f4 --- /dev/null +++ b/lib/cask/link.rb @@ -0,0 +1,48 @@ +module Cask::Link + def linkall + Pathname.glob("#{destination_path}/**/*.app").each do |app| + linkapp(app) + end + end + + def link! + if active_spec.install.nil? or active_spec.install == [] + linkall + else + active_spec.install.each { |links| + links.each { |type, path| + path = destination_path.join(path) + raise "Path doesn't exist: #{path}." unless path.exist? + m = "link#{type}".to_sym + self.send(m, path) if self.respond_to? m + } + } + end + end + +protected + + def linkapp(path) + symlink(path, Cask.appdir) + end + + def linkpref(path) + symlink(path, Cask.prefdir) + end + + def symlink(path, dest) + destination = dest.join(path.basename) + target = destination_path.join(path) + if destination.symlink? + # destination exists but is symlink; removing and relinking + ohai "[#{self}] re-linking #{File.basename(destination)}" + destination.delete + destination.make_symlink(target) + elsif destination.directory? || destination.file? + ohai "[#{self}] NOT linking #{File.basename(destination)} - already exists" + else + ohai "[#{self}] linking #{File.basename(destination)}" + destination.make_symlink(target) + end + end +end From ef042a195b5327707e9100b6d5b6bd375fffffb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Tue, 11 Dec 2012 01:18:37 +1300 Subject: [PATCH 15/17] Bring mu-commander up to speed --- Casks/mu-commander.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Casks/mu-commander.rb b/Casks/mu-commander.rb index b1a72899a3bfd..37bed9f7d347b 100644 --- a/Casks/mu-commander.rb +++ b/Casks/mu-commander.rb @@ -1,6 +1,5 @@ class MuCommander < Cask url 'http://www.mucommander.com/download/mucommander-0_9_0.dmg' - version '0.9.0' homepage 'http://www.mucommander.com/index.php' - content_length '4673174' + sha1 'f733f5a4dc380836def21ca76656c2053153c960' end From 2d965082975be36f46c1481cefe08e4ceaa20974 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Tue, 11 Dec 2012 13:55:09 +1300 Subject: [PATCH 16/17] Add a few install statements --- Casks/google-chrome-canary.rb | 2 ++ Casks/google-chrome.rb | 7 +++++-- Casks/vlc.rb | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Casks/google-chrome-canary.rb b/Casks/google-chrome-canary.rb index dfc249ad2c8bb..c5818a9b99a99 100644 --- a/Casks/google-chrome-canary.rb +++ b/Casks/google-chrome-canary.rb @@ -1,6 +1,8 @@ class GoogleChromeCanary < Cask homepage 'https://tools.google.com/dlpage/chromesxs' + edge do url 'https://storage.googleapis.com/chrome-canary/GoogleChromeCanary.dmg' + install :app => 'Google Chrome Canary.app' end end diff --git a/Casks/google-chrome.rb b/Casks/google-chrome.rb index abaddf26a5faa..62c1fc573487d 100644 --- a/Casks/google-chrome.rb +++ b/Casks/google-chrome.rb @@ -1,5 +1,8 @@ class GoogleChrome < Cask - url 'https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg' homepage 'https://www.google.com/chrome/' - version 'stable-channel' + + edge do # Always the latest version + url 'https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg' + install :app => 'Google Chrome.app' + end end diff --git a/Casks/vlc.rb b/Casks/vlc.rb index 11e9d8f2e89f2..b73b9a2df076a 100644 --- a/Casks/vlc.rb +++ b/Casks/vlc.rb @@ -2,4 +2,5 @@ class Vlc < Cask homepage 'http://www.videolan.org/vlc/' url 'http://downloads.sourceforge.net/project/vlc/2.0.3/macosx/vlc-2.0.3.dmg' sha1 'fb49e0da2584eb87abf7f8a93961cb86aa85c579' + install :app => 'VLC.app' end From 0024b7ac29d9348c25c0af51d49364403a7bb4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Tue, 11 Dec 2012 13:54:28 +1300 Subject: [PATCH 17/17] Revert README to official state --- MAP | 117 --------------------------- README.md | 234 ++++++++++++++++++++++-------------------------------- 2 files changed, 94 insertions(+), 257 deletions(-) delete mode 100644 MAP diff --git a/MAP b/MAP deleted file mode 100644 index b4e5f91d01f24..0000000000000 --- a/MAP +++ /dev/null @@ -1,117 +0,0 @@ -6 | - FILES | PATHWAYS - -------- | ----------- - | - /bin/brew-cask.rb | How a CLI command gets run: Installing a cask: - +-----------------+ | +---------------------+ - | CLI entry point | | +-------------------+ +--------------------+ +->| If it's an archive: | - +-----------------+ | | /bin/brew-cask.rb | | Cask::CLI::Install | | | | - | +-------------------+ | .run() | | | * dmg | - /brew-cask.rb | -- * --------- * -- +--------------------+ | | * zip | - +------------------+ | | | --------- * -------- | | * tar | - | Homebrew formula | | v v | | | * tar+bzip | - +------------------+ | +---------+ +----------------+ +-------+---------+ | | * tar+gzip | - | | require | | Cask::CLI | | * | | +--------------+------+ - /Casks/ | | "cask" | | .process() | | Cask | .load() | | | - +---------------+ | +---------+ | * * | +-------+---------+ | v - | Casks Library | | +-+----------+---+ | | +------------------+ - +---------------+ | | | v | | Extract and | - | +-------+ v +----------------------+ | | copy to Caskroom | - /Gemfile | | +--------------------+ | Cask::Installer | | +----------+-------+ - /Rakefile | v | self. * | | .install() | | | - /test/ | +------------+ | lookup_ | _command | +--------+-------------+ | v - +----------------+ | | Cask.init | +---------+----------+ | | +----------------+ - | Used for tests | | +------------+ | | | | Install / Link | - +----------------+ | +------+-----+ v | +----------------+ - | +--->+ Parse opts | +------------------------+ | ----- DONE ----- - /lib/plist/ | +------+ | +------+-----+ | >CURL< | | - +---------------------+ | | Cask |<--+ | +------------------------+ | - | PList parser | | +------+ +---------+-------+ | CurlDownloadStrategy | | - | ------------- | | | | | | | | - | Pulled from github: | | v <-fallback-+ v | +--- SoftwareSpec | | - | bleything/plist | | +-------------+ +-+----------+ | | | - +---------------------+ | | NullCommand | | Cask::CLI | +------------------------+ | +-------------------+ - | | .new() * | | const_get *| | Uses properties: | +->| Otherwise: | - /lib/cask* | +----------+--+ +-----------++ | | | | | - +------------------------+ | | | | * title | | | > Ignore silently.| - | The Meat of the Matter | | +--------+------------+ | * url | | +-------------------+ - +------------------------+ | | | * version | | - | | +------------+-----------+ |YES -------------------------------+ +----*-----+ | +-+---------+NO +-------+ - | |+--------+| +----------->| Checksums +--->| Error | - EXCEPTIONS | || .run() || | match? | +-------+ - ------------- | |+--------+| +-----------+ - | - CaskNotInstalledError | Uninstalling a cask: Listing/Searching casks: - | - < RuntimeError | +----------------------+ +-----------------+ +-------------------+ - | | Cask::CLI::Uninstall | | Cask::CLI::List | | Cask::CLI::Search | - Param: cask (Cask) | | .run() | | .run() | | .run() | - | +----------------------+ +-----------------+ +-------------------+ - | --------- * ---------- ---------------- * ------------------ - | | | - CaskUnavailableError | +-------+---------+ v - | | * | +------------------------------+ - < RuntimeError | | Cask | .load() | | Cask.all_titles | - | +-------+---------+ +------------------------------+ - Param: cask_name (String) | | | All: Taps/*/Casks/*.rb *-+ | - | v | | | -------------------------------+ +----------------------+ | +- <----- map <---------+ | - | | Cask::Installer | | | | - DSL | | .uninstall() | | +--> From: | - ------ | +------------+---------+ | Taps/example/Casks/cask.rb | - | | | | - * homepage | v | To: example/cask | - | +---------------+ +---+--------------------------+ - (For brew info/open) | | Remove entire | | - | | tree in | | +----------------------+ - * url | | Cellar | +->| Filter by installed | - | +---------------+ | or keywords… or not +-+ - (To download archive) | ---- DONE. ---- +----------------------+ | - | v - * version | +----------------+ - | | Pretty listing | - (To set or override ver.) | +----------------+ - | ----- DONE ----- - * md5 / sha1 / sha256 | - | - (For checksumming) | - | - * stable / devel / edge | - | - (Spec blocks) | - | Editing a cask: Creating a cask: Auditing a cask: +---------------+ - * mirror | +--*| File mod 644? | - | +-----------------+ +------------------+ | +---------------+ - (Add a download mirror) | | Cask::CLI::Edit | +-- There is a file --+ | Cask::CLI::Audit | | - | | .run() | | | | .run() | | +---------------+ - * install | +-----------------+ lib/cli/create.rb +------------------+ +--*| Correct URLs? | - | ------- * ------- | | -------- * ------- | +---------------+ - (Link files into system) | | +-- but it's empty. --+ | | - | +-------+-------+ +--------+-------+ | +-----------------+ -------------------------------+ | * | | * | +--*| Bad whitespace? | - | | Cask | .path | | Cask | .load | | +-----------------+ - OPTIONS | +-------+-------+ +--------+-------+ | - ---------- | | | | +------------------+ - | v v +--*| Good code style? | - ––[app|pref]dir=PATH | +----------------+ +-----------------+ | +------------------+ - | | Cask formula |NO +-------+ | Cask::Auditor | | - ––edge / devel / stable | | exists ? +--->| Error | | .new() | | +--------------+ - | +-------+--------+ +-------+ +-----------------+ +--*| Checksumming | - ––[no–]ignore–edge–only | | | ca.audit <------+--+ +--------------+ - | v YES | | | - Also can be set using | +---------+ | ca.problems * | | +--------------------+ - | | Open | +-------------+---+ +--*| Redundant version? | - HOMEBREW_CASK_OPTS env var. | | | | +--------------------+ - | | $EDITOR | v ANY? -------------------------------+ +---------+ +-------+ - | Error | - +-------+ - - - - - - - - \ No newline at end of file diff --git a/README.md b/README.md index 1d7c654015031..10e1b2f1868c8 100644 --- a/README.md +++ b/README.md @@ -1,69 +1,77 @@ -Homebrew Casks -============== +“To install, drag this icon...” no more! +======================================== -This project's main development is at: -https://github.com/phinze/homebrew-cask +Let's see if we can get the elegance, simplicity, and speed of Homebrew for the +installation and management GUI Mac applications like Google Chrome and Adium. +`brew-cask` provides a friendly homebrew-style CLI workflow for the +administration of Mac applications distributed as binaries. -Installation Revamp -------------------- +It's implemented as a `homebrew` +“[external command](https://github.com/mxcl/homebrew/wiki/External-Commands)” +called `cask`. -This fork/branch is testing out a radically different way -of installing Casks. It develops ideas exposed in the -following issues: -- [#113](https://github.com/phinze/homebrew-cask/issues/113) — Uninstalling removes symlinks/aliases/shortcuts -- [#105](https://github.com/phinze/homebrew-cask/issues/105) — ~~Features to help manage multiple .app folders~~ -- [#99](https://github.com/phinze/homebrew-cask/issues/99) — Spotlight visibility -- [#89](https://github.com/phinze/homebrew-cask/issues/89) — ~~Don't make `brew doctor` complain~~ (done for unlinked kegs, not for formulae) -- [#72](https://github.com/phinze/homebrew-cask/issues/72) — ~~Features for metadata~~ -- [#38](https://github.com/phinze/homebrew-cask/issues/38) — ~~Moar configuration~~ -- [#30](https://github.com/phinze/homebrew-cask/pull/30) — ~~Config: install/link path~~ -- [#41](https://github.com/phinze/homebrew-cask/issues/41) — ~~Better version management~~ -- [#69](https://github.com/phinze/homebrew-cask/issues/69) — ~~Features for installing different types~~ -- [#82](https://github.com/phinze/homebrew-cask/issues/82) — ~~Checksums~~ +Let's try it! +------------- +### Get brew-cask -Checksums ---------- +First ensure you have Homebrew version ‘0.9’ or higher: -`content_length` has been removed. In its stead, there are -`md5`, `sha1`, and `sha256` which all take a hexdigest string, e.g: - -```ruby -class Candybar < Cask - url 'http://panic.com/museum/candybar/CandyBar 3.3.4.zip' - homepage 'http://panic.com/museum/candybar/' - sha1 'f645e9da45a621415a07a7492c45923b1a1fd4d4' -end -``` + $ brew --version + 0.9.3 + +Tap this repository and install the `brew-cask` tool: + + $ brew tap phinze/homebrew-cask + $ brew install brew-cask + +### Now let's install our first Cask + +Let's see if there's a Cask for Chrome: + + $ brew cask search chrome + google-chrome + +Cool, there it is. Let's install it. + + $ brew cask install google-chrome + Downloading... + ==> [google-chrome] linking Google Chrome.app + Success! google-chrome installed to /usr/local/Caskroom/google-chrome/stable-channel + +Now we have `Google Chrome.app` in our Caskroom, and in ~/Applications. And there we have +it. Google Chrome installed with a few quick commands; no clicking, no dragging, no dropping. + + open "~/Applications/Google Chrome.app" -`brew cask install` will warn if there is no checksum provided, and -error if the sums do not match. +#### What if I want Casks to be linked to /Applications instead? +You can add `--appdir=/Applications` to the `HOMEBREW_CASK_OPTS` environment variable (e.g +in your .bashrc). For a complete list of available options, see +[the wiki](https://github.com/phinze/homebrew-cask/wiki/CLI-Options). -Audit ------ -`brew cask audit` has had a facelift, and is now based on `brew audit`. -It checks whitespace, URLs, checksums, versions, and code style just -like Homebrew's one, albeit modified to fit Casks (a lot of stuff -related to compiling was removed). +What Casks are available? +------------------------- +Just run `brew cask search` with no arguments to get a list. -Caskroom --------- -Casks are now installed in `$HOMEBREW_PREFIX/Caskroom/$name/$version/` -instead of in the Cellar. This stops Homebrew from complaining about -unlinked kegs, and from listing our casks on `brew list`. +How do I update brew-cask? +-------------------------- +Since this repository is a Tap, you'll pull down the latest Casks with a simple +`brew update`. When the `brew-cask` tool itself is updated, it will show in +`brew outdated` and you can upgrade it via the normal Homebrew workflow. -Devel & Edge ------------- -You can now specify alternate specs for *devel* (checksummed, versioned) -and *edge* (un-checksummed, unversioned) using blocks, e.g. +What is a Cask? +--------------- + +A `Cask` is like a `Formula` in Homebrew except it describes how to download +and install a binary application. It looks like this: ```ruby class Firefox < Cask @@ -71,14 +79,14 @@ class Firefox < Cask homepage 'http://www.mozilla.org/en-US/firefox/' version '17.0.1' sha1 'a9888ce69440574fabff712549c8ff503fd1acb7' - - # Beta + + # Beta: devel do url 'http://download.cdn.mozilla.net/pub/mozilla.org/firefox/releases/18.0b3/mac/en-US/Firefox%2018.0b3.dmg' version '18.0b3' sha1 '31e383782b4fbbcbf3a1ef578d82cbf6861912cb' end - + # Nightly edge do url 'http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-20.0a1.en-US.mac.dmg' @@ -86,109 +94,55 @@ class Firefox < Cask end ``` -If the top level `url` is unspecified, then the *edge* spec will be used, e.g. - -```ruby -class FirefoxAurora < Cask - homepage 'http://www.mozilla.org/en-US/firefox/aurora/' - - edge do - url 'https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/firefox-19.0a2.en-US.mac.dmg' - version '19.0a2' - end -end -``` - -### Version parsing - -Additionally, we will attempt to parse the URL to get the version, so if -the correct version is within the URL, there is no need to specify it -explicitely using `version`. This also applies to *devel* specs. - - -Linking -------- - -Moar breaking changes: `brew cask linkapps` is removed. Linking is done at -install-time, and by default has the same behaviour (link every `.app` found -recursively). However, that behaviour can be overridden in the formula: +For details and a complete syntax guide, see +[Cask DSL on the wiki](https://github.com/phinze/homebrew-cask/wiki/Cask-DSL). -```ruby -class Brackets < Cask - url 'https://github.com/downloads/adobe/brackets/brackets-sprint-16-MAC.dmg' - homepage 'http://brackets.io' - version 'sprint-16' - sha1 '94322762ecb00baab857e324a98e543d548bf961' - - install :app => 'Brackets Sprint 16.app' -end -``` -`install` is spec-specific (so you have a different one for *devel* and *edge*), -and takes a hash with a single pair of the form: +What's the status of this project? Where's it headed? +------------------------------------------------------ - :type => 'path/to/file.ext' +It's really just a start at this point, but it works, and I've got big plans! -You can have as many `install ...` statements as necessary. Currently, the only -types supported are `app` (`.app` files, linked into `~/Applications` or whatever -`--appdir` is set to) and `pref` (`.prefPane` files, linked into `~/Library/PreferencePanes` -or whatever `--prefdir` is set to). +`brew-cask` currently understands how to install `dmg` and `zip` files that +contain a `.app` file. I'd like to extend it to be able to handle `pkg` files +as well as the numerous other permutations of compression and distribution in +the wild (`.app` inside `dmg` inside `zip`; folder inside `dmg`; etc.). +Each Cask will then encapsulate and automate the story of how a given +application should be installed. If all goes well - I'm hoping to build up a +community-maintained collection of Casks that becomes the standard way that +hackers install Mac apps. -Configuration -------------- - -You can now configure some aspects of `brew cask`'s operation. You can set -options on the command: - $ brew cask install adium --appdir=/Applications +Can I contribute? +----------------- -or you can set them in the `HOMEBREW_CASK_OPTS` environment variable: +__Yes, yes, yes!__ Please fork/pull request to update Casks, to add features, +to clean up documentation--anything at all that you can do to help out is very +welcome. -```bash -# ~/.bashrc, somewhere at the end of the file +It's also __pretty darn easy__ to create Casks, so please build more of them +for the software you use. And if `brew-cask` doesn't support the packaging +format of your software, please open an issue and we can get it working +together. -export HOMEBREW_CASK_OPTS='--appdir=/Applications' -``` - -Command-line options override environment ones. - -### Available options: - -* `--appdir=PATH` — Where applications are linked / aliased. Defaults to ~/Applications. -* `--prefdir=PATH` — Where preference panes are linked / aliased. Defaults to ~/Library/PreferencePanes. -* `--edge` — Use the edge spec for that cask. -* `--devel` — Use the devel spec for that cask. -* `--stable` — Use the stable spec for that cask. Useful to override the ENV. -* `--[no-]ignore-edge-only` — Ignore “edge-only” problems when auditing casks. If you're - working with `brew cask audit` a lot, I recommend you put it in your `HOMEBREW_CASK_OPTS`. - - -Cask info ---------- - -`brew cask info ` now gives: - -```plain -adium: 1.5.3 -http://www.adium.im/ -/usr/local/Caskroom/adium/1.5.3 (2947 files, 69M) -https://github.com/phinze/cask/commits/master/Casks/adium.rb -``` +The whole idea is to build a _community-maintained_ list of easily installable +packages, so the community part is important! Every little bit counts. -And you can use `brew cask open ` to open its homepage. +Taps +---- -Code maps ---------- +You can add Casks to your existing (or new) taps: just create a directory named +`Casks` inside your tap, put your Casks there, and everything will just work. -I've also spent (and am still spending) some time creating -code maps to visualize how it all works. Here they are: -> ![Map 1](http://i.imgur.com/oBMyI.png) -> Vanilla phinze/cask v.0.5.4 +Alfred Integration +------------------ -- - - - - +I've been using Casks along with Alfred to great effect. Just add +`/usr/local/Caskroom` as a Search Scope in Alfred's preferences, and then +applications become available in Alfred immediately after a `brew cask +install`. Your fingertips will thank you. -> ![Map 6](https://f.cloud.github.com/assets/155787/3354/b7475b0a-42c0-11e2-97be-0f751a9a0eb0.png) -> Current situation \ No newline at end of file +Oh, and you can `brew cask install alfred` too! Not bad, eh? \ No newline at end of file