homebrew-core/Formula/diff-so-fancy.rb

35 lines
1.0 KiB
Ruby

class DiffSoFancy < Formula
desc "Good-lookin' diffs with diff-highlight and more"
homepage "https://github.com/so-fancy/diff-so-fancy"
url "https://github.com/so-fancy/diff-so-fancy/archive/v1.4.3.tar.gz"
sha256 "2b88a1d1cc3bd63a0120c668125019aa5b65ad5c235c49d81431c5d89a86b137"
license "MIT"
head "https://github.com/so-fancy/diff-so-fancy.git", branch: "next"
bottle do
sha256 cellar: :any_skip_relocation, all: "f92baad816aa7902f5fc7e4166f6234b37f8cf800d58546b79a070d5134e857c"
end
def install
libexec.install "diff-so-fancy", "lib"
bin.install_symlink libexec/"diff-so-fancy"
end
test do
diff = <<~EOS
diff --git a/hello.c b/hello.c
index 8c15c31..0a9c78f 100644
--- a/hello.c
+++ b/hello.c
@@ -1,5 +1,5 @@
#include <stdio.h>
int main(int argc, char **argv) {
- printf("Hello, world!\n");
+ printf("Hello, Homebrew!\n");
}
EOS
assert_match "modified: hello.c", pipe_output(bin/"diff-so-fancy", diff, 0)
end
end