diff --git a/.travis.yml b/.travis.yml index 350c4eb..05aac6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ sudo: false +jdk: + - oraclejdk8 language: ruby cache: bundler rvm: - - jruby-1.7.23 -script: + - jruby-1.7.25 +before_install: + - git clone -b feature/event_interface https://github.com/elastic/logstash +script: - bundle exec rspec spec diff --git a/Gemfile b/Gemfile index d926697..7cb9cd3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,12 @@ source 'https://rubygems.org' -gemspec \ No newline at end of file +gemspec + +# this is temporary for the feature/plugin-api-2_0 branch and is meant for travis testing +gem "logstash-core", :path => "./logstash/logstash-core" +gem "logstash-core-plugin-api", :path => "./logstash/logstash-core-plugin-api" +gem "logstash-core-event-java", :path => "./logstash/logstash-core-event-java" +gem "logstash-devutils", :github => "elastic/logstash-devutils", :branch => "feature/plugin-api-2_0" +gem "logstash-codec-plain", :github => "logstash-plugins/logstash-codec-plain", :branch => "feature/plugin-api-2_0" +gem "logstash-codec-line", :github => "logstash-plugins/logstash-codec-line", :branch => "feature/plugin-api-2_0" +gem "logstash-codec-json", :github => "logstash-plugins/logstash-codec-json", :branch => "feature/plugin-api-2_0" +gem "logstash-codec-json_lines", :github => "logstash-plugins/logstash-codec-json_lines", :branch => "feature/plugin-api-2_0" diff --git a/lib/logstash/inputs/stdin.rb b/lib/logstash/inputs/stdin.rb index b6ed1d9..e182ecf 100644 --- a/lib/logstash/inputs/stdin.rb +++ b/lib/logstash/inputs/stdin.rb @@ -26,7 +26,7 @@ def run(queue) data = $stdin.sysread(16384) @codec.decode(data) do |event| decorate(event) - event["host"] = @host if !event.include?("host") + event.set("host", @host) if !event.include?("host") queue << event end rescue IOError, EOFError # stdin closed diff --git a/logstash-input-stdin.gemspec b/logstash-input-stdin.gemspec index 89f9674..15f21ef 100644 --- a/logstash-input-stdin.gemspec +++ b/logstash-input-stdin.gemspec @@ -20,14 +20,13 @@ Gem::Specification.new do |s| s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" } # Gem dependencies - s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0" - - s.add_runtime_dependency 'logstash-codec-plain' + s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0" s.add_runtime_dependency 'logstash-codec-line' - s.add_runtime_dependency 'logstash-codec-json' - s.add_runtime_dependency 'logstash-codec-json_lines' s.add_runtime_dependency 'concurrent-ruby' + s.add_development_dependency 'logstash-codec-plain' + s.add_development_dependency 'logstash-codec-json' + s.add_development_dependency 'logstash-codec-json_lines' s.add_development_dependency 'logstash-devutils' end