29 lines
826 B
Ruby
29 lines
826 B
Ruby
class Rbenv < Formula
|
|
desc "Ruby environment tool"
|
|
homepage "https://github.com/rbenv/rbenv"
|
|
url "https://github.com/rbenv/rbenv/archive/v0.4.0.tar.gz"
|
|
sha256 "d40fe637cc799b828498fc5793548fab70d9e2431efc6a3d3f4a671d670fa9ff"
|
|
head "https://github.com/rbenv/rbenv.git"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "ruby-build" => :recommended
|
|
|
|
def install
|
|
inreplace "libexec/rbenv", "/usr/local", HOMEBREW_PREFIX
|
|
prefix.install Dir["*"]
|
|
end
|
|
|
|
def caveats; <<-EOS.undent
|
|
To use Homebrew's directories rather than ~/.rbenv add to your profile:
|
|
export RBENV_ROOT=#{var}/rbenv
|
|
|
|
To enable shims and autocompletion add to your profile:
|
|
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
shell_output("eval \"$(#{bin}/rbenv init -)\" && rbenv versions")
|
|
end
|
|
end
|