class Blazegraph < Formula desc "Graph database supporting RDF data model, Sesame, and Blueprint APIs" homepage "https://www.blazegraph.com/" url "https://downloads.sourceforge.net/project/bigdata/bigdata/2.1.4/blazegraph.jar" sha256 "b175d2b4aa9e2f65fcbf4d6f75f8dd12ef75022f82fb94df1fbd0bac5230af2a" bottle :unneeded depends_on :java => "1.7+" def install libexec.install "blazegraph.jar" bin.write_jar_script libexec/"blazegraph.jar", "blazegraph" end plist_options :startup => "true", :manual => "blazegraph start" def plist; <<~EOS Label #{plist_name} Program #{opt_bin}/blazegraph RunAtLoad WorkingDirectory #{opt_prefix} EOS end test do server = fork do exec bin/"blazegraph" end sleep 5 Process.kill("TERM", server) assert_predicate testpath/"blazegraph.jnl", :exist? assert_predicate testpath/"rules.log", :exist? end end