homebrew-core/Formula/vnu.rb
2018-07-26 07:56:40 +02:00

30 lines
721 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/18.7.23/vnu.jar_18.7.23.zip"
sha256 "5668cb449cff64555ff0516f8e4db0c73da4790a47ef4af3f09655d6b0010134"
version_scheme 1
bottle :unneeded
depends_on :java => "1.8+"
def install
libexec.install "vnu.jar"
bin.write_jar_script libexec/"vnu.jar", "vnu"
end
test do
(testpath/"index.html").write <<~EOS
<!DOCTYPE html>
<html>
<head>
<title>hi</title>
</head>
<body>
</body>
</html>
EOS
system bin/"vnu", testpath/"index.html"
end
end