homebrew-core/Formula/pastel.rb

25 lines
753 B
Ruby
Raw Normal View History

class Pastel < Formula
desc "Command-line tool to generate, analyze, convert and manipulate colors"
homepage "https://github.com/sharkdp/pastel"
url "https://github.com/sharkdp/pastel/archive/v0.5.3.tar.gz"
sha256 "0850e37b92b8d2f5a396d5b9114a21a64dce5c6cce736039151c800f35abaa1e"
depends_on "rust" => :build
def install
ENV["SHELL_COMPLETIONS_DIR"] = buildpath/"completions"
system "cargo", "install", "--root", prefix, "--path", "."
bash_completion.install "completions/pastel.bash"
zsh_completion.install "completions/_pastel"
fish_completion.install "completions/pastel.fish"
end
test do
output = shell_output("#{bin}/pastel format hex rebeccapurple").strip
assert_equal "#663399", output
end
end