logstash-filter-wkt_to_geojson 0.1.2 → 0.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: 7137703d484089ebb77cc379e37046bf36a8d291
4
- data.tar.gz: f0b3bfdb561a681e0f56b31355cee90da825de33
3
+ metadata.gz: 54e0ecc2235b086ff5bb7a606a68a07f03ffe2a7
4
+ data.tar.gz: ede97773acfe9feec0364ea5703ef6e866adee28
5
5
  SHA512:
6
- metadata.gz: 6712fb46514d81f06a8885fa0e5e9210212070745906b8f21c87baecfed10f5fdeba6fcd765ae33d0d0a96cc5d3017638f3cb4f56ff1e708a34c397dc942ae59
7
- data.tar.gz: 1deb8aa8a0a36019003e8f2501e7b87f738bbf457a3c19e0158d2fc8ee28a13e2baabbd0b064892f047cc80aec738d0d450882986593c867bd39cf7414ceec10
6
+ metadata.gz: 79a103a7260a1cdb0158f938abc01085bf0178a95c5d2a6665d11921b9fc20e71139886a2da8e07ede69767ee6a305ca9703d291263890e9d07ccf7d4b830850
7
+ data.tar.gz: 2b9f3b05c9bb0e814712c8b264cc19f62fb9af236224bf548ff9eb614857479c6abb40f70931bac6bd2ef463799d63535513b538662e70565805e9a3651034c6
@@ -9,9 +9,9 @@ class LogStash::Filters::WktToGeojson < LogStash::Filters::Base
9
9
 
10
10
  config_name "wkt_to_geojson"
11
11
 
12
- config :field, :validate => :string, :required => true
12
+ config :source, :validate => :string, :required => true
13
13
  config :target, :validate => :string, :default => 'geo_json'
14
- config :tag_on_parse_failure, :validate => :array, :default => [ '_wkt_parse_failure' ]
14
+ config :tag_on_failure, :validate => :array, :default => [ '_wkt_parse_failure' ]
15
15
 
16
16
  public
17
17
  def register
@@ -20,7 +20,7 @@ class LogStash::Filters::WktToGeojson < LogStash::Filters::Base
20
20
  public
21
21
  def filter(event)
22
22
 
23
- wkt = event.get(@field)
23
+ wkt = event.get(@source)
24
24
 
25
25
  begin
26
26
  factory = GeoRuby::SimpleFeatures::GeometryFactory::new()
@@ -36,7 +36,7 @@ class LogStash::Filters::WktToGeojson < LogStash::Filters::Base
36
36
  rescue Exception => e
37
37
  @logger.error('WKT Parse Error',
38
38
  :wkt => wkt, :exception => e)
39
- @tag_on_parse_failure.each { |tag| event.tag(tag) }
39
+ @tag_on_failure.each { |tag| event.tag(tag) }
40
40
  end
41
41
 
42
42
  # filter_matched should go in the last line of our successful code
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-wkt_to_geojson'
3
- s.version = '0.1.2'
3
+ s.version = '0.1.3'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = 'Logstash filter to convert WKT geography shapes to GeoJSON.'
6
6
  s.homepage = 'https://github.com/kalmas/logstash-filter-wkt_to_geojson'
@@ -7,7 +7,7 @@ describe LogStash::Filters::WktToGeojson do
7
7
  let(:config) do <<-CONFIG
8
8
  filter {
9
9
  wkt_to_geojson {
10
- field => "geometry"
10
+ source => "geometry"
11
11
  }
12
12
  }
13
13
  CONFIG
@@ -22,7 +22,7 @@ describe LogStash::Filters::WktToGeojson do
22
22
  let(:config) do <<-CONFIG
23
23
  filter {
24
24
  wkt_to_geojson {
25
- field => "geometry"
25
+ source => "geometry"
26
26
  target => "geoff_jason"
27
27
  }
28
28
  }
@@ -39,7 +39,7 @@ describe LogStash::Filters::WktToGeojson do
39
39
  let(:config) do <<-CONFIG
40
40
  filter {
41
41
  wkt_to_geojson {
42
- field => "geometry"
42
+ source => "geometry"
43
43
  }
44
44
  }
45
45
  CONFIG
@@ -56,8 +56,8 @@ describe LogStash::Filters::WktToGeojson do
56
56
  let(:config) do <<-CONFIG
57
57
  filter {
58
58
  wkt_to_geojson {
59
- field => "geometry"
60
- tag_on_parse_failure => [ "oppsie" ]
59
+ source => "geometry"
60
+ tag_on_failure => [ "oppsie" ]
61
61
  }
62
62
  }
63
63
  CONFIG
@@ -74,7 +74,7 @@ describe LogStash::Filters::WktToGeojson do
74
74
  let(:config) do <<-CONFIG
75
75
  filter {
76
76
  wkt_to_geojson {
77
- field => "not_a_field"
77
+ source => "not_a_field"
78
78
  }
79
79
  }
80
80
  CONFIG
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-wkt_to_geojson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kalmas