/
haiti.rb
32 lines (27 loc) 路 1.04 KB
/
haiti.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class Haiti < Formula
desc "Hash type identifier"
homepage "https://noraj.github.io/haiti/#/"
url "https://github.com/noraj/haiti/archive/refs/tags/v2.1.0.tar.gz"
sha256 "ee1fee20c891db567abe753de25e7f1f1d4c7c59d92b6ce28f2e96606f247828"
license "MIT"
bottle do
rebuild 1
sha256 cellar: :any_skip_relocation, all: "9a79f8a170104a1ac3909ae0425458f8840bc7e3636a5b291959223585235c32"
end
# Requires Ruby >= 2.7
depends_on "ruby"
def install
ENV["GEM_HOME"] = libexec
system "bundle", "config", "set", "without", "development", "test"
system "bundle", "install"
system "gem", "build", "haiti.gemspec"
system "gem", "install", "haiti-hash-#{version}.gem"
bin.install Dir[libexec/"bin/haiti"]
bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV["GEM_HOME"])
end
test do
assert_match version.to_s, shell_output("#{bin}/haiti --version")
output = shell_output("#{bin}/haiti 12c87370d1b5472793e67682596b60efe2c6038d63d04134a1a88544509737b4")
assert_match "[JtR: raw-sha256]", output
end
end