fluent-plugin-gimbal-tranquility 0.4.0.t11 → 0.4.0.t20

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: 604da0c7db75be4e1f5ebc07d39eb03e4cfaec49
4
- data.tar.gz: 8d6d28e3a9205701a75fe0ff1cd4eddd939586cd
3
+ metadata.gz: 02f14def1ad674656a91e8a457f2027b15874916
4
+ data.tar.gz: bf2f3ac761f4fa8a151ac63a8fc056b9d235603e
5
5
  SHA512:
6
- metadata.gz: 4873601e278d0be258769dfe57b597d9e5fad51e51620e890b39561247afe94e861ad22072d6db690df57a973d60576eb45124388b7b712157cdc5593672e3bc
7
- data.tar.gz: dc59864a56c371885f06f43e2892da1b5a561d75f9a65d9e9c48512484d21884d14b873e5ba43222dd08bfc75f7bf6ab7e554c2d37eaf1a6cdaa6f963eb168cf
6
+ metadata.gz: f343f7f70ae9c75c0e6ef0070234e178de49039acdeaea9858539496e80b6a2ddda60ea7a7aeb76d966b7a2dd93c3b4fc33b2606bd7434466435b4da095d7ab6
7
+ data.tar.gz: 0f77605df9d43b46f47cd4bcd76d0b0039715da1d0d822fb815159d97cb523bd7d3a60fdf28f34bfdc046b90cb80dda2fcfa7ef56c75d9a74619d9fc7213b5e2
@@ -4,35 +4,16 @@ module Fluent
4
4
  def call(_tag, _time, record)
5
5
  begin
6
6
  record.to_json + "\n"
7
- rescue Encoding::UndefinedConversionError => exc
8
- # record.force_encoding("ASCII-8BIT").encode('UTF-8').to_json
7
+ rescue Encoding::UndefinedConversionError
9
8
  puts
10
9
  puts "@@@@@@"
11
- puts "Exc: #{exc.message}"
12
- puts "Error: #{exc.message}\nRec: #{record}\nFixing..."
13
- # record.encode('UTF-8', 'UTF-8').to_json + "\n"
14
-
15
-
10
+ puts record
16
11
  record.each do |k, v|
17
- # record[k] = v.encode('UTF-8', 'UTF-8')
18
- record[k] = v.encode!(Encoding::UTF_8)
19
-
20
- # if (v.respond_to?(:to_utf8))
21
- # [ k, v.to_utf8 ]
22
- # elsif (v.respond_to?(:encoding))
23
- # [ k, v.dup.encode('UTF-8') ]
24
- # else
25
- # [ k, v ]
26
- # end
27
-
28
- # record[k] = v.encode('UTF-8', invalid: :replace, )
29
-
12
+ record[k] = v.force_encoding(Encoding::UTF_8)
30
13
  end
31
-
32
- puts "Fixed: #{record}"
14
+ puts record
33
15
  puts "@@@@@@"
34
16
  puts
35
-
36
17
  return record.to_json + "\n"
37
18
  end
38
19
  end
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
  module Tranquility
3
- VERSION = '0.4.0.t11'.freeze
3
+ VERSION = '0.4.0.t20'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-gimbal-tranquility
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.t11
4
+ version: 0.4.0.t20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Wiermann