class VertX < Formula desc "Toolkit for building reactive applications on the JVM." homepage "http://vertx.io/" url "https://dl.bintray.com/vertx/downloads/vert.x-3.4.1-full.tar.gz" sha256 "be0c1423845333e72d4fd25c9884211d17837a5afd1b3a32f18875d33319a1b1" bottle :unneeded depends_on :java => "1.8+" def install rm_f Dir["bin/*.bat"] libexec.install %w[bin conf lib] bin.install_symlink "#{libexec}/bin/vertx" end test do (testpath/"HelloWorld.java").write <<-EOS.undent import io.vertx.core.AbstractVerticle; public class HelloWorld extends AbstractVerticle { public void start() { System.out.println("Hello World!"); vertx.close(); System.exit(0); } } EOS output = shell_output("#{bin}/vertx run HelloWorld.java") assert_equal "Hello World!\n", output end end