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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ee65bd6910e19dc1bb6ee46051879c7bdc70147
4
- data.tar.gz: d102d31cab64fa745986eec5940795d52f2ad547
3
+ metadata.gz: 0b23f7111be5ef91078825cbc6b902a74a2ca8d3
4
+ data.tar.gz: ccaae94c1469f909482be460847189ec6a5c2390
5
5
  SHA512:
6
- metadata.gz: 7727e3deda03188b1f03e06e1a85eea0dc1f38ec264cac46b87c4d7a4ecb06c129fb531ee7e463c34cdd199c9ba0759197eb244304abe51ea46406973b1e1e30
7
- data.tar.gz: 2ba9f4d82e93b08feb31726fb043eaee7a521775a0a4e4ecdbf84df85f02f8ea4bd9b98d3ea6d3436893569d37358e9597b27c9f53242c6844426c0be8bc583b
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
- # Make sure we dont work on the refence of the value
129
- # The Java Event implementation was always returning a string.
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
@@ -5,4 +5,4 @@
5
5
  # Note to authors: this should not include dashes because 'gem' barfs if
6
6
  # you include a dash in the version string.
7
7
 
8
- LOGSTASH_CORE_EVENT_VERSION = "2.3.1.snapshot1"
8
+ LOGSTASH_CORE_EVENT_VERSION = "2.3.2"
@@ -82,12 +82,40 @@ describe LogStash::Event do
82
82
  expect(event["reference_test"]).not_to eq(data)
83
83
  end
84
84
 
85
- it "should not return a Fixnum reference" do
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
- data += 41
90
- expect(event["reference_test"]).to eq("1")
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.1.snapshot1
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-06 00:00:00.000000000 Z
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: 1.3.1
48
+ version: '0'
49
49
  requirements: []
50
50
  rubyforge_project:
51
- rubygems_version: 2.4.8
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