1d13102b6c
set bottle unneeded
23 lines
829 B
Ruby
23 lines
829 B
Ruby
class Nodeenv < Formula
|
|
desc "Node.js virtual environment builder"
|
|
homepage "https://github.com/ekalinin/nodeenv"
|
|
url "https://github.com/ekalinin/nodeenv/archive/1.1.4.tar.gz"
|
|
sha256 "8f844c64bc0d8e14cb104a83d0f5b66b7cfeb413b4bae590318103f6b8126327"
|
|
|
|
bottle :unneeded
|
|
|
|
def install
|
|
bin.install "nodeenv.py" => "nodeenv"
|
|
end
|
|
|
|
test do
|
|
system bin/"nodeenv", "--node=0.10.40", "--prebuilt", "env-0.10.40-prebuilt"
|
|
# Dropping into the virtualenv itself requires sourcing activate which
|
|
# isn't easy to deal with. This ensures current Node installed & functional.
|
|
ENV.prepend_path "PATH", testpath/"env-0.10.40-prebuilt/bin"
|
|
|
|
(testpath/"test.js").write "console.log('hello');"
|
|
assert_match "hello", shell_output("node test.js")
|
|
assert_match "v0.10.40", shell_output("node -v")
|
|
end
|
|
end
|