logstash-filter-date 3.1.1 → 3.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: 7e6adc825ee041eca0be67876519b71a2fa763e1
4
- data.tar.gz: e484d5652cd00ab7abef9190023609758f929723
3
+ metadata.gz: 23dc096d2329e51dc294d33a1e13c0d160c26270
4
+ data.tar.gz: 7ab94137df21d9bf1e66f2befca1308ecbf5af99
5
5
  SHA512:
6
- metadata.gz: f40d4bbc2ae12dfe4f5c174b1ed5e068c3c37be75799cec4bcf5fea00d501bfdbb57bdbbb21d65bf66f176adb10762c8b2295763c019dd1c42aa97e085986fdc
7
- data.tar.gz: 6f216bddf999095e5a197c25402471286dba5291b070f3b0795219c9b599b737913b29e4b94840e79bcb8f5402fcc27edd9ec8e70b4fa3f0908a9efe7d313c46
6
+ metadata.gz: df6a4a6db839b1472e9580848246a17e89196256edfea9123f07fb05be252eb0033dab2e71a757e9d46da77c7eea3609c1413fc46cc2e8c9778e3814e346f3fb
7
+ data.tar.gz: ca7e797bd82d5f13458d94ecbce72822f2ee2303cd7a55241fd84b79538d009b249069a180651e61be83bf9ceb8d61b79b96ffa875722330f9178ecbe125a168
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 3.1.3
2
+ - Fix bug where numbers from a JSON codec would result in a date parse failure. (#86, #89)
3
+
4
+ ## 3.1.2
5
+ - Docs: Fix date format used in examples
6
+
1
7
  ## 3.1.1
2
8
  - Fix problem in packaging of 3.1.0
3
9
 
@@ -49,8 +49,8 @@ class LogStash::Filters::Date < LogStash::Filters::Base
49
49
  #
50
50
  # If your time field has multiple possible formats, you can do this:
51
51
  # [source,ruby]
52
- # match => [ "logdate", "MMM dd YYY HH:mm:ss",
53
- # "MMM d YYY HH:mm:ss", "ISO8601" ]
52
+ # match => [ "logdate", "MMM dd yyyy HH:mm:ss",
53
+ # "MMM d yyyy HH:mm:ss", "ISO8601" ]
54
54
  #
55
55
  # The above will match a syslog (rfc3164) or `iso8601` timestamp.
56
56
  #
@@ -68,7 +68,7 @@ class LogStash::Filters::Date < LogStash::Filters::Base
68
68
  # [source,ruby]
69
69
  # filter {
70
70
  # date {
71
- # match => [ "logdate", "MMM dd YYYY HH:mm:ss" ]
71
+ # match => [ "logdate", "MMM dd yyyy HH:mm:ss" ]
72
72
  # }
73
73
  # }
74
74
  #
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-filter-date'
4
- s.version = '3.1.1'
4
+ s.version = '3.1.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The date filter is used for parsing dates from fields, and then using that date or timestamp as the logstash timestamp for the event."
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"
@@ -166,6 +166,15 @@ RUBY_ENGINE == "jruby" and describe LogStash::Filters::Date do
166
166
  insist { subject.get("mydate") } == "%{bad_value}"
167
167
  insist { subject.get("@timestamp") } != Time.iso8601("1970-01-01T00:00:00.000Z").utc
168
168
  end
169
+
170
+ # Regression test
171
+ # Support numeric values that come through the JSON parser. These numbers appear as BigDecimal
172
+ # instead of Float.
173
+ sample(LogStash::Json.load('{ "mydate": 1350414944.123456 }')) do
174
+ insist { subject.get("mydate") } == 1350414944.123456
175
+ p subject.to_hash
176
+ insist { subject.get("@timestamp").time } == Time.iso8601("2012-10-16T12:15:44.123-07:00").utc
177
+ end
169
178
  end
170
179
 
171
180
  describe "parsing with UNIX_MS" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-date
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-17 00:00:00.000000000 Z
11
+ date: 2017-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement