fluent-plugin-filter-record-map 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce29ef6d804ade6ca4e6d5eb39d74a0506ffdc79
4
- data.tar.gz: 4194a0b3f618d69a50b64d5c2d3c29d2331f9b10
3
+ metadata.gz: 536ef4963255713fe2a3137ab4b5a81de8160e1c
4
+ data.tar.gz: 7207f79d05a8ca8867b0cf3518975a0b2bbef5d6
5
5
  SHA512:
6
- metadata.gz: 9ce0e805718845d26fdea057520868a9bf0431978c2a5f76af6082b54ac7809449b444c96821e0af96356b96f011b352c37583a250c2815b46e6b77d5f2c8ecd
7
- data.tar.gz: 5115736f7a6ebbff65108e885b11ee5110a1f1881a79816eb259cc25395bfce567171a198388a77ff9914a3460de548a8b188352d82d017cfd930b98c38e9175
6
+ metadata.gz: f05c4d00134652b26b2031ac08931de393d708d3c1c86ac56c1f7305b4f578f93f90b1d4b64090e008d05e49a37261fa3a23501ed82fa4c66d0d8556f841e88e
7
+ data.tar.gz: 27349276705e24c3b5ea1fc2f7cbd393f7bf42e2a0c9e0c2a1ac2e25a08f39df32552dcc30b6072949501e72102382792ebaf17122c37ade314fce26f8199c7a
@@ -13,9 +13,8 @@ module Fluent
13
13
  end
14
14
 
15
15
  class Context
16
- def context(tag, record)
16
+ def context(tag, record, hostname)
17
17
  tag_parts = tag.split('.')
18
- hostname = Socket.gethostname
19
18
  new_record = {}
20
19
  binding
21
20
  end
@@ -25,6 +24,7 @@ module Fluent
25
24
  super
26
25
  @context = Context.new
27
26
  @maps = []
27
+ @hostname = Socket.gethostname
28
28
 
29
29
  PARAM_INDICES.each do |i|
30
30
  expr = instance_variable_get("@map#{i}")
@@ -33,7 +33,7 @@ module Fluent
33
33
  end
34
34
 
35
35
  def filter(tag, time, record)
36
- bind = @context.context(tag, record)
36
+ bind = @context.context(tag, record, @hostname)
37
37
 
38
38
  @maps.each do |expr|
39
39
  eval(expr, bind)
@@ -1,3 +1,3 @@
1
1
  module FluentPluginFilterSimpleMap
2
- VERSION = "0.1.2"
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-filter-record-map
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
  - Genki Sugawara