blob: 9ceca3e8cf026f8862857c98524d2305b549262d (
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
26
27
28
|
require "formula"
class Nodebrew < Formula
homepage "https://github.com/hokaccha/nodebrew"
url "https://github.com/hokaccha/nodebrew/archive/v0.8.0.tar.gz"
sha1 "5f3ec97e267fbccffcd3732a0a2436daa3a09d48"
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
|