fluent-plugin-geoblipper 0.0.3.1 → 0.0.3.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
Gem::Specification.new do |gem|
|
3
3
|
gem.name = "fluent-plugin-geoblipper"
|
4
|
-
gem.version = "0.0.3.
|
4
|
+
gem.version = "0.0.3.2"
|
5
5
|
gem.authors = ["Sean Dick", "Change.org"]
|
6
6
|
gem.email = ["sean@change.org"]
|
7
7
|
gem.homepage = "https://github.com/seanmdick/fluent-plugin-geoblipper"
|
@@ -13,7 +13,6 @@ class Fluent::GeoBlipperOutput < Fluent::BufferedOutput
|
|
13
13
|
config_param :geodata_location, :string
|
14
14
|
config_param :max_entries, :integer, :default => -1
|
15
15
|
config_param :ip_key, :string, :default => 'ip'
|
16
|
-
config_param :extra_capture, :array, :default => []
|
17
16
|
|
18
17
|
def start
|
19
18
|
super
|
@@ -25,11 +24,8 @@ class Fluent::GeoBlipperOutput < Fluent::BufferedOutput
|
|
25
24
|
address = record[@ip_key]
|
26
25
|
loc = @geodata.city(address)
|
27
26
|
extra = {}
|
28
|
-
extra_capture.each do |key|
|
29
|
-
extra[key] = record[key]
|
30
|
-
end
|
31
27
|
if loc
|
32
|
-
{latitude: loc.latitude, longitude: loc.longitude}.
|
28
|
+
{latitude: loc.latitude, longitude: loc.longitude}.to_json + "\n"
|
33
29
|
else
|
34
30
|
""
|
35
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-geoblipper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.3.
|
4
|
+
version: 0.0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fluentd
|