hub: use system rake to avoid RVM's Bundler integration

Fixes defunkt/hub#205

Closes Homebrew/homebrew#13238.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Mislav Marohnić 2012-07-06 10:37:57 +02:00 committed by Adam Vandenberg
parent aec49d4eb9
commit 0e633749da

View file

@ -7,11 +7,22 @@ class Hub < Formula
md5 'd3ff9bcf489466a408020867b77f1d4d'
def install
system "rake", "install", "prefix=#{prefix}"
system rake_bin, "install", "prefix=#{prefix}"
(prefix+'etc/bash_completion.d').install 'etc/hub.bash_completion.sh'
(share+'zsh/site-functions').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'
end
end
def caveats; <<-EOS.undent
Bash completion has been installed to:
#{etc}/bash_completion.d