fluent-plugin-filter-geoip 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fluent-plugin-filter-geoip.gemspec +1 -1
- data/lib/fluent/plugin/filter_geoip.rb +5 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486c0eaea288541dc8e8f1fb44c651aa22979dd5
|
4
|
+
data.tar.gz: aa88708061c48476208ab0b2d0afabb351670fd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ece9b9d918165337bb4896b8708fae36223a11b9de9254a55ae11420694799d6b400621ec9358ad396f2021683ddfb75c4455b035b7905b178b55753b2c429af
|
7
|
+
data.tar.gz: ec4db585b1d4d3c0103da848ccadde85c8c488465b2552d1e5072fc5cacc5e7ecb007298a9e59c7955a06487ba38753552581e74f6a7fbcfb9fdf4878653b655
|
@@ -298,16 +298,16 @@ module Fluent
|
|
298
298
|
subdivision_hash = {}
|
299
299
|
|
300
300
|
unless subdivision.code.nil? then
|
301
|
-
subdivision_hash['
|
301
|
+
subdivision_hash['code_%d' % [i]] = subdivision.code
|
302
302
|
end
|
303
303
|
unless subdivision.geoname_id.nil? then
|
304
|
-
subdivision_hash['
|
304
|
+
subdivision_hash['geoname_id_%d' % [i]] = subdivision.geoname_id
|
305
305
|
end
|
306
306
|
unless subdivision.iso_code.nil? then
|
307
|
-
subdivision_hash['
|
307
|
+
subdivision_hash['iso_code_%d' % [i]] = subdivision.iso_code
|
308
308
|
end
|
309
309
|
unless subdivision.name(@locale).nil? then
|
310
|
-
subdivision_hash['
|
310
|
+
subdivision_hash['name_%d' % [i]] = subdivision.name(@locale)
|
311
311
|
end
|
312
312
|
|
313
313
|
unless subdivision_hash.empty? then
|
@@ -319,10 +319,8 @@ module Fluent
|
|
319
319
|
|
320
320
|
unless subdivision_arry.empty? then
|
321
321
|
if @flatten then
|
322
|
-
i = 0
|
323
322
|
subdivision_arry.each do |subdivision|
|
324
|
-
record.merge!(to_flatten(subdivision, [@output_field, 'subdivisions'
|
325
|
-
i = i + 1
|
323
|
+
record.merge!(to_flatten(subdivision, [@output_field, 'subdivisions'], @field_delimiter))
|
326
324
|
end
|
327
325
|
else
|
328
326
|
record[@output_field].merge!({'subdivisions' => subdivision_arry})
|