logstash-core-event 2.3.1.snapshot1-java → 2.3.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/string_interpolation.rb +8 -2
- data/lib/logstash-core-event/version.rb +1 -1
- data/spec/logstash/event_spec.rb +31 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b23f7111be5ef91078825cbc6b902a74a2ca8d3
|
4
|
+
data.tar.gz: ccaae94c1469f909482be460847189ec6a5c2390
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a973ef9e917e55f96e0e234ab6f71c25ca0c1b0a271e28ac405cbeabd44ed3f065284df7d0595d4aa6f75a64cb4a74fa78a3dcbeb246518fec6ffb938f84f5f0
|
7
|
+
data.tar.gz: 10012913ae726ae73747b84268ee60f5a94a0b25d84d4b628c0529ce62efb85e743a9bc8d4e3cb8c94cb5fa90e34b33f0ef0e2b2c6886ba1da5dc38dd20eddc3
|
@@ -124,9 +124,15 @@ module LogStash
|
|
124
124
|
value.join(",")
|
125
125
|
when Hash
|
126
126
|
LogStash::Json.dump(value)
|
127
|
+
when Numeric
|
128
|
+
value
|
129
|
+
when TrueClass
|
130
|
+
value
|
131
|
+
when FalseClass
|
132
|
+
value
|
127
133
|
else
|
128
|
-
#
|
129
|
-
#
|
134
|
+
# If we dont know how to deal with the type we return a string
|
135
|
+
# to make sure we don't return a reference.
|
130
136
|
"#{value}"
|
131
137
|
end
|
132
138
|
end
|
data/spec/logstash/event_spec.rb
CHANGED
@@ -82,12 +82,40 @@ describe LogStash::Event do
|
|
82
82
|
expect(event["reference_test"]).not_to eq(data)
|
83
83
|
end
|
84
84
|
|
85
|
-
|
85
|
+
# TODO: This was a bug and should only be true in the context of 2.3.X
|
86
|
+
# see https://github.com/elastic/logstash/issues/5114 for more details.
|
87
|
+
it "should return a Fixnum" do
|
86
88
|
data = 1
|
87
89
|
event = LogStash::Event.new({ "reference" => data })
|
88
90
|
LogStash::Util::Decorators.add_fields({"reference_test" => "%{reference}"}, event, "dummy-plugin")
|
89
|
-
|
90
|
-
|
91
|
+
expect(event["reference_test"]).to eq(1)
|
92
|
+
end
|
93
|
+
|
94
|
+
# TODO: This was a bug and should only be true in the context of 2.3.X
|
95
|
+
# see https://github.com/elastic/logstash/issues/5114 for more details.
|
96
|
+
it "should return a Float" do
|
97
|
+
data = 1.999
|
98
|
+
event = LogStash::Event.new({ "reference" => data })
|
99
|
+
LogStash::Util::Decorators.add_fields({"reference_test" => "%{reference}"}, event, "dummy-plugin")
|
100
|
+
expect(event["reference_test"]).to eq(1.999)
|
101
|
+
end
|
102
|
+
|
103
|
+
# TODO: This was a bug and should only be true in the context of 2.3.X
|
104
|
+
# see https://github.com/elastic/logstash/issues/5114 for more details.
|
105
|
+
it "should return true" do
|
106
|
+
data = true
|
107
|
+
event = LogStash::Event.new({ "reference" => data })
|
108
|
+
LogStash::Util::Decorators.add_fields({"reference_test" => "%{reference}"}, event, "dummy-plugin")
|
109
|
+
expect(event["reference_test"]).to be_kind_of(TrueClass)
|
110
|
+
end
|
111
|
+
|
112
|
+
# TODO: This was a bug and should only be true in the context of 2.3.X
|
113
|
+
# see https://github.com/elastic/logstash/issues/5114 for more details.
|
114
|
+
it "should return false" do
|
115
|
+
data = false
|
116
|
+
event = LogStash::Event.new({ "reference" => data })
|
117
|
+
LogStash::Util::Decorators.add_fields({"reference_test" => "%{reference}"}, event, "dummy-plugin")
|
118
|
+
expect(event["reference_test"]).to be_kind_of(FalseClass)
|
91
119
|
end
|
92
120
|
|
93
121
|
it "should report a unix timestamp for %{+%s}" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-core-event
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: The core event component of logstash, the scalable log and event management tool
|
14
14
|
email:
|
@@ -38,17 +38,17 @@ require_paths:
|
|
38
38
|
- lib
|
39
39
|
required_ruby_version: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - '>='
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - '>='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version:
|
48
|
+
version: '0'
|
49
49
|
requirements: []
|
50
50
|
rubyforge_project:
|
51
|
-
rubygems_version: 2.4.
|
51
|
+
rubygems_version: 2.4.5
|
52
52
|
signing_key:
|
53
53
|
specification_version: 4
|
54
54
|
summary: logstash-core-event - The core event component of logstash
|