logstash-codec-line 3.0.7 → 3.0.8

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
  SHA256:
3
- metadata.gz: a9b636d4be5390300c7b3fd33df823eb9002823df3af8d02b1ced2790103820a
4
- data.tar.gz: df823ff3c67121a8cd89126bf3bc2b7df61843c03a82d5cb686023ede92bbf0c
3
+ metadata.gz: ede89249bd799450f671bdafe4f656af6a1a3eae02ddc8e89aaf5da2d05c31b9
4
+ data.tar.gz: d68b6321a731e5f12ed7fc0611184b889c5e8d21db5de21a07a3f47e093bf1e8
5
5
  SHA512:
6
- metadata.gz: afbd0da2bf5e3fec8f0cf45be012fee0a70d7b78f7092221adf989a46ef3ab3c5842340daca035caf30dbce1a561db7f05b30d72f4ee7069a00ef816a4adb601
7
- data.tar.gz: b974b5f8077ca89b11a640478286fc414405377b9ea624243050f33e5d191be2a0c5c9ca25a37b5014c8502905fb9595451bc5c0d9879cc7b0026bbac7c6c833
6
+ metadata.gz: c4c5a4a339dce5f9999c8348b18544105ce1a4aff600503de43b6c13798178bd8c1356035d8fc611cf930134fc4046472e8c10a0e0fae7f17bfbd53c74b4754a
7
+ data.tar.gz: ca390195b5396f1a69dc5b4d693d8aa61025af7a18b0d41fce1b06565310c2ed8c480d627bb6d38299ecb7a20ec4bd5a93c8fc8bdbf6acde163ddaa8d314aedb
@@ -1,3 +1,6 @@
1
+ ## 3.0.8
2
+ - Code cleanup. See https://github.com/logstash-plugins/logstash-codec-line/pull/15
3
+
1
4
  ## 3.0.7
2
5
  - Reverted thread safety fix and instead fixed udp input codec per worker. See https://github.com/logstash-plugins/logstash-codec-line/pull/14
3
6
 
@@ -27,7 +27,6 @@ class LogStash::Codecs::Line < LogStash::Codecs::Base
27
27
 
28
28
  MESSAGE_FIELD = "message".freeze
29
29
 
30
- public
31
30
  def register
32
31
  require "logstash/util/buftok"
33
32
  @buffer = FileWatch::BufferedTokenizer.new(@delimiter)
@@ -35,12 +34,10 @@ class LogStash::Codecs::Line < LogStash::Codecs::Base
35
34
  @converter.logger = @logger
36
35
  end
37
36
 
38
- public
39
37
  def decode(data)
40
38
  @buffer.extract(data).each { |line| yield LogStash::Event.new(MESSAGE_FIELD => @converter.convert(line)) }
41
- end # def decode
39
+ end
42
40
 
43
- public
44
41
  def flush(&block)
45
42
  remainder = @buffer.flush
46
43
  if !remainder.empty?
@@ -48,13 +45,8 @@ class LogStash::Codecs::Line < LogStash::Codecs::Base
48
45
  end
49
46
  end
50
47
 
51
- public
52
48
  def encode(event)
53
- if event.is_a? LogStash::Event and @format
54
- @on_event.call(event, event.sprintf(@format) + @delimiter)
55
- else
56
- @on_event.call(event, event.to_s + @delimiter)
57
- end
58
- end # def encode
59
-
60
- end # class LogStash::Codecs::Plain
49
+ encoded = @format ? event.sprintf(@format) : event.to_s
50
+ @on_event.call(event, encoded + @delimiter)
51
+ end
52
+ end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-line'
4
- s.version = '3.0.7'
4
+ s.version = '3.0.8'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Reads line-oriented text data"
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"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-line
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-15 00:00:00.000000000 Z
11
+ date: 2017-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement