logstash-filter-split 2.0.5 → 3.0.0

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: f7b17c04a5eac7dc11dd3c973d009c3b17b13e07
4
- data.tar.gz: 605a9c2a43bed45f6732404b27ae2a4142d7e05c
3
+ metadata.gz: 767cd71fc4112fa1e9f2a88856415f4f7bd2275c
4
+ data.tar.gz: 1351faa32b2d1050f27a09183b69e3c1d9e580a5
5
5
  SHA512:
6
- metadata.gz: d7e223ce79ec1b858e85771a66ca4ed9df7580f511e8498e6ec0d63a0cd11a8a77e68abfeb9b189c3f2a93f7fa05564dd1f7a66a3fca7f075e24f0f1b9c77aa3
7
- data.tar.gz: 2568a7c9396c57979f10d8d6ffd255a8e1d33466d7dc402c618f0e5f647d388e44796ad8e2511a598bffa7d757d051a22055fec8e3777b7fc71968aa4bd8574a
6
+ metadata.gz: 5db2083f48ae5f8a6523907d73a584289c2fc4f32e2e535748cd88501057b05e7bf796fd53b765203dcbe4b4892b665c956d0eae645365b1a24f5b2988013b03
7
+ data.tar.gz: 8a0c361f6c4b5a84cd84678ac53318f38bb41fe202879e40bf6a514967db473f14ee030f47063b2973847f89f8a83774488cd113a81b8262e6cb5bb9dccfcee5
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.0.4
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.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%20Filters/job/logstash-plugin-filter-split-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-split-unit/)
3
+ [![Travis Build Status](https://travis-ci.org/logstash-plugins/logstash-filter-split.svg)](https://travis-ci.org/logstash-plugins/logstash-filter-split)
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
 
@@ -37,7 +37,7 @@ class LogStash::Filters::Split < LogStash::Filters::Base
37
37
  def filter(event)
38
38
 
39
39
 
40
- original_value = event[@field]
40
+ original_value = event.get(@field)
41
41
 
42
42
  if original_value.is_a?(Array)
43
43
  splits = original_value
@@ -58,7 +58,11 @@ class LogStash::Filters::Split < LogStash::Filters::Base
58
58
 
59
59
  event_split = event.clone
60
60
  @logger.debug("Split event", :value => value, :field => @field)
61
- event_split[(@target || @field)] = value
61
+ if @target.nil?
62
+ event_split.set(@field, value)
63
+ else
64
+ event_split.set(@target, value)
65
+ end
62
66
  filter_matched(event_split)
63
67
 
64
68
  # Push this new event onto the stack at the LogStash::FilterWorker
@@ -1,10 +1,10 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-split'
4
- s.version = '2.0.5'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The split filter is for splitting multiline messages into separate events."
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" => "filter" }
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_development_dependency 'logstash-devutils'
26
26
  end
@@ -14,9 +14,9 @@ describe LogStash::Filters::Split do
14
14
 
15
15
  sample "big\nbird\nsesame street" do
16
16
  insist { subject.length } == 3
17
- insist { subject[0]["message"] } == "big"
18
- insist { subject[1]["message"] } == "bird"
19
- insist { subject[2]["message"] } == "sesame street"
17
+ insist { subject[0].get("message") } == "big"
18
+ insist { subject[1].get("message") } == "bird"
19
+ insist { subject[2].get("message") } == "sesame street"
20
20
  end
21
21
  end
22
22
 
@@ -31,9 +31,9 @@ describe LogStash::Filters::Split do
31
31
 
32
32
  sample "big\tbird\tsesame street" do
33
33
  insist { subject.length } == 3
34
- insist { subject[0]["message"] } == "big"
35
- insist { subject[1]["message"] } == "bird"
36
- insist { subject[2]["message"] } == "sesame street"
34
+ insist { subject[0].get("message") } == "big"
35
+ insist { subject[1].get("message") } == "bird"
36
+ insist { subject[2].get("message") } == "sesame street"
37
37
  end
38
38
  end
39
39
 
@@ -49,11 +49,11 @@ describe LogStash::Filters::Split do
49
49
  sample("custom" => "big\nbird\nsesame street", "do_not_touch" => "1\n2\n3") do
50
50
  insist { subject.length } == 3
51
51
  subject.each do |s|
52
- insist { s["do_not_touch"] } == "1\n2\n3"
52
+ insist { s.get("do_not_touch") } == "1\n2\n3"
53
53
  end
54
- insist { subject[0]["custom"] } == "big"
55
- insist { subject[1]["custom"] } == "bird"
56
- insist { subject[2]["custom"] } == "sesame street"
54
+ insist { subject[0].get("custom") } == "big"
55
+ insist { subject[1].get("custom") } == "bird"
56
+ insist { subject[2].get("custom") } == "sesame street"
57
57
  end
58
58
  end
59
59
 
@@ -69,16 +69,16 @@ describe LogStash::Filters::Split do
69
69
  sample("array" => ["big", "bird", "sesame street"], "untouched" => "1\n2\n3") do
70
70
  insist { subject.length } == 3
71
71
  subject.each do |s|
72
- insist { s["untouched"] } == "1\n2\n3"
72
+ insist { s.get("untouched") } == "1\n2\n3"
73
73
  end
74
- insist { subject[0]["array"] } == "big"
75
- insist { subject[1]["array"] } == "bird"
76
- insist { subject[2]["array"] } == "sesame street"
74
+ insist { subject[0].get("array") } == "big"
75
+ insist { subject[1].get("array") } == "bird"
76
+ insist { subject[2].get("array") } == "sesame street"
77
77
  end
78
78
 
79
79
  sample("array" => ["big"], "untouched" => "1\n2\n3") do
80
80
  insist { subject.is_a?(Logstash::Event) }
81
- insist { subject["array"] } == "big"
81
+ insist { subject.get("array") } == "big"
82
82
  end
83
83
  end
84
84
 
@@ -94,9 +94,9 @@ describe LogStash::Filters::Split do
94
94
 
95
95
  sample("array" => ["big", "bird", "sesame street"]) do
96
96
  insist { subject.length } == 3
97
- insist { subject[0]["element"] } == "big"
98
- insist { subject[1]["element"] } == "bird"
99
- insist { subject[2]["element"] } == "sesame street"
97
+ insist { subject[0].get("element") } == "big"
98
+ insist { subject[1].get("element") } == "bird"
99
+ insist { subject[2].get("element") } == "sesame street"
100
100
  end
101
101
  end
102
102
 
metadata CHANGED
@@ -1,44 +1,46 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-split
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
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-30 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-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 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
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,24 +61,24 @@ licenses:
59
61
  metadata:
60
62
  logstash_plugin: 'true'
61
63
  logstash_group: filter
62
- post_install_message:
64
+ post_install_message:
63
65
  rdoc_options: []
64
66
  require_paths:
65
67
  - lib
66
68
  required_ruby_version: !ruby/object:Gem::Requirement
67
69
  requirements:
68
- - - '>='
70
+ - - ">="
69
71
  - !ruby/object:Gem::Version
70
72
  version: '0'
71
73
  required_rubygems_version: !ruby/object:Gem::Requirement
72
74
  requirements:
73
- - - '>='
75
+ - - ">="
74
76
  - !ruby/object:Gem::Version
75
77
  version: '0'
76
78
  requirements: []
77
- rubyforge_project:
78
- rubygems_version: 2.4.5
79
- signing_key:
79
+ rubyforge_project:
80
+ rubygems_version: 2.5.1
81
+ signing_key:
80
82
  specification_version: 4
81
83
  summary: The split filter is for splitting multiline messages into separate events.
82
84
  test_files: