35 lines
941 B
Ruby
35 lines
941 B
Ruby
class Maxwell < Formula
|
|
desc "Reads MySQL binlogs and writes row updates as JSON to Kafka"
|
|
homepage "https://maxwells-daemon.io/"
|
|
url "https://github.com/zendesk/maxwell/releases/download/v1.28.1/maxwell-1.28.1.tar.gz"
|
|
sha256 "f8b9108be13ea4dc9e5c9fa77492b41cda227eeb6ec8012f39d745ccd1e6117a"
|
|
license "Apache-2.0"
|
|
|
|
livecheck do
|
|
url "https://github.com/zendesk/maxwell/releases/latest"
|
|
regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
|
|
end
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "openjdk@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
|