logstash-filter-csv 3.0.1 → 3.0.2

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: 4f69b0446abb512b0bfc284a817e5c3c2db7591b
4
- data.tar.gz: cd10cdb72aea6afe0c675d63f55c4a91c1534c68
3
+ metadata.gz: 2e2d4379b16ea4358cfffca7c0922024af7f2e80
4
+ data.tar.gz: fc2a74ee00ef3598a94765f142d0d21bea669f45
5
5
  SHA512:
6
- metadata.gz: e9f4c746a6e33857d056cb8b8f16265bf3f6780ac92893eb01447443d63974bfa28fbb882b1c43e966d85971d90f3ca6c6471d4280db6e4d62f892ecd56df254
7
- data.tar.gz: 15d82ca803255caaf7b01e9270446aac7b8a2a51587b93606162bc77045686ee856e352bf61c0582a12ca89fcb4f45010dd1dd45bf872e12600992cf3ab06993
6
+ metadata.gz: 56696d58d95c9703886e6ac1c8fd4e70851550d4cd8f3f38effacea4bd7f4360aee0544a05ae8348dc8ca59bd97ac8835ee9d18c34ab4e13c59ce833b5a5f496
7
+ data.tar.gz: b02418749ef7a9b5bd7dc9d1b5a4bbd10b39e266344c7ceb1983801757474e07fc70887a15b42a1a7699e455fcf0ecba473c72f60960565c81692153faa2b6c0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.0.2
2
+ - Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
3
+
1
4
  ## 3.0.1
2
5
  - Republish all the gems under jruby.
3
6
  ## 3.0.0
@@ -96,6 +96,13 @@ class LogStash::Filters::CSV < LogStash::Filters::Base
96
96
 
97
97
  # make sure @target is in the format [field name] if defined, i.e. surrounded by brakets
98
98
  @target = "[#{@target}]" if @target && @target !~ /^\[[^\[\]]+\]$/
99
+
100
+ # if the zero byte character is entered in the config, set the value
101
+ if (@quote_char == "\\x00")
102
+ @quote_char = "\x00"
103
+ end
104
+
105
+ @logger.debug? && @logger.debug("CSV parsing options", :col_sep => @separator, :quote_char => @quote_char)
99
106
  end
100
107
 
101
108
  def filter(event)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-csv'
4
- s.version = '3.0.1'
4
+ s.version = '3.0.2'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The CSV filter takes an event field containing CSV data, parses it, and stores it as individual fields (can optionally specify the names)."
7
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"
@@ -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", "~> 2.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
24
 
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  end
@@ -102,6 +102,20 @@ describe LogStash::Filters::CSV do
102
102
  expect(event.get("column3")).to eq('"sesame" street')
103
103
  end
104
104
  end
105
+
106
+ context "using a null as read from config" do
107
+ let(:doc) { 'big,bird,"sesame" street' }
108
+ let(:config) do
109
+ { "quote_char" => "\\x00" }
110
+ end
111
+
112
+ it "extract all the values" do
113
+ plugin.filter(event)
114
+ expect(event.get("column1")).to eq("big")
115
+ expect(event.get("column2")).to eq("bird")
116
+ expect(event.get("column3")).to eq('"sesame" street')
117
+ end
118
+ end
105
119
  end
106
120
 
107
121
  describe "given column names" do
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-10 00:00:00.000000000 Z
11
+ date: 2016-07-14 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
+ - !ruby/object:Gem::Version
18
+ version: '1.60'
19
+ - - "<="
17
20
  - !ruby/object:Gem::Version
18
- version: '2.0'
21
+ version: '2.99'
19
22
  name: logstash-core-plugin-api
20
23
  prerelease: false
21
24
  type: :runtime
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1.60'
30
+ - - "<="
25
31
  - !ruby/object:Gem::Version
26
- version: '2.0'
32
+ version: '2.99'
27
33
  - !ruby/object:Gem::Dependency
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
@@ -75,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
81
  version: '0'
76
82
  requirements: []
77
83
  rubyforge_project:
78
- rubygems_version: 2.4.8
84
+ rubygems_version: 2.6.3
79
85
  signing_key:
80
86
  specification_version: 4
81
87
  summary: The CSV filter takes an event field containing CSV data, parses it, and stores it as individual fields (can optionally specify the names).