From 0d1f831b79f7b4bba95475c493053d36e9d9f37f Mon Sep 17 00:00:00 2001 From: phinze Date: Mon, 17 Dec 2012 17:04:22 -0700 Subject: [PATCH] Add checksum support to Casks. `md5`, `sha1`, `sha256` all take a hexdigest string, e.g: sha1 'f645e9da45a621415a07a7492c45923b1a1fd4d4' `no_checksum` takes no argument, and indicates there is no checksum for this cask. This is *not recommended*, and should only be used for casks that have no versioned downloads. `brew cask install` will complain if there is no sum provided (unless `no_checksum` has been invoked), or if the sums do not match. It will provide the computed checksum so the cask can be easily amended. Adapted from @passcod's work in 82cc199ae6bbb1e98950e71a0573ab48e6a641ee --- Casks/adium.rb | 1 + Casks/alfred.rb | 1 + Casks/anvil.rb | 1 + Casks/aquamacs.rb | 1 + Casks/arq.rb | 1 + Casks/at-monitor.rb | 1 + Casks/back-in-time.rb | 1 + Casks/bartender.rb | 1 + Casks/bettertouchtool.rb | 1 + Casks/boot-x-changer.rb | 1 + Casks/brackets.rb | 1 + Casks/caffeine.rb | 1 + Casks/candybar.rb | 1 + Casks/changes.rb | 1 + Casks/chocolat.rb | 1 + Casks/chromium.rb | 1 + Casks/clip-menu.rb | 1 + Casks/colloquy.rb | 1 + Casks/cura.rb | 1 + Casks/cyberduck.rb | 1 + Casks/dia.rb | 1 + Casks/disk-inventory-x.rb | 1 + Casks/divvy.rb | 1 + Casks/dropbox.rb | 1 + Casks/emacs.rb | 1 + Casks/firefox-aurora.rb | 1 + Casks/firefox.rb | 1 + Casks/fluid.rb | 1 + Casks/flux.rb | 1 + Casks/gephi.rb | 3 ++- Casks/gfxcardstatus.rb | 1 + Casks/gimp.rb | 1 + Casks/github.rb | 1 + Casks/gitx-l.rb | 1 + Casks/gitx.rb | 1 + Casks/gmail-notifr.rb | 1 + Casks/google-chrome-canary.rb | 3 ++- Casks/google-chrome.rb | 3 ++- Casks/google-notifier.rb | 1 + Casks/handbrake.rb | 1 + Casks/handbrakebatch.rb | 1 + Casks/hands-off.rb | 1 + Casks/inkscape.rb | 3 ++- Casks/intellij-community.rb | 1 + Casks/intellij-ultimate.rb | 1 + Casks/irip.rb | 1 + Casks/istat-menus.rb | 1 + Casks/iterm2.rb | 3 ++- Casks/jumpcut.rb | 1 + Casks/justlooking.rb | 1 + Casks/keepass-x.rb | 3 ++- Casks/keyboard-maestro.rb | 1 + Casks/libre-office.rb | 1 + Casks/little-snitch.rb | 1 + Casks/livestation.rb | 1 + Casks/macvim.rb | 1 + Casks/menu-bar-filter.rb | 1 + Casks/moom.rb | 1 + Casks/namemangler.rb | 1 + Casks/notational-velocity.rb | 1 + Casks/nv-alt.rb | 3 ++- Casks/one-password.rb | 1 + Casks/open-office.rb | 1 + Casks/paintbrush.rb | 1 + Casks/pandora-jam.rb | 1 + Casks/picard.rb | 1 + Casks/plex.rb | 1 + Casks/postgres.rb | 1 + Casks/propane.rb | 1 + Casks/quicksilver.rb | 1 + Casks/racket.rb | 3 ++- Casks/rdio.rb | 3 ++- Casks/ringtones.rb | 1 + Casks/ripit.rb | 3 ++- Casks/rubymine.rb | 3 ++- Casks/scrivener.rb | 1 + Casks/seashore.rb | 1 + Casks/sequel-pro.rb | 1 + Casks/shortcat.rb | 1 + Casks/size-up.rb | 1 + Casks/skype.rb | 1 + Casks/slate.rb | 1 + Casks/sourcetree.rb | 1 + Casks/sparrow.rb | 1 + Casks/spectacle.rb | 1 + Casks/spotify.rb | 1 + Casks/steam.rb | 3 ++- Casks/sublime-text.rb | 1 + Casks/tagalicious.rb | 3 ++- Casks/textadept.rb | 1 + Casks/textmate1.rb | 1 + Casks/textmate2.rb | 1 + Casks/textwrangler.rb | 3 ++- Casks/the-unarchiver.rb | 1 + Casks/thunderbird.rb | 1 + Casks/time-machine-editor.rb | 1 + Casks/transmission.rb | 1 + Casks/transmit.rb | 1 + Casks/tunewiki.rb | 1 + Casks/tvmobili.rb | 3 ++- Casks/u-torrent.rb | 1 + Casks/virtualbox.rb | 1 + Casks/vlc.rb | 1 + Casks/woodhouse.rb | 3 ++- Casks/x-quartz.rb | 1 + Casks/xbmc.rb | 2 +- Casks/xscope.rb | 1 + lib/cask/cli/install.rb | 4 ++++ lib/cask/dsl.rb | 25 +++++++++++++++++++++++ lib/cask/installer.rb | 19 ++++++++++++++++- test/cask/dsl_test.rb | 15 ++++++++++++++ test/cask/installer_test.rb | 26 ++++++++++++++++++++++++ test/support/Casks/bad-checksum.rb | 6 ++++++ test/support/Casks/local-caffeine.rb | 1 + test/support/Casks/local-transmission.rb | 1 + test/support/Casks/missing-checksum.rb | 5 +++++ test/support/Casks/no-checksum.rb | 6 ++++++ 117 files changed, 230 insertions(+), 18 deletions(-) create mode 100644 test/support/Casks/bad-checksum.rb create mode 100644 test/support/Casks/missing-checksum.rb create mode 100644 test/support/Casks/no-checksum.rb diff --git a/Casks/adium.rb b/Casks/adium.rb index 477546428..9191e6bec 100644 --- a/Casks/adium.rb +++ b/Casks/adium.rb @@ -3,4 +3,5 @@ class Adium < Cask 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 53f90ca8d..6bd7bdec0 100644 --- a/Casks/alfred.rb +++ b/Casks/alfred.rb @@ -3,4 +3,5 @@ class Alfred < Cask 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 3720a427f..e0151dee9 100644 --- a/Casks/anvil.rb +++ b/Casks/anvil.rb @@ -3,4 +3,5 @@ class Anvil < Cask homepage 'http://anvilformac.com/' version 'latest' content_length '2322000' + no_checksum end diff --git a/Casks/aquamacs.rb b/Casks/aquamacs.rb index 4936f69c6..b7b347a30 100644 --- a/Casks/aquamacs.rb +++ b/Casks/aquamacs.rb @@ -3,4 +3,5 @@ class Aquamacs < Cask 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 6ae240a82..51b20395b 100644 --- a/Casks/arq.rb +++ b/Casks/arq.rb @@ -3,4 +3,5 @@ class Arq < Cask 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 35c5a8137..6290f7957 100644 --- a/Casks/at-monitor.rb +++ b/Casks/at-monitor.rb @@ -3,4 +3,5 @@ class AtMonitor < Cask 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 c70e28ae8..92abc9650 100644 --- a/Casks/back-in-time.rb +++ b/Casks/back-in-time.rb @@ -3,4 +3,5 @@ class BackInTime < Cask 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 97134a0ed..2ffb33bb2 100644 --- a/Casks/bartender.rb +++ b/Casks/bartender.rb @@ -3,4 +3,5 @@ class Bartender < Cask homepage 'http://www.macbartender.com/' version 'latest' content_length '4380381' + no_checksum end diff --git a/Casks/bettertouchtool.rb b/Casks/bettertouchtool.rb index ef4418c97..d2e23e07d 100644 --- a/Casks/bettertouchtool.rb +++ b/Casks/bettertouchtool.rb @@ -3,4 +3,5 @@ class Bettertouchtool < Cask 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 651fbad8a..6cc25d934 100644 --- a/Casks/boot-x-changer.rb +++ b/Casks/boot-x-changer.rb @@ -3,4 +3,5 @@ class BootXChanger < Cask 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 c9849bc71..d17c8b15c 100644 --- a/Casks/brackets.rb +++ b/Casks/brackets.rb @@ -3,4 +3,5 @@ class Brackets < Cask homepage 'http://brackets.io' version 'sprint-16' content_length '25020067' + sha1 '94322762ecb00baab857e324a98e543d548bf961' end diff --git a/Casks/caffeine.rb b/Casks/caffeine.rb index 2d5c36e59..c1714c1e4 100644 --- a/Casks/caffeine.rb +++ b/Casks/caffeine.rb @@ -3,4 +3,5 @@ class Caffeine < Cask 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 51460932c..4ff2abe81 100644 --- a/Casks/candybar.rb +++ b/Casks/candybar.rb @@ -3,5 +3,6 @@ class Candybar < Cask 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 8cf890cd3..df1806a5c 100644 --- a/Casks/changes.rb +++ b/Casks/changes.rb @@ -3,5 +3,6 @@ class Changes < Cask homepage 'http://bitbq.com/changes/' version 'latest' content_length '1990799' + no_checksum end diff --git a/Casks/chocolat.rb b/Casks/chocolat.rb index 0eaad5fb6..eeea08b69 100644 --- a/Casks/chocolat.rb +++ b/Casks/chocolat.rb @@ -3,5 +3,6 @@ class Chocolat < Cask homepage 'http://chocolatapp.com/' version 'latest' content_length '14545811' + no_checksum end diff --git a/Casks/chromium.rb b/Casks/chromium.rb index 5a3c4df74..dd44e8c5a 100644 --- a/Casks/chromium.rb +++ b/Casks/chromium.rb @@ -3,4 +3,5 @@ class Chromium < Cask 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 c4495bd84..3ca6eea51 100644 --- a/Casks/clip-menu.rb +++ b/Casks/clip-menu.rb @@ -3,4 +3,5 @@ class ClipMenu < Cask 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 70d735d78..38f1b3a06 100644 --- a/Casks/colloquy.rb +++ b/Casks/colloquy.rb @@ -3,5 +3,6 @@ class Colloquy < Cask homepage 'http://colloquy.info/' version '2.4' content_length '7442191' + sha1 'e0f6d4df8a09c5b48e0d972dc732cc1203b2384c' end diff --git a/Casks/cura.rb b/Casks/cura.rb index 1bde1dbc6..65cc4bbdf 100644 --- a/Casks/cura.rb +++ b/Casks/cura.rb @@ -3,4 +3,5 @@ class Cura < Cask 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 4768c3f12..dd3e3e5a2 100644 --- a/Casks/cyberduck.rb +++ b/Casks/cyberduck.rb @@ -3,4 +3,5 @@ class Cyberduck < Cask 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 f759f8453..2393c2775 100644 --- a/Casks/dia.rb +++ b/Casks/dia.rb @@ -3,4 +3,5 @@ class Dia < Cask 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 0576ac8a5..5b7da57cb 100644 --- a/Casks/disk-inventory-x.rb +++ b/Casks/disk-inventory-x.rb @@ -3,4 +3,5 @@ class DiskInventoryX < Cask homepage 'http://www.derlien.com/' version 'latest' content_length '2969560' + no_checksum end diff --git a/Casks/divvy.rb b/Casks/divvy.rb index a0889be11..94db000d3 100644 --- a/Casks/divvy.rb +++ b/Casks/divvy.rb @@ -3,4 +3,5 @@ class Divvy < Cask homepage 'http://mizage.com/divvy/' version 'latest' content_length '2377821' + no_checksum end diff --git a/Casks/dropbox.rb b/Casks/dropbox.rb index 41a9c1f8f..b54d317f7 100644 --- a/Casks/dropbox.rb +++ b/Casks/dropbox.rb @@ -3,4 +3,5 @@ class Dropbox < Cask 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 1780fd5e3..b76fdf2b0 100644 --- a/Casks/emacs.rb +++ b/Casks/emacs.rb @@ -3,4 +3,5 @@ class Emacs < Cask 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 e693afcba..ab43c1414 100644 --- a/Casks/firefox-aurora.rb +++ b/Casks/firefox-aurora.rb @@ -3,4 +3,5 @@ class FirefoxAurora < Cask homepage 'http://www.mozilla.org/en-US/firefox/aurora/' content_length '49254741' version '19.0a2' + no_checksum # This is a nightly end diff --git a/Casks/firefox.rb b/Casks/firefox.rb index f67e3f105..ff9cce2dd 100644 --- a/Casks/firefox.rb +++ b/Casks/firefox.rb @@ -3,4 +3,5 @@ class Firefox < Cask homepage 'http://www.mozilla.org/en-US/firefox/' content_length '34958026' version '17.0.1' + sha1 'a9888ce69440574fabff712549c8ff503fd1acb7' end diff --git a/Casks/fluid.rb b/Casks/fluid.rb index 155529fbd..de18e741f 100644 --- a/Casks/fluid.rb +++ b/Casks/fluid.rb @@ -3,4 +3,5 @@ class Fluid < Cask 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 5232efd24..2cabf25d6 100644 --- a/Casks/flux.rb +++ b/Casks/flux.rb @@ -3,4 +3,5 @@ class Flux < Cask homepage 'http://stereopsis.com/flux/' version 'latest' content_length '1314863' + no_checksum end diff --git a/Casks/gephi.rb b/Casks/gephi.rb index 01bc25c95..ac5146c69 100644 --- a/Casks/gephi.rb +++ b/Casks/gephi.rb @@ -1,6 +1,7 @@ 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 177c8040d..dcf8846c0 100644 --- a/Casks/gfxcardstatus.rb +++ b/Casks/gfxcardstatus.rb @@ -3,4 +3,5 @@ class Gfxcardstatus < Cask 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 ca3ff7f97..5b95383d2 100644 --- a/Casks/gimp.rb +++ b/Casks/gimp.rb @@ -3,4 +3,5 @@ class Gimp < Cask 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 f0f08460b..975726be4 100644 --- a/Casks/github.rb +++ b/Casks/github.rb @@ -3,4 +3,5 @@ class Github < Cask 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 69911d197..0aaa7f396 100644 --- a/Casks/gitx-l.rb +++ b/Casks/gitx-l.rb @@ -3,5 +3,6 @@ class GitxL < Cask 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 4c4419b63..2226d7279 100644 --- a/Casks/gitx.rb +++ b/Casks/gitx.rb @@ -3,4 +3,5 @@ class Gitx < Cask 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 bf531faa9..7778306a8 100644 --- a/Casks/gmail-notifr.rb +++ b/Casks/gmail-notifr.rb @@ -3,4 +3,5 @@ class GmailNotifr < Cask 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 8d9f313ba..e0351dbf8 100644 --- a/Casks/google-chrome-canary.rb +++ b/Casks/google-chrome-canary.rb @@ -1,6 +1,7 @@ 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 ab2ea7f45..63e356218 100644 --- a/Casks/google-chrome.rb +++ b/Casks/google-chrome.rb @@ -1,6 +1,7 @@ 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 a7383eabc..fd8e85a94 100644 --- a/Casks/google-notifier.rb +++ b/Casks/google-notifier.rb @@ -3,4 +3,5 @@ class GoogleNotifier < Cask 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 fe4215869..873f06ecd 100644 --- a/Casks/handbrake.rb +++ b/Casks/handbrake.rb @@ -3,4 +3,5 @@ class Handbrake < Cask 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 5dcc9bb8d..e9e571836 100644 --- a/Casks/handbrakebatch.rb +++ b/Casks/handbrakebatch.rb @@ -3,4 +3,5 @@ class Handbrakebatch < Cask 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 2f5d0f788..7b24bf2a5 100644 --- a/Casks/hands-off.rb +++ b/Casks/hands-off.rb @@ -3,4 +3,5 @@ class HandsOff < Cask 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 f7302e849..07c3b4e27 100644 --- a/Casks/inkscape.rb +++ b/Casks/inkscape.rb @@ -1,6 +1,7 @@ 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 5d9f3d461..22695b611 100644 --- a/Casks/intellij-community.rb +++ b/Casks/intellij-community.rb @@ -3,4 +3,5 @@ class IntellijCommunity < Cask 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 e59b992d5..929532ea8 100644 --- a/Casks/intellij-ultimate.rb +++ b/Casks/intellij-ultimate.rb @@ -3,4 +3,5 @@ class IntellijUltimate < Cask 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 46e10ea79..5392bbb78 100644 --- a/Casks/irip.rb +++ b/Casks/irip.rb @@ -3,4 +3,5 @@ class Irip < Cask 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 7f9aacf96..ec060889a 100644 --- a/Casks/istat-menus.rb +++ b/Casks/istat-menus.rb @@ -3,4 +3,5 @@ class IstatMenus < Cask 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 3bacf7254..53d80c4d9 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 2cd711dcd..93f3b8625 100644 --- a/Casks/jumpcut.rb +++ b/Casks/jumpcut.rb @@ -3,5 +3,6 @@ class Jumpcut < Cask 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 f5b87f61e..878f3b7e6 100644 --- a/Casks/justlooking.rb +++ b/Casks/justlooking.rb @@ -3,4 +3,5 @@ class Justlooking < Cask 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 717ae06b1..2c8e1feb4 100644 --- a/Casks/keepass-x.rb +++ b/Casks/keepass-x.rb @@ -1,6 +1,7 @@ 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 3165301aa..dac9a489a 100644 --- a/Casks/keyboard-maestro.rb +++ b/Casks/keyboard-maestro.rb @@ -3,4 +3,5 @@ class KeyboardMaestro < Cask 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 c03fc6104..294dd1c92 100644 --- a/Casks/libre-office.rb +++ b/Casks/libre-office.rb @@ -3,4 +3,5 @@ class LibreOffice < Cask 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 4193ef585..bfff94cc8 100644 --- a/Casks/little-snitch.rb +++ b/Casks/little-snitch.rb @@ -3,4 +3,5 @@ class LittleSnitch < Cask 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 ccb7f1b11..76f105a77 100644 --- a/Casks/livestation.rb +++ b/Casks/livestation.rb @@ -3,4 +3,5 @@ class Livestation < Cask 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 4eecc027a..f9ccc0607 100644 --- a/Casks/macvim.rb +++ b/Casks/macvim.rb @@ -3,4 +3,5 @@ class Macvim < Cask homepage 'http://code.google.com/p/macvim/' version '7.3-65' content_length '7215380' + sha1 '30f58b03127a7b5f9e2c23fd31d3749e8f3e2197' end diff --git a/Casks/menu-bar-filter.rb b/Casks/menu-bar-filter.rb index 2c466874d..889e57373 100644 --- a/Casks/menu-bar-filter.rb +++ b/Casks/menu-bar-filter.rb @@ -3,4 +3,5 @@ class MenuBarFilter < Cask 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 114070882..53236a1d4 100644 --- a/Casks/moom.rb +++ b/Casks/moom.rb @@ -3,4 +3,5 @@ class Moom < Cask homepage 'http://manytricks.com/moom/' version 'latest' content_length '6121023' + no_checksum end diff --git a/Casks/namemangler.rb b/Casks/namemangler.rb index 33b20ea2f..560e145ce 100644 --- a/Casks/namemangler.rb +++ b/Casks/namemangler.rb @@ -3,4 +3,5 @@ class Namemangler < Cask 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 7f0774cef..497b40620 100644 --- a/Casks/notational-velocity.rb +++ b/Casks/notational-velocity.rb @@ -3,4 +3,5 @@ class NotationalVelocity < Cask 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 3f8f3ffb9..b57a21bac 100644 --- a/Casks/nv-alt.rb +++ b/Casks/nv-alt.rb @@ -1,6 +1,7 @@ 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 c3de291da..32b51833e 100644 --- a/Casks/one-password.rb +++ b/Casks/one-password.rb @@ -3,4 +3,5 @@ class OnePassword < Cask 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 b12a305c2..8ad6bcdc8 100644 --- a/Casks/open-office.rb +++ b/Casks/open-office.rb @@ -3,5 +3,6 @@ class OpenOffice < Cask 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 a2a58d54a..ff54b0818 100644 --- a/Casks/paintbrush.rb +++ b/Casks/paintbrush.rb @@ -3,4 +3,5 @@ class Paintbrush < Cask 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 8a0048dc1..cba2f33b8 100644 --- a/Casks/pandora-jam.rb +++ b/Casks/pandora-jam.rb @@ -3,4 +3,5 @@ class PandoraJam < Cask 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 deae97f67..a34458b22 100644 --- a/Casks/picard.rb +++ b/Casks/picard.rb @@ -3,4 +3,5 @@ class Picard < Cask 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 a2fb94c9d..c8c2ff11c 100644 --- a/Casks/plex.rb +++ b/Casks/plex.rb @@ -3,4 +3,5 @@ class Plex < Cask 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 fb8ec7e97..42fd6f002 100644 --- a/Casks/postgres.rb +++ b/Casks/postgres.rb @@ -3,4 +3,5 @@ class Postgres < Cask homepage 'http://www.postgresapp.com/' version 'latest' content_length '58088683' + no_checksum end diff --git a/Casks/propane.rb b/Casks/propane.rb index 843b03f7f..75d4d5053 100644 --- a/Casks/propane.rb +++ b/Casks/propane.rb @@ -3,4 +3,5 @@ class Propane < Cask homepage 'http://propaneapp.com/' version 'latest' content_length '2840383' + no_checksum end diff --git a/Casks/quicksilver.rb b/Casks/quicksilver.rb index fdb1e1d83..c28551f8b 100644 --- a/Casks/quicksilver.rb +++ b/Casks/quicksilver.rb @@ -3,4 +3,5 @@ class Quicksilver < Cask homepage 'http://qsapp.com/' version 'latest' content_length '3473822' + no_checksum end diff --git a/Casks/racket.rb b/Casks/racket.rb index b69d572ac..3851a3628 100644 --- a/Casks/racket.rb +++ b/Casks/racket.rb @@ -1,6 +1,7 @@ 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 1a87dd0af..0a273796e 100644 --- a/Casks/rdio.rb +++ b/Casks/rdio.rb @@ -1,6 +1,7 @@ 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 79a3dcc41..9570cfeb8 100644 --- a/Casks/ringtones.rb +++ b/Casks/ringtones.rb @@ -3,4 +3,5 @@ class Ringtones < Cask version 'latest' homepage 'http://thelittleappfactory.com/ringtones/' content_length '2519864' + no_checksum end diff --git a/Casks/ripit.rb b/Casks/ripit.rb index 7e2e2d316..3484324b7 100644 --- a/Casks/ripit.rb +++ b/Casks/ripit.rb @@ -1,6 +1,7 @@ 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 317caeeaa..3d8c2b0a9 100644 --- a/Casks/rubymine.rb +++ b/Casks/rubymine.rb @@ -1,6 +1,7 @@ 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 3e26a9132..57d7bdfe3 100644 --- a/Casks/scrivener.rb +++ b/Casks/scrivener.rb @@ -3,4 +3,5 @@ class Scrivener < Cask 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 1169cfc77..720ef5caa 100644 --- a/Casks/seashore.rb +++ b/Casks/seashore.rb @@ -3,4 +3,5 @@ class Seashore < Cask 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 199c4e754..f382549d7 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 deabe4654..51fd5f15c 100644 --- a/Casks/shortcat.rb +++ b/Casks/shortcat.rb @@ -3,4 +3,5 @@ class Shortcat < Cask 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 dc58165f6..49d689a0d 100644 --- a/Casks/size-up.rb +++ b/Casks/size-up.rb @@ -3,4 +3,5 @@ class SizeUp < Cask 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 2433f53d7..481c8af4b 100644 --- a/Casks/skype.rb +++ b/Casks/skype.rb @@ -3,4 +3,5 @@ class Skype < Cask 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 69209a443..bfb3893f2 100644 --- a/Casks/slate.rb +++ b/Casks/slate.rb @@ -3,4 +3,5 @@ class Slate < Cask 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 582d29369..0b679c500 100644 --- a/Casks/sourcetree.rb +++ b/Casks/sourcetree.rb @@ -3,4 +3,5 @@ class Sourcetree < Cask 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 4db13f14b..cd9a62cbc 100644 --- a/Casks/sparrow.rb +++ b/Casks/sparrow.rb @@ -3,4 +3,5 @@ class Sparrow < Cask homepage 'http://www.sparrowmailapp.com/' version 'latest' content_length '12139098' + no_checksum end diff --git a/Casks/spectacle.rb b/Casks/spectacle.rb index 3432789ff..6bcddcf43 100644 --- a/Casks/spectacle.rb +++ b/Casks/spectacle.rb @@ -3,4 +3,5 @@ class Spectacle < Cask 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 7074d5d71..eb3a1af63 100644 --- a/Casks/spotify.rb +++ b/Casks/spotify.rb @@ -3,4 +3,5 @@ class Spotify < Cask homepage 'https://www.spotify.com' version 'stable' content_length '25870514' + no_checksum end diff --git a/Casks/steam.rb b/Casks/steam.rb index e840d5ef4..e530a0cf2 100644 --- a/Casks/steam.rb +++ b/Casks/steam.rb @@ -1,6 +1,7 @@ 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 90c8f989e..39a330b10 100644 --- a/Casks/sublime-text.rb +++ b/Casks/sublime-text.rb @@ -3,4 +3,5 @@ class SublimeText < Cask 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 a89a30b59..4885e7edc 100644 --- a/Casks/tagalicious.rb +++ b/Casks/tagalicious.rb @@ -1,6 +1,7 @@ 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 175dcd416..c596b661f 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 8ed3c6785..ebd104320 100644 --- a/Casks/textmate1.rb +++ b/Casks/textmate1.rb @@ -3,4 +3,5 @@ class Textmate1 < Cask 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 7557804bd..7be0407cb 100644 --- a/Casks/textmate2.rb +++ b/Casks/textmate2.rb @@ -3,4 +3,5 @@ class Textmate2 < Cask 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 bec3a7658..f04476901 100644 --- a/Casks/textwrangler.rb +++ b/Casks/textwrangler.rb @@ -1,6 +1,7 @@ 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 09f9cadf2..df32ae813 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 3dd3ce818..0e9f580d9 100644 --- a/Casks/thunderbird.rb +++ b/Casks/thunderbird.rb @@ -3,4 +3,5 @@ class Thunderbird < Cask 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 fb2b84a19..e51cdfeb2 100644 --- a/Casks/time-machine-editor.rb +++ b/Casks/time-machine-editor.rb @@ -3,4 +3,5 @@ class TimeMachineEditor < Cask 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 94758ecdd..5ba2f3c07 100644 --- a/Casks/transmission.rb +++ b/Casks/transmission.rb @@ -3,4 +3,5 @@ class Transmission < Cask 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 60571dbd2..7f9a15fe2 100644 --- a/Casks/transmit.rb +++ b/Casks/transmit.rb @@ -3,4 +3,5 @@ class Transmit < Cask 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 7fd629b99..0ddc05e10 100644 --- a/Casks/tunewiki.rb +++ b/Casks/tunewiki.rb @@ -3,4 +3,5 @@ class Tunewiki < Cask 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 671205574..744574b4d 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 d11aae81c..01e516693 100644 --- a/Casks/u-torrent.rb +++ b/Casks/u-torrent.rb @@ -3,4 +3,5 @@ class UTorrent < Cask 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 c51823e8e..236c76210 100644 --- a/Casks/virtualbox.rb +++ b/Casks/virtualbox.rb @@ -3,4 +3,5 @@ class Virtualbox < Cask 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 f9e891d5d..37c3fdcda 100644 --- a/Casks/vlc.rb +++ b/Casks/vlc.rb @@ -3,4 +3,5 @@ class Vlc < Cask 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 37e0dd1f3..10f09bd26 100644 --- a/Casks/woodhouse.rb +++ b/Casks/woodhouse.rb @@ -1,6 +1,7 @@ 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 8838f1f26..80a5e0620 100644 --- a/Casks/x-quartz.rb +++ b/Casks/x-quartz.rb @@ -3,4 +3,5 @@ class XQuartz < Cask 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 5df3f69ad..c95ad764c 100644 --- a/Casks/xbmc.rb +++ b/Casks/xbmc.rb @@ -3,5 +3,5 @@ class Xbmc < Cask 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 1a0f98769..1f8fa62e6 100644 --- a/Casks/xscope.rb +++ b/Casks/xscope.rb @@ -3,4 +3,5 @@ class Xscope < Cask homepage 'http://iconfactory.com/software/xscope' version '3.5.1' content_length '25577535' + sha1 'b355b3aab636ce535d67d8496d2211b4c2589272' end diff --git a/lib/cask/cli/install.rb b/lib/cask/cli/install.rb index 1bfad31b2..06e949fbf 100644 --- a/lib/cask/cli/install.rb +++ b/lib/cask/cli/install.rb @@ -6,6 +6,10 @@ class Cask::CLI::Install 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 d19ff7c78..9105d6c26 100644 --- a/lib/cask/dsl.rb +++ b/lib/cask/dsl.rb @@ -1,3 +1,5 @@ +require 'formula_support' + module Cask::DSL def self.included(base) base.extend(ClassMethods) @@ -11,6 +13,8 @@ module Cask::DSL def version; self.class.version; end + def sums; self.class.sums || []; end + module ClassMethods def content_length(content_length=nil) @content_length ||= content_length @@ -27,5 +31,26 @@ module Cask::DSL def version(version=nil) @version ||= version 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/installer.rb b/lib/cask/installer.rb index 6f5325a16..59deca2dc 100644 --- a/lib/cask/installer.rb +++ b/lib/cask/installer.rb @@ -1,10 +1,15 @@ +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)) + software_spec = SoftwareSpec.new(cask.url.to_s, cask.version) + downloader = CurlDownloadStrategy.new(cask.title, software_spec) downloaded_path = downloader.fetch + _check_sums(downloaded_path, cask.sums) unless cask.sums === 0 + FileUtils.mkdir_p cask.destination_path _with_extracted_mountpoints(downloaded_path) do |mountpoint| @@ -20,6 +25,18 @@ class Cask::Installer 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) File.open(path) do |dmg| diff --git a/test/cask/dsl_test.rb b/test/cask/dsl_test.rb index d39fd224b..d0ddf22d2 100644 --- a/test/cask/dsl_test.rb +++ b/test/cask/dsl_test.rb @@ -7,4 +7,19 @@ describe Cask::DSL do test_cask.homepage.must_equal 'http://example.com/' test_cask.version.must_equal '1.2.3' end + + it "lets you set checksum via sha1, sha256, and/or md5" do + ChecksumCask = Class.new(Cask) + ChecksumCask.class_eval do + md5 'imamd5' + sha1 'imasha1' + sha256 'imasha2' + end + instance = ChecksumCask.new + instance.sums.must_equal [ + Checksum.new(:md5, 'imamd5'), + Checksum.new(:sha1, 'imasha1'), + Checksum.new(:sha2, 'imasha2') + ] + end end diff --git a/test/cask/installer_test.rb b/test/cask/installer_test.rb index 91260929b..5ef361e86 100644 --- a/test/cask/installer_test.rb +++ b/test/cask/installer_test.rb @@ -27,6 +27,32 @@ describe Cask::Installer do application = dest_path/'Transmission.app' application.must_be :directory? end + + it "blows up on a bad checksum" do + bad_checksum = Cask.load('bad-checksum') + lambda { + shutup do + Cask::Installer.install(bad_checksum) + end + }.must_raise(ChecksumMismatchError) + end + + it "blows up on a missing checksum" do + missing_checksum = Cask.load('missing-checksum') + lambda { + shutup do + Cask::Installer.install(missing_checksum) + end + }.must_raise(ChecksumMissingError) + end + + it "installs fine if no_checksum is included in cask" do + no_checksum = Cask.load('no-checksum') + shutup do + Cask::Installer.install(no_checksum) + end + no_checksum.must_be :installed? + end end describe "uninstall" do diff --git a/test/support/Casks/bad-checksum.rb b/test/support/Casks/bad-checksum.rb new file mode 100644 index 000000000..2f6edda14 --- /dev/null +++ b/test/support/Casks/bad-checksum.rb @@ -0,0 +1,6 @@ +class BadChecksum < Cask + url TestHelper.local_binary('caffeine.zip') + homepage 'http://example.com/local-caffeine' + version '1.2.3' + sha1 'badbadbadbadbadbadbadbadbadbad' +end diff --git a/test/support/Casks/local-caffeine.rb b/test/support/Casks/local-caffeine.rb index eb59fa22e..45921ca81 100644 --- a/test/support/Casks/local-caffeine.rb +++ b/test/support/Casks/local-caffeine.rb @@ -2,5 +2,6 @@ class LocalCaffeine < Cask url TestHelper.local_binary('caffeine.zip') homepage 'http://example.com/local-caffeine' version '1.2.3' + sha1 'd2fbdad1619934313026fc831e6c6e3dd97ac030' end diff --git a/test/support/Casks/local-transmission.rb b/test/support/Casks/local-transmission.rb index 5b2726c18..b777171d8 100644 --- a/test/support/Casks/local-transmission.rb +++ b/test/support/Casks/local-transmission.rb @@ -2,4 +2,5 @@ class LocalTransmission < Cask url TestHelper.local_binary('transmission-2.61.dmg') homepage 'http://example.com/local-transmission' version '2.61' + sha1 'ac6cf624c3a4a3b1a692e95fa8de672b8be43391' end diff --git a/test/support/Casks/missing-checksum.rb b/test/support/Casks/missing-checksum.rb new file mode 100644 index 000000000..5e16d4876 --- /dev/null +++ b/test/support/Casks/missing-checksum.rb @@ -0,0 +1,5 @@ +class MissingChecksum < Cask + url TestHelper.local_binary('caffeine.zip') + homepage 'http://example.com/local-caffeine' + version '1.2.3' +end diff --git a/test/support/Casks/no-checksum.rb b/test/support/Casks/no-checksum.rb new file mode 100644 index 000000000..f169ae7ef --- /dev/null +++ b/test/support/Casks/no-checksum.rb @@ -0,0 +1,6 @@ +class NoChecksum < Cask + url TestHelper.local_binary('caffeine.zip') + homepage 'http://example.com/local-caffeine' + version '1.2.3' + no_checksum +end