logstash-filter-wkt_repair 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/logstash/filters/wkt_repair.rb +8 -3
- data/logstash-filter-wkt_repair.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0579c871ec66305d9f1037bdcfdd8aa9815c74f98fde3c4be376f8e78975e812'
|
4
|
+
data.tar.gz: 48cb846634a158a0a471c85bff4e04a5ffc51e4d0452e991a887ee89f0eed708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bcfe5011198f7f9bbf997ec96d92659767b8f35542687a8f993dfda2581d366d613db4154d8dcde3c2ab733f3f1c71bd2c74e52527a6dd5807fc02b69a388d5
|
7
|
+
data.tar.gz: 1bd4df072f2cc6516ab7f296f29eae14bb540504464797a9db1772b57e5a0191bef961dd25b1e06aa5e9b041a8b474e448d36d15708b9f22eb86d6748bdb69b2
|
@@ -30,7 +30,8 @@ class LogStash::Filters::WktRepair < LogStash::Filters::Base
|
|
30
30
|
|
31
31
|
wkt = event.get(@source)
|
32
32
|
event_uuid = SecureRandom.uuid
|
33
|
-
|
33
|
+
random_hex = SecureRandom.hex(10)
|
34
|
+
temp_file = "temp-wkt_#{event_uuid}_#{random_hex}.txt"
|
34
35
|
|
35
36
|
begin
|
36
37
|
IO.write(temp_file, wkt)
|
@@ -49,8 +50,12 @@ class LogStash::Filters::WktRepair < LogStash::Filters::Base
|
|
49
50
|
@logger.error("WKT Repair Exception", :exception => e)
|
50
51
|
@tag_on_failure.each { |tag| event.tag(tag) }
|
51
52
|
ensure
|
52
|
-
|
53
|
-
File.
|
53
|
+
begin
|
54
|
+
if File.file?(temp_file)
|
55
|
+
File.delete(temp_file)
|
56
|
+
end
|
57
|
+
rescue Exception => e
|
58
|
+
@logger.error("WKT Repair Exception in ensure block", :exception => e)
|
54
59
|
end
|
55
60
|
end
|
56
61
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-filter-wkt_repair'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.10'
|
4
4
|
s.licenses = ['Apache-2.0']
|
5
5
|
s.summary = 'Logstash filter to repair a WKT shape data.'
|
6
6
|
s.description = 'It takes ambigous or ill-defined polygons and returns a coherent and clearly defined output.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-wkt_repair
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Silver Ibenye
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|