homebrew-core/Formula/css-crush.rb
Baptiste Fontaine 8d4948bbbb css-crush 2.3.0
Closes Homebrew/homebrew#36962.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-02-19 14:17:53 +00:00

23 lines
570 B
Ruby

class CssCrush < Formula
homepage "http://the-echoplex.net/csscrush"
url "https://github.com/peteboere/css-crush/archive/v2.3.0.tar.gz"
sha1 "1141311ad12e4472d5ec2fddcefec42d98655725"
def install
libexec.install Dir["*"]
(bin+"csscrush").write <<-EOS.undent
#!/bin/sh
php "#{libexec}/cli.php" "$@"
EOS
end
test do
path = testpath/"test.crush"
path.write <<-EOS.undent
@define foo #123456;
p { color: $(foo); }
EOS
assert_equal "p{color:#123456}", shell_output("#{bin}/csscrush #{path}").strip
end
end