blob: cc84a7e85b7e0f25e5159f84f56a02e8ae0ae0b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  | 
class Rbenv < Formula
  homepage "https://github.com/sstephenson/rbenv"
  url "https://github.com/sstephenson/rbenv/archive/v0.4.0.tar.gz"
  sha1 "825ceec55805b8bb80a6d6003fd3cef824d7ff14"
  head "https://github.com/sstephenson/rbenv.git"
  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
  |