2014-03-14 23:20:20 +00:00
require " formula "
class Gvp < Formula
homepage " https://github.com/pote/gvp "
2014-07-20 18:50:05 +00:00
url " https://github.com/pote/gvp/archive/v0.1.0.tar.gz "
sha1 " c48bae47f8589e9bfd8addc94a9073be4c004305 "
2014-03-14 23:20:20 +00:00
2014-03-14 23:33:04 +00:00
bottle do
cellar :any
2014-07-20 19:14:47 +00:00
sha1 " 06092cbaeda1a2e565868dd27eb8d71ce62d0477 " = > :mavericks
sha1 " 79eadbc9c59afd18e6406773892269519ecbfc6e " = > :mountain_lion
sha1 " ae36dae26ce09281e6bf173f53eca9a7da56d97b " = > :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