aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/vnu.rb
blob: fc4673955ef232bb0703741c66228f49a83ea39d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require "formula"

class Vnu < Formula
  homepage "https://validator.github.io/validator/"
  url "https://github.com/validator/validator/releases/download/20141006/vnu-20141013.jar.zip"
  sha1 "48bfcb41e6faf9130c5f1698497e0ec15ddfd657"
  version "20141013"

  def install
    libexec.install "vnu.jar"
    bin.write_jar_script libexec/"vnu.jar", "vnu"
  end

  test do
    path = testpath/"index.html"
    path.write <<-EOS
      <!DOCTYPE html>
      <html>
      <head>
        <title>hi</title>
      </head>
      <body>
      </body>
      </html>
    EOS

    system bin/"vnu", path
  end
end