2014-03-14 23:20:20 +00:00
require " formula "
class Gvp < Formula
homepage " https://github.com/pote/gvp "
2014-06-02 15:03:43 +00:00
url " https://github.com/pote/gvp/archive/0.0.4.tar.gz "
sha1 " 39676c4dd1df4d099cf938122733fb5e2e24c0a0 "
2014-03-14 23:20:20 +00:00
2014-03-14 23:33:04 +00:00
bottle do
cellar :any
2014-04-19 15:02:36 +00:00
sha1 " 0bb06a3261651d7c83fc286c41e5ab8820c3386f " = > :mavericks
sha1 " 904d0191574425f9212f93d1c8c1853ea4644af3 " = > :mountain_lion
sha1 " fe9f9330db468ecac8472053290d1447d3f7c665 " = > :lion
2014-03-14 23:33:04 +00:00
end
2014-03-14 23:20:20 +00:00
def install
system " ./configure " , " --prefix= #{ prefix } "
system " make " , " install "
end
test do
2014-05-21 20:45:29 +00:00
assert Kernel . system ( " #{ bin } /gvp init " ) , " `gvp init` exited with a non-zero status "
2014-03-14 23:20:20 +00:00
assert File . directory? ( " .godeps " ) , " `gvp init` did not create the .godeps directory "
2014-05-21 20:45:29 +00:00
assert_equal ` #{ bin } /gvp in 'echo $GOPATH' | grep -v '>> Local GOPATH set.' ` . chomp , " #{ testpath } /.godeps: #{ testpath } " , " `gvp in` did not change the GOPATH "
2014-06-02 15:03:43 +00:00
assert_equal ` #{ bin } /gvp in 'echo $GOBIN' | grep -v '>> Local GOPATH set.' ` . chomp , " #{ testpath } /.godeps/bin " , " `gvp in` did not change the GOBIN "
2014-05-21 20:45:29 +00:00
assert_equal ` #{ bin } /gvp in 'echo $PATH' | grep -v '>> Local GOPATH set.' ` . chomp , " #{ testpath } /.godeps/bin: #{ ENV [ " PATH " ] } " , " `gvp in` did not change the PATH "
2014-03-14 23:20:20 +00:00
end
end