logstash-filter-delta 1.1.1 → 1.1.2

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: 132cc1a08ac780dc9424d54d30e6fc2a25ad39b6
4
- data.tar.gz: b79f866548bcfeaeb45c5aaec01b3bbf65d3f712
3
+ metadata.gz: ac73217ed9118e57370361d42b5c8ffd59ff9c46
4
+ data.tar.gz: 8f0e57a8bd010d1d9693fb518f1dec879d17e01c
5
5
  SHA512:
6
- metadata.gz: f893a06853ca780deefe3cc78b127fb1a9d6cce5a0ba7b666b83a3bff4e5bc7bebccf0be4a0174e275dc01a117e15c0d477e2bf3c38c3921c2cc2362124e33e6
7
- data.tar.gz: bb6b7cb6427311e7b74ad80775150793906adf9b42891a90495115a696e0492f88af04448540a9e1763ce76b6f6f82f83f13701023f90f7869f414b5b9cf2e89
6
+ metadata.gz: 62297680f975e8573b8ba2705745918f97de8a8653ca8826aec1dde51e7dc207588e75d5db62581677a0b9cb067b76966c5d2b81eef2f1ff2fe7b8da41bb832e
7
+ data.tar.gz: 9f9e12dea29a845b397c668efe58ebacc4acb7a7c5426bf6c714b894693c3787a90446900698d8cb59fbd9702981f6b3845eddcc165dce73287ee1233e40e652
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.1.2
2
+ - Do not crash when receving fields with null value
3
+
1
4
  ## 1.1.1
2
5
  - Support Logstash API 1.0 only
3
6
 
data/CONTRIBUTORS CHANGED
@@ -2,8 +2,6 @@ The following is a list of people who have contributed ideas, code, bug
2
2
  reports, or in general have helped logstash along its way.
3
3
 
4
4
  Contributors:
5
- * Aaron Mildenstein (untergeek)
6
- * Pier-Hugues Pellerin (ph)
7
5
  * William Tisäter (tiwilliam)
8
6
 
9
7
  Note: If you've sent us patches, bug reports, or otherwise contributed to
@@ -38,6 +38,8 @@ class LogStash::Filters::Delta < LogStash::Filters::Base
38
38
  return Integer(value)
39
39
  rescue ArgumentError
40
40
  return Float(value)
41
+ rescue TypeError
42
+ raise ArgumentError
41
43
  end
42
44
  end
43
45
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-delta'
3
- s.version = '1.1.1'
3
+ s.version = '1.1.2'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "This filter helps you to calculate integer or float delta."
6
6
  s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using `logstash-plugin install logstash-filter-delta`. This gem is not a stand-alone program"
@@ -27,6 +27,21 @@ describe LogStash::Filters::Delta do
27
27
  expect(subject.get("output")).to eq(nil)
28
28
  expect(subject.get("tags")).to eq(["_deltafailure"])
29
29
  end
30
+
31
+ sample("start" => nil, "end" => 100) do
32
+ expect(subject.get("output")).to eq(nil)
33
+ expect(subject.get("tags")).to eq(["_deltafailure"])
34
+ end
35
+
36
+ sample("start" => 100, "end" => nil) do
37
+ expect(subject.get("output")).to eq(nil)
38
+ expect(subject.get("tags")).to eq(["_deltafailure"])
39
+ end
40
+
41
+ sample("start" => nil, "end" => nil) do
42
+ expect(subject.get("output")).to eq(nil)
43
+ expect(subject.get("tags")).to eq(["_deltafailure"])
44
+ end
30
45
  end
31
46
 
32
47
  describe "Test string casting" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-delta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Tisäter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-08 00:00:00.000000000 Z
11
+ date: 2016-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement