2014-03-04 00:55:50 +00:00
|
|
|
class Ry < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Ruby virtual env tool"
|
2014-03-04 00:55:50 +00:00
|
|
|
homepage "https://github.com/jayferd/ry"
|
|
|
|
url "https://github.com/jayferd/ry/archive/v0.5.2.tar.gz"
|
2015-08-03 12:55:31 +00:00
|
|
|
sha256 "b53b51569dfa31233654b282d091b76af9f6b8af266e889b832bb374beeb1f59"
|
2014-03-04 00:55:50 +00:00
|
|
|
|
|
|
|
head "https://github.com/jayferd/ry.git"
|
|
|
|
|
2014-04-01 18:43:07 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "68b813c169fc16024ac73774bba8ab074ec966d3" => :mavericks
|
|
|
|
sha1 "ffa8d32fade2e880391d4229e09c6b7bfb394910" => :mountain_lion
|
|
|
|
sha1 "370606fd9714e3f0eda2748f52fb404197c51d78" => :lion
|
|
|
|
end
|
|
|
|
|
2014-03-04 00:55:50 +00:00
|
|
|
depends_on "ruby-build" => :recommended
|
|
|
|
depends_on "bash-completion" => :recommended
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["PREFIX"] = prefix
|
|
|
|
ENV["BASH_COMPLETIONS_DIR"] = etc/"bash_completion.d"
|
|
|
|
ENV["ZSH_COMPLETIONS_DIR"] = share/"zsh/site-functions"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Please add to your profile:
|
|
|
|
which ry &>/dev/null && eval "$(ry setup)"
|
2015-08-18 20:29:26 +00:00
|
|
|
|
|
|
|
If you want your Rubies to persist across updates you
|
|
|
|
should set the `RY_RUBIES` variable in your profile, i.e.
|
|
|
|
export RY_RUBIES="#{HOMEBREW_PREFIX}/var/ry/rubies"
|
|
|
|
EOS
|
2014-03-04 00:55:50 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-08-18 20:29:26 +00:00
|
|
|
ENV["RY_RUBIES"] = testpath/"rubies"
|
|
|
|
|
2014-03-04 00:55:50 +00:00
|
|
|
system bin/"ry", "ls"
|
2015-08-18 20:29:26 +00:00
|
|
|
assert File.exist?(testpath/"rubies")
|
2014-03-04 00:55:50 +00:00
|
|
|
end
|
|
|
|
end
|