Skip to content

Commit f1d1fa6

Browse files
committed
update to new event api
1 parent 484f6a3 commit f1d1fa6

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
---
12
sudo: false
23
language: ruby
34
cache: bundler
45
services:
5-
- redis-server
6+
- redis-server
67
rvm:
7-
- jruby-1.7.23
8-
script:
9-
- bundle exec rspec spec && bundle exec rspec spec --tag integration
8+
- jruby-1.7.25
9+
script:
10+
- bundle exec rspec spec && bundle exec rspec spec --tag integration
11+
jdk: oraclejdk8
12+
before_install:
13+
- git clone -b feature/event_interface https://github.com/elastic/logstash

Gemfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
source 'https://rubygems.org'
2-
gemspec
2+
gemspec
3+
gem "logstash-core", :path => "./logstash/logstash-core"
4+
gem "logstash-core-plugin-api", :path => "./logstash/logstash-core-plugin-api"
5+
gem "logstash-core-event-java", :path => "./logstash/logstash-core-event-java"
6+
gem "logstash-devutils", :github => "elastic/logstash-devutils", :branch => "feature/plugin-api-2_0"
7+
gem "logstash-input-generator", :github => "logstash-plugins/logstash-input-generator", :branch => "feature/plugin-api-2_0"
8+
gem "logstash-codec-json", :github => "logstash-plugins/logstash-codec-json", :branch => "feature/plugin-api-2_0"
9+
gem "logstash-codec-plain", :github => "logstash-plugins/logstash-codec-plain", :branch => "feature/plugin-api-2_0"

logstash-output-redis.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "output" }
2121

2222
# Gem dependencies
23-
s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
23+
s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
2424

2525
s.add_runtime_dependency 'redis'
2626
s.add_runtime_dependency 'stud'

spec/integration/outputs/redis_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
event_count.times do |value|
4343
id, element = redis.blpop(key, 0)
4444
event = LogStash::Event.new(LogStash::Json.load(element))
45-
insist { event["sequence"] } == value
46-
insist { event["message"] } == message
45+
insist { event.get("sequence") } == value
46+
insist { event.get("message") } == message
4747
end
4848

4949
# The list should now be empty

0 commit comments

Comments
 (0)