homebrew-core/Formula/vnu.rb

40 lines
923 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
rebuild 1
sha256 cellar: :any_skip_relocation, all: "3655c6eb02716c52cda549fb8b86eff95126d71671dfe805a5015748f1181574"
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