homebrew-core/Formula/vnu.rb

39 lines
909 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/20.6.30/vnu.jar_20.6.30.zip"
sha256 "f6dc1464229756f582bdd6c083df11ec13e0d7389dd50b56e63133aa8b0dd200"
license "MIT"
version_scheme 1
livecheck do
url :stable
strategy :github_latest
end
bottle do
sha256 cellar: :any_skip_relocation, all: "e1f4424cec7fbbf6d20d3efa0ca33841e149fa2068d42bf5005a53822db7eaa8"
end
depends_on "openjdk"
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