diff options
| author | Matthew Hawkins | 2014-04-22 13:50:43 +1000 | 
|---|---|---|
| committer | Adam Vandenberg | 2014-05-07 09:17:07 -0700 | 
| commit | b2d2cf667f4624264e9760fe1211b7e7c7a6af46 (patch) | |
| tree | f12e5e7bc5bfe1158535da5b9d4b2144ae2a5a00 | |
| parent | 53e7990f63cf9ff83f7c2ebcca2a69b1e2460cae (diff) | |
| download | homebrew-b2d2cf667f4624264e9760fe1211b7e7c7a6af46.tar.bz2 | |
logstash 1.4.0
Closes #28598.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/logstash.rb | 21 | 
1 files changed, 17 insertions, 4 deletions
| diff --git a/Library/Formula/logstash.rb b/Library/Formula/logstash.rb index e85d96ee8..2735f726a 100644 --- a/Library/Formula/logstash.rb +++ b/Library/Formula/logstash.rb @@ -2,11 +2,24 @@ require 'formula'  class Logstash < Formula    homepage 'http://logstash.net/' -  url 'https://download.elasticsearch.org/logstash/logstash/logstash-1.3.3-flatjar.jar' -  sha1 '8effc7027093188b968fed37513ca647f96d6d8c' +  url 'https://download.elasticsearch.org/logstash/logstash/logstash-1.4.0.tar.gz' +  sha1 '009c9d3d17b781b6ad2cceb776064cda6c6b3957'    def install -    libexec.install "logstash-#{version}-flatjar.jar" -    bin.write_jar_script libexec/"logstash-#{version}-flatjar.jar", "logstash" +    inreplace %w{bin/logstash bin/logstash.lib.sh}, /^basedir=.*$/, "basedir=#{libexec}" +    libexec.install Dir["*"] +    bin.install_symlink libexec/"bin/logstash" +  end + +  def caveats; <<-EOS.undent +    Logstash 1.4 emits an unhelpful error if you try to start it sans config. +    Please read the getting started guide located at: +    http://logstash.net/docs/latest/tutorials/getting-started-with-logstash +    EOS +  end + +  test do +    system "#{bin}/logstash", "--version" +    system "/bin/echo 'hello world' | #{bin}/logstash agent -e 'input { stdin { type => stdin } } output { stdout { codec => rubydebug } }'"    end  end | 
