blob: adbbdbc7a1f8292148b282fca1ac321ea49ba416 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
require "formula"
class Gvp < Formula
homepage "https://github.com/pote/gvp"
url "https://github.com/pote/gvp/archive/v0.0.3.tar.gz"
sha1 "46826b8f3b83ba52d629549a5d486525cf633d6e"
bottle do
cellar :any
sha1 "455e8325565c0f6ebedfba821081b2e15b4446c1" => :mavericks
sha1 "ccf547cf67919c8d47e8698ae3464331cc082efb" => :mountain_lion
sha1 "98d111ddf331bcfe7ba61675283e01f7a43cfc61" => :lion
end
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
|