homebrew-core/Formula/embulk.rb
ilovezfs 4219b20e5b
embulk 0.9.1 (#23881)
require Java 8 specifically
2018-02-09 04:09:09 -08:00

27 lines
887 B
Ruby

class Embulk < Formula
desc "Data transfer between various databases, file formats and services"
homepage "http://www.embulk.org/"
url "https://bintray.com/artifact/download/embulk/maven/embulk-0.9.1.jar"
sha256 "d91c02e258e8babaa0c9c81f435a74dcc8f8695a50de72bf56a3cb8fdcb7efb8"
bottle :unneeded
depends_on :java => "1.8"
def install
# Execute through /bin/bash to be compatible with OS X 10.9.
libexec.install "embulk-#{version}.jar" => "embulk.jar"
(bin/"embulk").write <<~EOS
#!/bin/bash
export JAVA_HOME=$(#{Language::Java.java_home_cmd("1.8")})
exec /bin/bash "#{libexec}/embulk.jar" "$@"
EOS
end
test do
system bin/"embulk", "example", "./try1"
system bin/"embulk", "guess", "./try1/seed.yml", "-o", "config.yml"
system bin/"embulk", "preview", "config.yml"
system bin/"embulk", "run", "config.yml"
end
end