2014-11-14 03:52:41 +00:00
|
|
|
class Vnu < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Nu Markup Checker: command-line and server HTML validator"
|
2014-11-14 03:52:41 +00:00
|
|
|
homepage "https://validator.github.io/validator/"
|
2015-04-12 17:29:04 +00:00
|
|
|
url "https://github.com/validator/validator/releases/download/15.4.12/vnu.jar_15.4.12.zip"
|
|
|
|
sha256 "2ae32a816aea9a7f60f359bdace9324d1a5532da61b8fb494eefdddc85148ba9"
|
|
|
|
version "20150412"
|
2014-11-14 03:52:41 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
libexec.install "vnu.jar"
|
|
|
|
bin.write_jar_script libexec/"vnu.jar", "vnu"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-03-28 05:12:59 +00:00
|
|
|
(testpath/"index.html").write <<-EOS.undent
|
2014-11-14 03:52:41 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>hi</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
EOS
|
2015-03-28 05:12:59 +00:00
|
|
|
system bin/"vnu", testpath/"index.html"
|
2014-11-14 03:52:41 +00:00
|
|
|
end
|
|
|
|
end
|