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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2a57f588b7e2d42cbd09351534106951450cba7
4
- data.tar.gz: 9bcad934b659525194d165664e06fa87196e9b11
3
+ metadata.gz: 486c0eaea288541dc8e8f1fb44c651aa22979dd5
4
+ data.tar.gz: aa88708061c48476208ab0b2d0afabb351670fd3
5
5
  SHA512:
6
- metadata.gz: ddb690229c803f1ada3479f9313bd325074eabc778698e5787cf2a494839a84ac2aac0358e03880ba381366c23db89738ba644fcc23b50982ec8f890170f1db5
7
- data.tar.gz: adef0e6bac3b902ec836335de51d85f0c97f3911fa6f6a4fe36f0da6f2a4cbee7cfa97b764c6524dc353144598c07a0d3b2c1d140451bac3d1960c9548976582
6
+ metadata.gz: ece9b9d918165337bb4896b8708fae36223a11b9de9254a55ae11420694799d6b400621ec9358ad396f2021683ddfb75c4455b035b7905b178b55753b2c429af
7
+ data.tar.gz: ec4db585b1d4d3c0103da848ccadde85c8c488465b2552d1e5072fc5cacc5e7ecb007298a9e59c7955a06487ba38753552581e74f6a7fbcfb9fdf4878653b655
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-filter-geoip"
7
- spec.version = "0.5.1"
7
+ spec.version = "0.5.2"
8
8
  spec.authors = ["Minoru Osuka"]
9
9
  spec.email = ["minoru.osuka@gmail.com"]
10
10
 
@@ -298,16 +298,16 @@ module Fluent
298
298
  subdivision_hash = {}
299
299
 
300
300
  unless subdivision.code.nil? then
301
- subdivision_hash['code'] = subdivision.code
301
+ subdivision_hash['code_%d' % [i]] = subdivision.code
302
302
  end
303
303
  unless subdivision.geoname_id.nil? then
304
- subdivision_hash['geoname_id'] = subdivision.geoname_id
304
+ subdivision_hash['geoname_id_%d' % [i]] = subdivision.geoname_id
305
305
  end
306
306
  unless subdivision.iso_code.nil? then
307
- subdivision_hash['iso_code'] = subdivision.iso_code
307
+ subdivision_hash['iso_code_%d' % [i]] = subdivision.iso_code
308
308
  end
309
309
  unless subdivision.name(@locale).nil? then
310
- subdivision_hash['name'] = subdivision.name(@locale)
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', i.to_s], @field_delimiter))
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})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-filter-geoip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minoru Osuka