Skip to content

Commit

Permalink
plugin-api 2.0 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
colinsurprenant committed Apr 28, 2016
1 parent 79a2052 commit cca193c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 11 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
source 'https://rubygems.org'
gemspec
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"
2 changes: 1 addition & 1 deletion lib/logstash/inputs/stdin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions logstash-input-stdin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cca193c

Please sign in to comment.