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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0703f126a6eac67876b49932f9bd33cfc0e4cd1f19fcf4f455565d467aac2b8f
4
- data.tar.gz: 5d54a6509578faa5b9a0f15d2c479f0dbde28d381a1f5a74c081ae28b94c90a9
3
+ metadata.gz: '0579c871ec66305d9f1037bdcfdd8aa9815c74f98fde3c4be376f8e78975e812'
4
+ data.tar.gz: 48cb846634a158a0a471c85bff4e04a5ffc51e4d0452e991a887ee89f0eed708
5
5
  SHA512:
6
- metadata.gz: b92d90d643ae0f2a93a65be169615e41866f18944a86ae7361c8e3ad6e75033e1beb46deb51262dc65e3d06f8c47fdccedb25dc01fb5add50f113db2abbf2c72
7
- data.tar.gz: 75209dbe1c75c40740a4aebe5c188c3df8eb875ceb9fc72603d69b926cc5b9a1028520639f898ca2ca83b7c57148204dbc5b0a856ba1bedd52c1311c743a7ca9
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
- temp_file = "temp-wkt_#{event_uuid}.txt"
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
- if File.file?(temp_file)
53
- File.delete(temp_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.9'
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.9
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-05 00:00:00.000000000 Z
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