homebrew-core/Formula/pastel.rb
Liam Dawson 4b598c2def pastel 0.5.3 (new formula)
Add the pastel command-line utility, for working with colors

Closes #43459.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
2019-09-16 11:22:09 +02:00

24 lines
753 B
Ruby

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