2016-01-15 13:56:13 +00:00
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Jump < Formula
|
|
|
|
desc "Quick and fuzzy directory jumper."
|
|
|
|
homepage "https://github.com/gsamokovarov/jump"
|
2016-02-06 07:26:28 +00:00
|
|
|
url "https://codeload.github.com/gsamokovarov/jump/tar.gz/v0.6.1"
|
|
|
|
sha256 "773ae036c6759d304438476c8301ed4f02270535bc2d16d860f48cd7443f4350"
|
2016-01-15 13:56:13 +00:00
|
|
|
head "https://github.com/gsamokovarov/jump.git"
|
|
|
|
|
2016-01-17 19:07:07 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2016-01-27 17:42:27 +00:00
|
|
|
sha256 "ce9c1818e5baa84d71596caab648b26ee03d7833dc3d727ef659a60980f2fc8b" => :el_capitan
|
|
|
|
sha256 "85976463a23b8434e787aa5ed796b6b9d114ec7f07af619ea02f0dcd8520c62a" => :yosemite
|
|
|
|
sha256 "ef223bce4d90130b89ec1361301b2abfe6bcbe599dae4462f54c555d0acab174" => :mavericks
|
2016-01-17 19:07:07 +00:00
|
|
|
end
|
|
|
|
|
2016-01-15 13:56:13 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
(buildpath/"src/github.com/gsamokovarov").mkpath
|
|
|
|
ln_s buildpath, buildpath/"src/github.com/gsamokovarov/jump"
|
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
|
|
|
system "go", "build", "-o", "#{bin}/jump"
|
|
|
|
man1.install "man/jump.1"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test_dir").mkpath
|
|
|
|
ENV["JUMP_HOME"] = testpath.to_s
|
|
|
|
system "#{bin}/jump", "chdir", "#{testpath}/test_dir"
|
|
|
|
|
|
|
|
assert_equal (testpath/"test_dir").to_s, shell_output("#{bin}/jump cd tdir").chomp
|
|
|
|
end
|
|
|
|
end
|