logstash-codec-msgpack 2.0.4-java → 3.0.1-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3affc449023e6b4ed9575b014234693e47d3d9a0
4
- data.tar.gz: 8dd7fbcf52068a4091fa24699eefdd572abbda66
3
+ metadata.gz: 839141202e9a958449e8399ed25082343b78c84b
4
+ data.tar.gz: 3a06461dc92da66000197bbef8164b72e69f7b9b
5
5
  SHA512:
6
- metadata.gz: 9c774a3a2a1f374df2065c78fa2b373061febed630881d47b26cac2c3fac66d6a78928d0c694a1883ce71e337b87e8018f8b275b58d730071554576152d7b56e
7
- data.tar.gz: cdfd935f32a73af9bb5946a9c83aa8f613accbde71b221134cf51f970dd0630fbd2710b06a6e66324e46fc27ffd2828dc53691e65de427e2970dab304d931142
6
+ metadata.gz: a1728c77321d09f6acb7ec5dac1592756742a8b76839b585ee894b624c7efd25af170d90fd6781cf659953c0363cb5967891e2229634cf928432010ec4990367
7
+ data.tar.gz: 4e5ca7228fda4f6d842ff00e82da97a1101b596b0c46f559a88048870dcc8f90d1d9bb199603d67284134f79000733f00b228bc60a5741cf5a64d920efffd130
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.0.1
2
+ - Republish all the gems under jruby.
3
+ ## 3.0.0
4
+ - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141
1
5
  # 2.0.4
2
6
  - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
7
  # 2.0.3
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
2
+
3
+ # Specify your gem's dependencies in logstash-mass_effect.gemspec
4
+ gemspec
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012–2015 Elasticsearch <http://www.elastic.co>
1
+ Copyright (c) 2012–2016 Elasticsearch <http://www.elastic.co>
2
2
 
3
3
  Licensed under the Apache License, Version 2.0 (the "License");
4
4
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Logstash Plugin
2
2
 
3
- [![Build
4
- Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Codecs/job/logstash-plugin-codec-msgpack-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Codecs/job/logstash-plugin-codec-msgpack-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-codec-msgpack.svg)](https://travis-ci.org/logstash-plugins/logstash-codec-msgpack)
5
4
 
6
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash).
7
6
 
@@ -56,7 +55,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
56
55
  ```
57
56
  - Install plugin
58
57
  ```sh
58
+ # Logstash 2.3 and higher
59
+ bin/logstash-plugin install --no-verify
60
+
61
+ # Prior to Logstash 2.3
59
62
  bin/plugin install --no-verify
63
+
60
64
  ```
61
65
  - Run Logstash with your plugin
62
66
  ```sh
@@ -74,7 +78,12 @@ gem build logstash-filter-awesome.gemspec
74
78
  ```
75
79
  - Install the plugin from the Logstash home
76
80
  ```sh
77
- bin/plugin install /your/local/plugin/logstash-filter-awesome.gem
81
+ # Logstash 2.3 and higher
82
+ bin/logstash-plugin install --no-verify
83
+
84
+ # Prior to Logstash 2.3
85
+ bin/plugin install --no-verify
86
+
78
87
  ```
79
88
  - Start Logstash and proceed to test the plugin
80
89
 
@@ -19,17 +19,25 @@ class LogStash::Codecs::Msgpack < LogStash::Codecs::Base
19
19
  begin
20
20
  # Msgpack does not care about UTF-8
21
21
  event = LogStash::Event.new(MessagePack.unpack(data))
22
- event["tags"] ||= []
22
+
23
+ if event.get("tags").nil?
24
+ event.set("tags", [])
25
+ end
26
+
23
27
  if @format
24
- event["message"] ||= event.sprintf(@format)
28
+ if event.get("message").nil?
29
+ event.set("message", event.sprintf(@format))
30
+ end
25
31
  end
26
32
  rescue => e
27
33
  # Treat as plain text and try to do the best we can with it?
28
34
  @logger.warn("Trouble parsing msgpack input, falling back to plain text",
29
35
  :input => data, :exception => e)
30
- event["message"] = data
31
- event["tags"] ||= []
32
- event["tags"] << "_msgpackparsefailure"
36
+ event.set("message", data)
37
+
38
+ tags = event.get("tags").nil? ? [] : event.get("tags")
39
+ tags << "_msgpackparsefailure"
40
+ event.set("tags", tags)
33
41
  end
34
42
  yield event
35
43
  end # def decode
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-msgpack'
4
- s.version = '2.0.4'
4
+ s.version = '3.0.1'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Encode and decode msgpack formatted data"
7
- s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
7
+ s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
8
8
  s.authors = ["Elastic"]
9
9
  s.email = 'info@elastic.co'
10
10
  s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "codec" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core-plugin-api", "~> 1.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
24
24
 
25
25
  if RUBY_PLATFORM == "java"
26
26
  s.platform = RUBY_PLATFORM
@@ -14,10 +14,10 @@ describe LogStash::Codecs::Msgpack do
14
14
  data = {"foo" => "bar", "baz" => {"bah" => ["a","b","c"]}, "@timestamp" => "2014-05-30T02:52:17.929Z"}
15
15
  subject.decode(MessagePack.pack(data)) do |event|
16
16
  insist { event.is_a? LogStash::Event }
17
- insist { event["foo"] } == data["foo"]
18
- insist { event["baz"] } == data["baz"]
19
- insist { event["bah"] } == data["bah"]
20
- insist { event["@timestamp"].to_iso8601 } == data["@timestamp"]
17
+ insist { event.get("foo") } == data["foo"]
18
+ insist { event.get("baz") } == data["baz"]
19
+ insist { event.get("bah") } == data["bah"]
20
+ insist { event.get("@timestamp").to_iso8601 } == data["@timestamp"]
21
21
  end
22
22
  end
23
23
  end
@@ -32,7 +32,7 @@ describe LogStash::Codecs::Msgpack do
32
32
  insist { MessagePack.unpack(d)["baz"] } == data["baz"]
33
33
  insist { MessagePack.unpack(d)["bah"] } == data["bah"]
34
34
  insist { MessagePack.unpack(d)["@timestamp"] } == "2014-05-30T02:52:17.929Z"
35
- insist { MessagePack.unpack(d)["@timestamp"] } == event["@timestamp"].to_iso8601
35
+ insist { MessagePack.unpack(d)["@timestamp"] } == event.get("@timestamp").to_iso8601
36
36
  got_event = true
37
37
  end
38
38
  subject.encode(event)
@@ -48,7 +48,7 @@ describe LogStash::Codecs::Msgpack do
48
48
  insist { MessagePack.unpack(d)["baz"] } == data["baz"]
49
49
  insist { MessagePack.unpack(d)["bah"] } == data["bah"]
50
50
  insist { MessagePack.unpack(d)["@timestamp"] } == "2014-05-30T02:52:17.929Z"
51
- insist { MessagePack.unpack(d)["@timestamp"] } == event["@timestamp"].to_iso8601
51
+ insist { MessagePack.unpack(d)["@timestamp"] } == event.get("@timestamp").to_iso8601
52
52
  got_event = true
53
53
  end
54
54
  subject.encode(event)
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-msgpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 3.0.1
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: '1.0'
18
+ version: '2.0'
19
19
  name: logstash-core-plugin-api
20
20
  prerelease: false
21
21
  type: :runtime
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program
55
+ description: This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program
56
56
  email: info@elastic.co
57
57
  executables: []
58
58
  extensions: []