A sha256 hash of the previous download is stored and compared with
new downloads before updating :latest casks. This prevents unnecessary
reinstalls when the cask hasn't been updated.
Move download path to cask from installer to prevent unnecessary
redownloads of casks.
- For some of these I changed `context` to `describe` as it fit better
rather than contriving a "when", "with" or "without", or massively
restructuring the tests.
Use 124 max line length everywhere. Also, reduce tap max line length to
189 as Homebrew/homebrew-core has that as a maximum now. In future
Homebrew/homebrew-core will also be reduced to 124 maximum line length.
`brew cask list` supports the `--full-name` flag which will include the tap
name for casks not part of the core caskroom/cask tap. For example, if
cask "foo-beta" is installed from the caskroom/versions cask, `brew cask
list --full-name` will report the name as "caskroom/versions/foo-beta".
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.