2015-09-23 23:00:34 +00:00
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Sift < Formula
|
|
|
|
desc "Fast and powerful open source alternative to grep"
|
|
|
|
homepage "https://sift-tool.org"
|
2015-12-02 13:25:36 +00:00
|
|
|
url "https://github.com/svent/sift/archive/v0.5.0.tar.gz"
|
|
|
|
sha256 "efa1877761e6c86a5ef04548923f9f99bc7a8bacd54fe8926c3b74900bf72e20"
|
2015-09-23 23:00:34 +00:00
|
|
|
|
2015-10-16 06:16:45 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2015-12-02 14:15:19 +00:00
|
|
|
sha256 "0d670eb492a2952e8f60543e15a4b455e4f40172264c37c1debd6efa1e32eeae" => :el_capitan
|
|
|
|
sha256 "574e63c3e1c6e305b0eb16caa1687c714f7adec49c03f5674a6f2bec473df545" => :yosemite
|
|
|
|
sha256 "35635bc5fc7563a59200c95d003bd61505ae740b623ba9102868fcc427a3d47c" => :mavericks
|
2015-10-16 06:16:45 +00:00
|
|
|
end
|
|
|
|
|
2015-09-23 23:00:34 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
go_resource "github.com/svent/go-flags" do
|
|
|
|
url "https://github.com/svent/go-flags.git", :revision => "4bcbad344f0318adaf7aabc16929701459009aa3"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/svent/go-nbreader" do
|
|
|
|
url "https://github.com/svent/go-nbreader.git", :revision => "7cef48da76dca6a496faa7fe63e39ed665cbd219"
|
|
|
|
end
|
|
|
|
|
2015-12-02 13:25:36 +00:00
|
|
|
go_resource "golang.org/x/crypto" do
|
|
|
|
url "https://go.googlesource.com/crypto.git", :revision => "7b85b097bf7527677d54d3220065e966a0e3b613"
|
|
|
|
end
|
|
|
|
|
2015-09-23 23:00:34 +00:00
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
|
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
|
|
|
system "go", "build", "-o", bin/"sift"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.txt").write "where is foo"
|
|
|
|
assert_match(/where is foo/, shell_output("#{bin/"sift"} foo #{testpath}"))
|
|
|
|
end
|
|
|
|
end
|