homebrew-core/Formula/maxwell.rb

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.2/maxwell-1.28.2.tar.gz"
sha256 "59b679b9c43c9a7a45cbe4ad19b9ba45e57c875d10b6e2a1f5d9aed0d34e79ea"
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