Skip to content

Instantly share code, notes, and snippets.

@zbentley
Created February 19, 2022 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zbentley/d9e0edd09ad8ef1fce1ebb883789c5f3 to your computer and use it in GitHub Desktop.
Save zbentley/d9e0edd09ad8ef1fce1ebb883789c5f3 to your computer and use it in GitHub Desktop.
class Bkt < Formula
desc "Utility for caching the resilts of shell commands"
homepage "https://www.bkt.rs"
url "https://crates.io/api/v1/crates/bkt"
sha256 "e6acab9ae6a617fe471dceed9f69064e1f0cb3a8eb93d82e2087faeab4d48ee8"
license "MIT"
depends_on "rust" => :build
uses_from_macos "zlib"
def install
system "cargo", "install", *std_cargo_args
end
test do
# Make sure date output is cached
output1 = shell_output("#{bin}/bkt -- date +%s.%N")
sleep(1)
assert_equal output1, shell_output("#{bin}/bkt -- date +%s.%N")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment