diff options
| author | Nathan Sutton | 2014-03-14 18:20:20 -0500 |
|---|---|---|
| committer | Mike McQuaid | 2014-03-17 10:28:25 +0000 |
| commit | badce0eec512d35d2124a501de0170e1855b8c72 (patch) | |
| tree | 11453ad8b1012a4d608f223464e9dc6bdd0869ba /Library | |
| parent | 27944d8b53c33e7da69b3c0ee0365ad19ef49142 (diff) | |
| download | homebrew-badce0eec512d35d2124a501de0170e1855b8c72.tar.bz2 | |
gvp 0.0.2 (new formula)
The tool modifies your GOPATH to point to a local .godeps/ directory so
that you can keep the dependencies of your project isolated there, it
also modifies GOBIN and PATH to include the new GOPATH/bin directory.
gvp is a companion tool to gpm, the Go Package Manager.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/gvp.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Formula/gvp.rb b/Library/Formula/gvp.rb new file mode 100644 index 000000000..9ef938cf5 --- /dev/null +++ b/Library/Formula/gvp.rb @@ -0,0 +1,20 @@ +require "formula" + +class Gvp < Formula + homepage "https://github.com/pote/gvp" + url "https://github.com/pote/gvp/archive/v0.0.2.tar.gz" + sha1 "28cbdea4c579ae4119bfd0fa451f03cb0572b43b" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end + + test do + assert Kernel.system("gvp init"), "`gvp init` exited with a non-zero status" + assert File.directory?(".godeps"), "`gvp init` did not create the .godeps directory" + assert_equal `gvp in 'echo $GOPATH' | grep -v '>> Local GOPATH set.'`.chomp, "#{testpath/".godeps"}:#{testpath}", "`gvp in` did not change the GOPATH" + assert_equal `gvp in 'echo $GOBIN' | grep -v '>> Local GOPATH set.'`.chomp, "#{testpath/".godeps/bin"}:#{ENV["GOBIN"]}", "`gvp in` did not change the GOBIN" + assert_equal `gvp in 'echo $PATH' | grep -v '>> Local GOPATH set.'`.chomp, "#{testpath/".godeps/bin"}:#{ENV["PATH"]}", "`gvp in` did not change the PATH" + end +end |
