homebrew-core/Formula/maxwell.rb
2018-07-03 06:41:17 +01:00

28 lines
773 B
Ruby

class Maxwell < Formula
desc "Maxwell's daemon, a mysql-to-json kafka producer"
homepage "http://maxwells-daemon.io/"
url "https://github.com/zendesk/maxwell/releases/download/v1.17.1/maxwell-1.17.1.tar.gz"
sha256 "54d9a4ab5313e96b2a7efb833eac8fa455d11ed4494cd3d571ba168347cb7d8d"
bottle :unneeded
depends_on :java => "1.8"
def install
libexec.install Dir["*"]
%w[maxwell maxwell-bootstrap].each do |f|
bin.install libexec/"bin/#{f}"
end
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8"))
end
test do
fork do
exec "#{bin}/maxwell --log_level=OFF > #{testpath}/maxwell.log 2>/dev/null"
end
sleep 15
assert_match "Using kafka version", IO.read("#{testpath}/maxwell.log")
end
end