logstash-codec-line 2.1.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/Gemfile +3 -1
- data/LICENSE +1 -1
- data/README.md +12 -3
- data/logstash-codec-line.gemspec +3 -3
- data/spec/codecs/line_spec.rb +7 -7
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a242ce97958f994c926218a9e1ec6f8ee411680
|
4
|
+
data.tar.gz: 6f96900905b00d37a731b343fa227db04bc69c3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87d878c9f9c746478364a8e26848f0cd966b7bde46a7e743731a031bb51a0c98021887396008c84629c1eb59c6bc63c2511cc4bd46bde55d5d3d2fad3c38ef2c
|
7
|
+
data.tar.gz: 3bdbfc8448f7e3ba30aa1154d4eadaf49dff827373027a363da7e22b7ec7fbce62a57f481ea3ddb95c70faf9f744e3657fe6d8804192358c1b74cf6bf3939520
|
data/CHANGELOG.md
CHANGED
@@ -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.2
|
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.1
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
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-line-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Codecs/job/logstash-plugin-codec-line-unit/)
|
3
|
+
[![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-codec-line.svg)](https://travis-ci.org/logstash-plugins/logstash-codec-line)
|
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
|
-
|
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
|
|
data/logstash-codec-line.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-codec-line'
|
4
|
-
s.version = '
|
4
|
+
s.version = '3.0.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Line-oriented text data."
|
7
|
-
s.description = "This gem is a
|
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", "~>
|
23
|
+
s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
|
24
24
|
|
25
25
|
s.add_development_dependency 'logstash-devutils'
|
26
26
|
end
|
data/spec/codecs/line_spec.rb
CHANGED
@@ -51,7 +51,7 @@ describe LogStash::Codecs::Line do
|
|
51
51
|
subject.decode("hello world\n") do |e|
|
52
52
|
decoded = true
|
53
53
|
insist { e.is_a?(LogStash::Event) }
|
54
|
-
insist { e
|
54
|
+
insist { e.get("message") } == "hello world"
|
55
55
|
end
|
56
56
|
insist { decoded } == true
|
57
57
|
end
|
@@ -59,7 +59,7 @@ describe LogStash::Codecs::Line do
|
|
59
59
|
it "should return an event from a valid utf-8 string" do
|
60
60
|
subject.decode("München\n") do |e|
|
61
61
|
insist { e.is_a?(LogStash::Event) }
|
62
|
-
insist { e
|
62
|
+
insist { e.get("message") } == "München"
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
@@ -74,7 +74,7 @@ describe LogStash::Codecs::Line do
|
|
74
74
|
subject.decode(line) { |e| result << e }
|
75
75
|
subject.flush { |e| result << e }
|
76
76
|
expect(result.size).to eq(1)
|
77
|
-
expect(result[0]
|
77
|
+
expect(result[0].get("message")).to eq(line)
|
78
78
|
end
|
79
79
|
|
80
80
|
it "should break lines by that delimiter" do
|
@@ -82,9 +82,9 @@ describe LogStash::Codecs::Line do
|
|
82
82
|
subject.decode("line1|line2|line3|") { |e| result << e }
|
83
83
|
subject.flush { |e| result << e }
|
84
84
|
expect(result.size).to eq(3)
|
85
|
-
expect(result[0]
|
86
|
-
expect(result[1]
|
87
|
-
expect(result[2]
|
85
|
+
expect(result[0].get("message")).to eq("line1")
|
86
|
+
expect(result[1].get("message")).to eq("line2")
|
87
|
+
expect(result[2].get("message")).to eq("line3")
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
@@ -98,7 +98,7 @@ describe LogStash::Codecs::Line do
|
|
98
98
|
count = 0
|
99
99
|
subject.flush do |event|
|
100
100
|
count += 1
|
101
|
-
insist { event
|
101
|
+
insist { event.get("message").encoding } == Encoding::UTF_8
|
102
102
|
end
|
103
103
|
insist { count } == 1
|
104
104
|
end
|
metadata
CHANGED
@@ -1,44 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-codec-line
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
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-
|
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: '
|
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: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
+
name: logstash-devutils
|
28
29
|
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
31
|
- - ">="
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0'
|
33
|
-
name: logstash-devutils
|
34
|
-
prerelease: false
|
35
34
|
type: :development
|
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: '0'
|
41
|
-
description: This gem is a
|
41
|
+
description: This gem is a Logstash plugin required to be installed on top of the
|
42
|
+
Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This
|
43
|
+
gem is not a stand-alone program
|
42
44
|
email: info@elastic.co
|
43
45
|
executables: []
|
44
46
|
extensions: []
|
@@ -59,7 +61,7 @@ licenses:
|
|
59
61
|
metadata:
|
60
62
|
logstash_plugin: 'true'
|
61
63
|
logstash_group: codec
|
62
|
-
post_install_message:
|
64
|
+
post_install_message:
|
63
65
|
rdoc_options: []
|
64
66
|
require_paths:
|
65
67
|
- lib
|
@@ -74,9 +76,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
76
|
- !ruby/object:Gem::Version
|
75
77
|
version: '0'
|
76
78
|
requirements: []
|
77
|
-
rubyforge_project:
|
78
|
-
rubygems_version: 2.
|
79
|
-
signing_key:
|
79
|
+
rubyforge_project:
|
80
|
+
rubygems_version: 2.5.1
|
81
|
+
signing_key:
|
80
82
|
specification_version: 4
|
81
83
|
summary: Line-oriented text data.
|
82
84
|
test_files:
|