logstash-codec-json_lines 2.1.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c0cd059ca5da3dc25781c09fd3d23b665ddc48d
4
- data.tar.gz: 617c70977be189c80dd6eab2b210f30dfc9bd6ab
3
+ metadata.gz: 6bdf698af466e77dad087ea604a1a4666a6d4f34
4
+ data.tar.gz: 1f61fb040238c7c2fc887a125af9645c49c68140
5
5
  SHA512:
6
- metadata.gz: 254c75cfc7f26d654be47154149a5ed0e93f42f36e81d3fd7f38e6dedf8950a93e9ca75fc605c5595a5b4bcf9ed4c14abd455af539e1ad102df5ab481b4c7a0f
7
- data.tar.gz: 83a4b0e95a7f2ceb71b7c972d79c7f2ca7447943b11985670ee6af8f4f5ba13853f75386a1db5759e460efba2dfc4a4e6ad82e16866f270e97d947d1dff4c409
6
+ metadata.gz: 2aeba3d2e2151aedc8cb45f05a586daaa6137b47986755122b49ca9e8bc03a4bebd2371d638227f6f2ff95f2d02ac06032b79c749232f43d26383cc4dbea8d52
7
+ data.tar.gz: 1bb13537f9ba12024becb6ccea351184d090dd82303fd41bdb7eb7482dcc7d4339730c5e95f9af1c966f0fa57d79ecfec4281a74f6b4c8425313a1bda75ab80e
@@ -1,3 +1,5 @@
1
+ ## 3.0.0
2
+ - 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
3
  # 2.1.3
2
4
  - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
3
5
  # 2.1.2
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
1
  source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in logstash-mass_effect.gemspec
2
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-json_lines-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Codecs/job/logstash-plugin-codec-json_lines-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-codec-json_lines.svg)](https://travis-ci.org/logstash-plugins/logstash-codec-json_lines)
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
 
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-json_lines'
4
- s.version = '2.1.3'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This codec will decode streamed JSON that is newline delimited."
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
  s.add_runtime_dependency 'logstash-codec-line', '>= 2.1.0'
26
26
 
@@ -16,9 +16,9 @@ describe LogStash::Codecs::JSONLines do
16
16
  data = {"foo" => "bar", "baz" => {"bah" => ["a","b","c"]}}
17
17
  subject.decode(LogStash::Json.dump(data) + "\n") do |event|
18
18
  insist { event.is_a? LogStash::Event }
19
- insist { event["foo"] } == data["foo"]
20
- insist { event["baz"] } == data["baz"]
21
- insist { event["bah"] } == data["bah"]
19
+ insist { event.get("foo") } == data["foo"]
20
+ insist { event.get("baz") } == data["baz"]
21
+ insist { event.get("bah") } == data["bah"]
22
22
  end
23
23
  end
24
24
 
@@ -29,9 +29,9 @@ describe LogStash::Codecs::JSONLines do
29
29
  end
30
30
  subject.decode("\n") do |event|
31
31
  insist { event.is_a? LogStash::Event }
32
- insist { event["foo"] } == data["foo"]
33
- insist { event["baz"] } == data["baz"]
34
- insist { event["bah"] } == data["bah"]
32
+ insist { event.get("foo") } == data["foo"]
33
+ insist { event.get("baz") } == data["baz"]
34
+ insist { event.get("bah") } == data["bah"]
35
35
  end
36
36
  end
37
37
 
@@ -44,9 +44,9 @@ describe LogStash::Codecs::JSONLines do
44
44
  result = []
45
45
  subject.decode(line) { |event| result << event }
46
46
  expect(result.size).to eq(3)
47
- expect(result[0]["hey"]).to eq(1)
48
- expect(result[1]["hey"]).to eq(2)
49
- expect(result[2]["hey"]).to eq(3)
47
+ expect(result[0].get("hey")).to eq(1)
48
+ expect(result[1].get("hey")).to eq(2)
49
+ expect(result[2].get("hey")).to eq(3)
50
50
  end
51
51
  end
52
52
 
@@ -56,8 +56,8 @@ describe LogStash::Codecs::JSONLines do
56
56
  subject.decode("something that isn't json\n") do |event|
57
57
  decoded = true
58
58
  insist { event.is_a?(LogStash::Event) }
59
- insist { event["message"] } == "something that isn't json"
60
- insist { event["tags"] }.include?("_jsonparsefailure")
59
+ insist { event.get("message") } == "something that isn't json"
60
+ insist { event.get("tags") }.include?("_jsonparsefailure")
61
61
  end
62
62
  insist { decoded } == true
63
63
  end
@@ -71,7 +71,7 @@ describe LogStash::Codecs::JSONLines do
71
71
  subject.decode("\n") do |event|
72
72
  decoded = true
73
73
  insist { event.is_a?(LogStash::Event) }
74
- insist { event["message"].encoding.to_s } == "UTF-8"
74
+ insist { event.get("message").encoding.to_s } == "UTF-8"
75
75
  end
76
76
  insist { decoded } == true
77
77
  end
@@ -88,13 +88,13 @@ describe LogStash::Codecs::JSONLines do
88
88
 
89
89
  it "uses an array to store the tags" do
90
90
  subject.decode(message) do |event|
91
- expect(event['tags']).to be_a Array
91
+ expect(event.get('tags')).to be_a Array
92
92
  end
93
93
  end
94
94
 
95
95
  it "add a json parser failure tag" do
96
96
  subject.decode(message) do |event|
97
- expect(event['tags']).to include "_jsonparsefailure"
97
+ expect(event.get('tags')).to include "_jsonparsefailure"
98
98
  end
99
99
  end
100
100
  end
@@ -162,7 +162,7 @@ describe LogStash::Codecs::JSONLines do
162
162
  collector.push(event)
163
163
  end
164
164
  expect(collector.size).to eq(1)
165
- expect(collector.first['field']).to eq('value1')
165
+ expect(collector.first.get('field')).to eq('value1')
166
166
  end
167
167
  end
168
168
 
@@ -180,8 +180,8 @@ describe LogStash::Codecs::JSONLines do
180
180
  collector.push(event)
181
181
  end
182
182
  expect(collector.size).to eq(2)
183
- expect(collector.first['field']).to eq('value1')
184
- expect(collector.last['field']).to eq('value2')
183
+ expect(collector.first.get('field')).to eq('value1')
184
+ expect(collector.last.get('field')).to eq('value2')
185
185
  end
186
186
  end
187
187
 
metadata CHANGED
@@ -1,58 +1,60 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-json_lines
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-24 00:00:00.000000000 Z
11
+ date: 2016-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: logstash-core-plugin-api
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - "~>"
17
18
  - !ruby/object:Gem::Version
18
- version: '1.0'
19
- name: logstash-core-plugin-api
20
- prerelease: false
19
+ version: '2.0'
21
20
  type: :runtime
21
+ prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
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
+ name: logstash-codec-line
28
29
  requirement: !ruby/object:Gem::Requirement
29
30
  requirements:
30
31
  - - ">="
31
32
  - !ruby/object:Gem::Version
32
33
  version: 2.1.0
33
- name: logstash-codec-line
34
- prerelease: false
35
34
  type: :runtime
35
+ prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.1.0
41
41
  - !ruby/object:Gem::Dependency
42
+ name: logstash-devutils
42
43
  requirement: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - ">="
45
46
  - !ruby/object:Gem::Version
46
47
  version: '0'
47
- name: logstash-devutils
48
- prerelease: false
49
48
  type: :development
49
+ prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
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
56
+ Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
57
+ gem is not a stand-alone program
56
58
  email: info@elastic.co
57
59
  executables: []
58
60
  extensions: []
@@ -73,7 +75,7 @@ licenses:
73
75
  metadata:
74
76
  logstash_plugin: 'true'
75
77
  logstash_group: codec
76
- post_install_message:
78
+ post_install_message:
77
79
  rdoc_options: []
78
80
  require_paths:
79
81
  - lib
@@ -88,9 +90,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
90
  - !ruby/object:Gem::Version
89
91
  version: '0'
90
92
  requirements: []
91
- rubyforge_project:
92
- rubygems_version: 2.4.8
93
- signing_key:
93
+ rubyforge_project:
94
+ rubygems_version: 2.5.1
95
+ signing_key:
94
96
  specification_version: 4
95
97
  summary: This codec will decode streamed JSON that is newline delimited.
96
98
  test_files: