aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorNathan Sutton2014-03-14 18:20:20 -0500
committerMike McQuaid2014-03-17 10:28:25 +0000
commitbadce0eec512d35d2124a501de0170e1855b8c72 (patch)
tree11453ad8b1012a4d608f223464e9dc6bdd0869ba /Library
parent27944d8b53c33e7da69b3c0ee0365ad19ef49142 (diff)
downloadhomebrew-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.rb20
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