fluent-plugin-filter-geoip 0.2.0 → 0.2.1

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: 6af5d9d9d7027e164b87e91b793baad6f2feecd4
4
- data.tar.gz: 1f82bceeab8a2a4111d245645636f704b5bbffc2
3
+ metadata.gz: 26a2463f0d98d68d9ea2ce3c184a34131a9522b1
4
+ data.tar.gz: 1105857bdef779c98cd65f8cd53190a4b7c02920
5
5
  SHA512:
6
- metadata.gz: 4796d4b9ebad60ccf9582eda74a0f63ea9f5a5d5060e39ffa479d87574a4b34ed769e3f9fd92d24449cd0e10fe4de4b7def362497c9fc0e8cdc1a3d3fad05a93
7
- data.tar.gz: 086f1ac37d6c7bad1634a18c478671746af33d50c078a690ff2476f372c4f5f1ec92a8c7201eb214084f506f1d30de6869d015ec640b987ee1505d09d09951ad
6
+ metadata.gz: 789ae5dc1c1b5d326705266f03c4025438720c4122e8526291eb81819fa32861644edccde13ed6e48ad4bc1dcb8cc540d8c796b91cfce32f79d1cfec9ce6c8ec
7
+ data.tar.gz: f12393c7400e8bda40919e5e45e5a41bff0b43ce30bdda67ef6d3ec8ec039e82e38030b8f52484e934347bbcc8ecd2a7ec71ba6caa6182e63b73824f0aea3e12
@@ -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.2.0"
7
+ spec.version = "0.2.1"
8
8
  spec.authors = ["Minoru Osuka"]
9
9
  spec.email = ["minoru.osuka@gmail.com"]
10
10
 
@@ -173,7 +173,12 @@ module Fluent
173
173
 
174
174
  if @subdivisions && geoip_hash.has_key?('subdivisions') then
175
175
  if @flatten then
176
- record.merge!(to_flatten(geoip_hash['subdivisions'], [@field_prefix, 'subdivisions'], @field_delimiter))
176
+ i = 0
177
+ geoip_hash['subdivisions'].each do |subdivision|
178
+ record.merge!(to_flatten(subdivision, [@field_prefix, 'subdivisions', i.to_s], @field_delimiter))
179
+ i = i + 1
180
+ end
181
+ #record.merge!(to_flatten(geoip_hash['subdivisions'], [@field_prefix, 'subdivisions'], @field_delimiter))
177
182
  else
178
183
  record[[@field_prefix, 'subdivisions'].join(@field_delimiter)] = geoip_hash['subdivisions'].to_json
179
184
  end
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minoru Osuka