homebrew-core/Formula/vert.x.rb
2019-10-18 18:55:32 +02:00

30 lines
870 B
Ruby

class VertX < Formula
desc "Toolkit for building reactive applications on the JVM"
homepage "https://vertx.io/"
url "https://dl.bintray.com/vertx/downloads/vert.x-3.8.3-full.tar.gz"
sha256 "fe029a8d0f245b3bf5738f52ecfa3199b8076c2d19e869ea56bd6ae936169c31"
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
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