homebrew-core/Formula/vnu.rb

29 lines
700 B
Ruby

class Vnu < Formula
desc "Nu Markup Checker: command-line and server HTML validator"
homepage "https://validator.github.io/validator/"
url "https://github.com/validator/validator/releases/download/16.6.29/vnu.jar_16.6.29.zip"
version "20160629"
sha256 "f852d60ff976b8f388c8c10a1aa69b18562053297abcacae127f595879d18114"
bottle :unneeded
def install
libexec.install "vnu.jar"
bin.write_jar_script libexec/"vnu.jar", "vnu"
end
test do
(testpath/"index.html").write <<-EOS.undent
<!DOCTYPE html>
<html>
<head>
<title>hi</title>
</head>
<body>
</body>
</html>
EOS
system bin/"vnu", testpath/"index.html"
end
end