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.2.1-full.tar.gz" sha256 "16e85a80e4f3c3eacf972953fbd36da21ba99b49cc39eda7760f1436ad8cb685" bottle :unneeded 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 system "#{bin}/vertx", "run", "HelloWorld.java" end end