homebrew-core/Formula/nodebrew.rb
Alex Dunn fa63f33961 nodebrew 0.8.1
Closes Homebrew/homebrew#39297.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-05-03 13:22:37 +08:00

26 lines
822 B
Ruby

class Nodebrew < Formula
homepage "https://github.com/hokaccha/nodebrew"
url "https://github.com/hokaccha/nodebrew/archive/v0.8.1.tar.gz"
sha256 "c976a879954dfb5dd657f1e93934ec182ffe4aa4e91ee2be0f7ece91cd25af6f"
head "https://github.com/hokaccha/nodebrew.git"
def install
bin.install "nodebrew"
system "#{bin}/nodebrew", "setup_dirs"
bash_completion.install "completions/bash/nodebrew-completion" => "nodebrew"
zsh_completion.install "completions/zsh/_nodebrew"
end
def caveats; <<-EOS.undent
Add path:
export PATH=$HOME/.nodebrew/current/bin:$PATH
To use Homebrew's directories rather than ~/.nodebrew add to your profile:
export NODEBREW_ROOT=#{var}/nodebrew
EOS
end
test do
assert shell_output("#{bin}/nodebrew ls-remote").include?("v0.10.0")
end
end