caskroom/homebrew-cask — pull request #4865 by rolandwalker (2014-06-13 17:19:10+00:00)
Title: Allow all Casks to use `uninstall` stanzas

Previously, `uninstall` was silently ignored unless there was an `install` or
`caskroom_only` stanza present.

This works by promoting `uninstall` to a full, independent artifact. `uninstall` was
previously integrated into `Cask::Artifact::Pkg`.

This PR also contains considerable refactoring. Notably, `install` and `uninstall`
methods on all artifacts were changed to `install_phase` and `uninstall_phase`
to help distinguish these actions from the new `uninstall` artifact. (Both the `install_phase`
and `uninstall_phase` methods are invoked on every artifact type present in a
Cask, though `install_phase` on the `uninstall` artifact is a no-op).

`install`-based Casks (ie `pkg`-based Casks) must still use an explicit `uninstall`
stanza as before. Implicit cleanup of `link` stanza symlinks during uninstall is
unchanged. The only functional difference is that a `link`-type Cask can do
something like:
```ruby
uninstall :quit => 'com.bundle.id'`
```