class Nodenv < Formula desc "Manage multiple NodeJS versions" homepage "https://github.com/nodenv/nodenv" url "https://github.com/nodenv/nodenv/archive/v1.1.0.tar.gz" sha256 "1ca6a50d1f42356f0ff569c8cc2a74fe38ff500272d8d4973dc2d165fe569d09" head "https://github.com/nodenv/nodenv.git" bottle :unneeded depends_on "node-build" => :recommended def install inreplace "libexec/nodenv", "/usr/local", HOMEBREW_PREFIX prefix.install "bin", "libexec", "completions" end test do shell_output("eval \"$(#{bin}/nodenv init -)\" && nodenv --version") end end