2019-07-26 16:18:15 +00:00
|
|
|
class RipgrepAll < Formula
|
|
|
|
desc "Wrapper around ripgrep that adds multiple rich file types"
|
|
|
|
homepage "https://github.com/phiresky/ripgrep-all"
|
|
|
|
url "https://github.com/phiresky/ripgrep-all/archive/0.9.3.tar.gz"
|
|
|
|
sha256 "06259e7c1734a9246c2d113bf5e914f4d418e53c201efc697bfc041a713fbef3"
|
|
|
|
head "https://github.com/phiresky/ripgrep-all.git"
|
|
|
|
|
2019-09-23 15:44:35 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2019-11-03 02:10:59 +00:00
|
|
|
rebuild 1
|
|
|
|
sha256 "687b7bf509f088bdb9cd0058e6346d7aa66fdddd35fe9f1095085ffc59040b69" => :catalina
|
|
|
|
sha256 "8b0b3bb348853c51a99826d326d3bdd1ff52bab521fd6e37deaaaf0004ff77e5" => :mojave
|
|
|
|
sha256 "ef28f16cb59908b17a4e07a39ca3804173204f2ccf333262bab3988866d5c741" => :high_sierra
|
2019-09-23 15:44:35 +00:00
|
|
|
end
|
|
|
|
|
2019-07-26 16:18:15 +00:00
|
|
|
depends_on "rust" => :build
|
|
|
|
depends_on "ripgrep"
|
|
|
|
|
|
|
|
def install
|
2019-11-03 01:14:13 +00:00
|
|
|
system "cargo", "install", "--locked", "--root", prefix, "--path", "."
|
2019-07-26 16:18:15 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"file.txt").write("Hello World")
|
|
|
|
system "zip", "archive.zip", "file.txt"
|
|
|
|
|
|
|
|
output = shell_output("#{bin}/rga 'Hello World' #{testpath}")
|
|
|
|
assert_match "Hello World", output
|
|
|
|
end
|
|
|
|
end
|