From 12efffc75942e755a76cbfb169d3fd2c32fbcd2d Mon Sep 17 00:00:00 2001 From: Erik Gaal Date: Sun, 27 Oct 2019 23:38:19 +0100 Subject: [PATCH] onefetch 1.6.5 (new formula) --- Formula/onefetch.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Formula/onefetch.rb diff --git a/Formula/onefetch.rb b/Formula/onefetch.rb new file mode 100644 index 0000000000000..0215e4c13737a --- /dev/null +++ b/Formula/onefetch.rb @@ -0,0 +1,19 @@ +class Onefetch < Formula + desc "Git repository summary on your terminal" + homepage "https://github.com/o2sh/onefetch" + url "https://github.com/o2sh/onefetch/archive/v1.6.5.tar.gz" + sha256 "50f069db2fa713024a19bf708add7812f3420b0c107eb68cd9907d76e375a06d" + + depends_on "rust" => :build + + def install + system "cargo", "install", "--locked", "--root", prefix, "--path", "." + end + + test do + system "#{bin}/onefetch", "--help" + assert_match "onefetch " + version.to_s, shell_output("#{bin}/onefetch -V").chomp + system "git init && echo \"puts 'Hello, world'\" > main.rb && git add main.rb && git commit -m \"First commit\"" + assert_match /Language:.*Ruby/, shell_output("#{bin}/onefetch").chomp + end +end