2018-03-02 12:57:38 +00:00
|
|
|
class Maxwell < Formula
|
|
|
|
desc "Maxwell's daemon, a mysql-to-json kafka producer"
|
|
|
|
homepage "http://maxwells-daemon.io/"
|
2018-03-07 07:01:02 +00:00
|
|
|
url "https://github.com/zendesk/maxwell/releases/download/v1.13.2/maxwell-1.13.2.tar.gz"
|
|
|
|
sha256 "db0d4dbf2c091e3f234bf7deb89e5a0397e5b0a49a1c4bdf8dbe6d62d95bb58e"
|
2018-03-02 12:57:38 +00:00
|
|
|
|
|
|
|
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
|