logstash-codec-plain 0.1.2 → 0.1.3

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: 62d0a51b6612e13be8bead357ca6b10d1bd79102
4
- data.tar.gz: 50afe39b06ee9c31cf0a2f1a6436c140c34ad4b4
3
+ metadata.gz: bfd6a9bab32554d34b1be1d6ec467abba3a6425c
4
+ data.tar.gz: 9cad94150a6c96f6cf1c06bb583d950e89938bb6
5
5
  SHA512:
6
- metadata.gz: 82426395c5d54a6c2c67e477b074fe5fcaee62105fa21dfdfa84efcf2acab97435fa10774c0574fe7dc7bf8d43a8e117271c9b789697f9d10c8da22aa2939b41
7
- data.tar.gz: b75549a6cf35e141618ba642ad0939b44d4c4344e8e36c733b53af6c53dc3884181a8240766ae35c513927a7b77ba6e4f15fe575bddb5a7d3738ebaf7f3c9b9f
6
+ metadata.gz: fc15456ec4fd54e33490bf3625cbafdd5570b54711ba052083a87a6432b8ba4c4336f79945723251ed4ff955bda8b21ed57d069f9fd44fd70954397ca24ecf38
7
+ data.tar.gz: 79c9c92b1671d33090c709e5d832410367352c575bb10bbae3bea2dbc96a84b409b25312f76d8e85d8729c689b127e553a818d47533440a035a714a82008cf0f
@@ -39,9 +39,9 @@ class LogStash::Codecs::Plain < LogStash::Codecs::Base
39
39
  public
40
40
  def encode(event)
41
41
  if event.is_a?(LogStash::Event) and @format
42
- @on_event.call(event.sprintf(@format))
42
+ @on_event.call(event, event.sprintf(@format))
43
43
  else
44
- @on_event.call(event.to_s)
44
+ @on_event.call(event, event.to_s)
45
45
  end
46
46
  end # def encode
47
47
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-plain'
4
- s.version = '0.1.2'
4
+ s.version = '0.1.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The plain codec is for plain text with no delimiting between events."
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/plugin install gemname. This gem is not a stand-alone program"
@@ -87,7 +87,7 @@ describe LogStash::Codecs::Plain do
87
87
  it "should return a plain text encoding" do
88
88
  event = LogStash::Event.new
89
89
  event["message"] = "Hello World."
90
- subject.on_event do |data|
90
+ subject.on_event do |event, data|
91
91
  insist { data } == event.to_s
92
92
  end
93
93
  subject.encode(event)
@@ -97,7 +97,7 @@ describe LogStash::Codecs::Plain do
97
97
  format = "%{[hello]} %{[something][fancy]}"
98
98
  codec = LogStash::Codecs::Plain.new("format" => format)
99
99
  event = LogStash::Event.new("hello" => "world", "something" => { "fancy" => 123 })
100
- codec.on_event do |data|
100
+ codec.on_event do |event, data|
101
101
  insist { data } == event.sprintf(format)
102
102
  end
103
103
  codec.encode(event)
metadata CHANGED
@@ -1,18 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-plain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elasticsearch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-19 00:00:00.000000000 Z
11
+ date: 2014-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: logstash
15
- version_requirements: !ruby/object:Gem::Requirement
14
+ requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - '>='
18
17
  - !ruby/object:Gem::Version
@@ -20,7 +19,10 @@ dependencies:
20
19
  - - <
21
20
  - !ruby/object:Gem::Version
22
21
  version: 2.0.0
23
- requirement: !ruby/object:Gem::Requirement
22
+ name: logstash
23
+ prerelease: false
24
+ type: :runtime
25
+ version_requirements: !ruby/object:Gem::Requirement
24
26
  requirements:
25
27
  - - '>='
26
28
  - !ruby/object:Gem::Version
@@ -28,22 +30,20 @@ dependencies:
28
30
  - - <
29
31
  - !ruby/object:Gem::Version
30
32
  version: 2.0.0
31
- prerelease: false
32
- type: :runtime
33
33
  - !ruby/object:Gem::Dependency
34
- name: logstash-devutils
35
- version_requirements: !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
36
35
  requirements:
37
36
  - - '>='
38
37
  - !ruby/object:Gem::Version
39
38
  version: '0'
40
- requirement: !ruby/object:Gem::Requirement
39
+ name: logstash-devutils
40
+ prerelease: false
41
+ type: :development
42
+ version_requirements: !ruby/object:Gem::Requirement
41
43
  requirements:
42
44
  - - '>='
43
45
  - !ruby/object:Gem::Version
44
46
  version: '0'
45
- prerelease: false
46
- type: :development
47
47
  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
48
48
  email: info@elasticsearch.com
49
49
  executables: []
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  requirements: []
81
81
  rubyforge_project:
82
- rubygems_version: 2.4.4
82
+ rubygems_version: 2.1.9
83
83
  signing_key:
84
84
  specification_version: 4
85
85
  summary: The plain codec is for plain text with no delimiting between events.