2013-09-13 21:50:19 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Htmlcleaner < Formula
|
|
|
|
homepage 'http://htmlcleaner.sourceforge.net/index.php'
|
2014-04-18 22:21:54 +00:00
|
|
|
url 'https://downloads.sourceforge.net/project/htmlcleaner/htmlcleaner/htmlcleaner%20v2.8/htmlcleaner-2.8.zip'
|
|
|
|
sha1 'e4cbfebb306fc0baa95205ba91e452c961eebf85'
|
2013-09-13 21:50:19 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
libexec.install "htmlcleaner-#{version}.jar"
|
|
|
|
bin.write_jar_script libexec/"htmlcleaner-#{version}.jar", "htmlcleaner"
|
|
|
|
end
|
2014-02-04 21:37:20 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/"index.html"
|
|
|
|
path.write "<html>"
|
|
|
|
|
|
|
|
output = `#{bin}/htmlcleaner src=#{path}`
|
|
|
|
assert output.include?("</html>")
|
|
|
|
assert_equal 0, $?.exitstatus
|
|
|
|
end
|
2013-09-13 21:50:19 +00:00
|
|
|
end
|