2012-02-10 16:42:42 +00:00
|
|
|
class CssCrush < Formula
|
2015-08-01 09:35:45 +00:00
|
|
|
desc "Extensible PHP based CSS preprocessor"
|
2014-07-21 02:31:36 +00:00
|
|
|
homepage "http://the-echoplex.net/csscrush"
|
2015-08-13 05:55:43 +00:00
|
|
|
url "https://github.com/peteboere/css-crush/archive/v2.4.0.tar.gz"
|
|
|
|
sha256 "75c8d868adf5a537a47fedff28c53fe4e6764264239573a858a0048036280d6c"
|
|
|
|
head "https://github.com/peteboere/css-crush.git"
|
2012-02-10 16:42:42 +00:00
|
|
|
|
2015-10-22 13:15:37 +00:00
|
|
|
bottle :unneeded
|
|
|
|
|
2012-02-10 16:42:42 +00:00
|
|
|
def install
|
2014-07-21 02:31:36 +00:00
|
|
|
libexec.install Dir["*"]
|
|
|
|
(bin+"csscrush").write <<-EOS.undent
|
2012-02-10 16:42:42 +00:00
|
|
|
#!/bin/sh
|
|
|
|
php "#{libexec}/cli.php" "$@"
|
|
|
|
EOS
|
|
|
|
end
|
2014-02-08 18:59:58 +00:00
|
|
|
|
|
|
|
test do
|
2015-08-13 05:55:43 +00:00
|
|
|
(testpath/"test.crush").write <<-EOS.undent
|
2014-02-08 18:59:58 +00:00
|
|
|
@define foo #123456;
|
|
|
|
p { color: $(foo); }
|
|
|
|
EOS
|
|
|
|
|
2015-08-13 05:55:43 +00:00
|
|
|
assert_equal "p{color:#123456}", shell_output("#{bin}/csscrush #{testpath}/test.crush").strip
|
2014-02-08 18:59:58 +00:00
|
|
|
end
|
2012-02-10 16:42:42 +00:00
|
|
|
end
|