From 2ef43eddf84ca1b758dedfc65c99c23249a8a879 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sun, 27 Jan 2013 22:38:17 +0000 Subject: hub: add test and use new rake function. --- Library/Formula/hub.rb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/hub.rb b/Library/Formula/hub.rb index 452a55c7f..e2dfaae62 100644 --- a/Library/Formula/hub.rb +++ b/Library/Formula/hub.rb @@ -4,23 +4,17 @@ class Hub < Formula homepage 'http://defunkt.io/hub/' url 'https://github.com/defunkt/hub/tarball/v1.10.4' sha1 'b43f69f20563cb779d77a6beaf773bad8c49ad4c' - head 'https://github.com/defunkt/hub.git' def install - system "rake", "install", "prefix=#{prefix}" + rake "install", "prefix=#{prefix}" bash_completion.install 'etc/hub.bash_completion.sh' zsh_completion.install 'etc/hub.zsh_completion' => '_hub' end - def rake_bin - require 'rbconfig' - ruby_rake = File.join RbConfig::CONFIG['bindir'], 'rake' - - if File.exist? ruby_rake - ruby_rake - else - '/usr/bin/rake' + test do + HOMEBREW_REPOSITORY.cd do + `#{bin}/hub ls-files -- bin`.chomp == 'bin/brew' end end end -- cgit v1.2.3