2019-09-18 13:51:53 +00:00
|
|
|
class Diffr < Formula
|
|
|
|
desc "LCS based diff highlighting tool to ease code review from your terminal"
|
|
|
|
homepage "https://github.com/mookid/diffr"
|
2019-12-08 18:28:52 +00:00
|
|
|
url "https://github.com/mookid/diffr/archive/v0.1.3.tar.gz"
|
|
|
|
sha256 "7fd8c078a1b94140624a5a021eef059a916f79cdf21cfba7489f83be8fadfaa2"
|
2019-09-18 13:51:53 +00:00
|
|
|
|
2019-10-04 03:35:13 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2019-12-09 00:29:11 +00:00
|
|
|
sha256 "7e01bf74ad7621aabeb9b3aaeb24d8482bc50919537378c43484f8cc86a80ffb" => :catalina
|
|
|
|
sha256 "3f491387e259786609728ae103154e3d04ba31756bd142f8a088b17530343a23" => :mojave
|
|
|
|
sha256 "4a9dc80b940b8f312b116509cbb79810e7ea829187669b4cc2e13e26d2cc98c1" => :high_sierra
|
2019-10-04 03:35:13 +00:00
|
|
|
end
|
|
|
|
|
2019-09-18 13:51:53 +00:00
|
|
|
depends_on "rust" => :build
|
|
|
|
depends_on "diffutils" => :test
|
|
|
|
|
|
|
|
def install
|
2019-11-03 01:57:51 +00:00
|
|
|
system "cargo", "install", "--locked", "--root", prefix, "--path", "."
|
2019-09-18 13:51:53 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"a").write "foo"
|
|
|
|
(testpath/"b").write "foo"
|
|
|
|
_output, status =
|
|
|
|
Open3.capture2("#{Formula["diffutils"].bin}/diff -u a b | #{bin}/diffr")
|
|
|
|
status.exitstatus.zero?
|
|
|
|
end
|
|
|
|
end
|