mathie/chef-homebrew — pull request #11 by bluepojo (2012-04-02 20:12:34+00:00)
Title: Add support for selecting a version with homebrew

This uses `brew versions` to find the commit hash that contains the desired version of the package being installed. It also detects if the version is already installed, but unlinked and will link the correct version.

Further, this replaces #current_installed_version with #current_linked_version. Previously #current_installed_version did not handle packages with multiple installed versions correctly and would return only the first reported version which may not be linked. #current_linked_version reads the link homebrew creates to make sure it returns the active version.