caskroom/homebrew-cask — pull request #4910 by vitorgalvao (2014-06-15 16:36:27+00:00)
Title: Simplified update process for casks that have a version number in link stanza

Basic change went as follows:

+ Bring `version` to the top, so it can be reused throughout.
+ Bring `sha256` to the top, directly under `version`.
+ Put a blank like between the previous two and the rest of the *cask*.[^1]
+ Change rest of the cask accordingly to programatically reuse the version number.

This change was currently applied only to *casks* that have a version number in the `link` stanza, but it could be useful to apply it to other ones, in the future.

[Sloth](https://github.com/caskroom/homebrew-cask/blob/master/Casks/sloth.rb), [platypus](https://github.com/caskroom/homebrew-cask/blob/master/Casks/platypus.rb), and [simpletag](https://github.com/caskroom/homebrew-cask/blob/master/Casks/simpletag.rb) are special cases that could benefit from more flexibility in `link`, in the future, since they point to an always up-to-date download url[^2], but have a version number in the directory that contains the app.

[Sts](https://github.com/caskroom/homebrew-cask/blob/master/Casks/sts.rb) was left untouched for now, since it has a few extra numbers in the download url that look like they might change when updating, so they need to be checked out further.

[^1]: The logic of this being grouping the only parts that will need to be changed to increment versions in the future apart from the stanzas that should not need to be touched anymore. The exception was [golly](https://github.com/vitorgalvao/homebrew-cask/blob/master/Casks/golly.rb), since it needs `sha256` declared in two different locations.

[^2]: Simpletag is being changed in this update to use a versioned one.