adp-fluentd-plugin-gzip 0.0.2 → 0.0.6

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
  SHA256:
3
- metadata.gz: 4c5772ef43feedf8733be5960a18d6ca5f9068c580e2afa4c80dbd0475af89a3
4
- data.tar.gz: 37708dfa2ed4c7785c29551045e0b8d310eb3de51ebd2d6992e40322d766136b
3
+ metadata.gz: 5972aada761fe9fdf6104fbe0b961e44fff65e507cf6be08b6cfa9ba9857e296
4
+ data.tar.gz: f2a0c1020eeb7926e6f39dcb4f4c99547084f427835647c4e46c1347aad53b9b
5
5
  SHA512:
6
- metadata.gz: 7fc177a0c395ab613a1aac641bcce5b8341ae5a2083ae376494166416d977d53a198f6db9f7bb9b6ccc157f8608d4b9d44e8ff274b3bdd2b35c076d3b85d4028
7
- data.tar.gz: eead8f704d23ed6f7443c9b700e1df1adf1bd70448149e66076427b6e4c3d345668ed878faa05f39d594d1818dc1e5d12d6a9ad3470c1de30c9b9a2473c258f1
6
+ metadata.gz: f261798083024d9e3777e108aef24a2d181673954823226f8be8acd9c45f0cb4aa9135b0a0c8327e823ca426bbfab38532c007b71c8a57d93e4afb6ecf7efa49
7
+ data.tar.gz: 3ff89156b9b14a5ed67d78f70b736c43663347feaf373ef637dd463b554b35c1bcdd54eab71f81e90c54fe919c93025fd7ddcf9f59612b354fe1bf22f915000b
@@ -2,7 +2,7 @@ $:.push File.expand_path('../lib', __FILE__)
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "adp-fluentd-plugin-gzip"
5
- spec.version = "0.0.2"
5
+ spec.version = "0.0.6"
6
6
  spec.authors = ["Aleksander Dudek"]
7
7
  spec.email = ["aleksander.dudek@ringieraxelspringer.pl"]
8
8
 
@@ -1,25 +1,28 @@
1
1
  require 'fluent/plugin/parser'
2
2
  require 'zlib'
3
3
 
4
- module Fluent::Plugin
5
- class GzipParser < Parser
6
- Fluent::Plugin.register_parser('gzip', self)
4
+ module Fluent
5
+ module Plugin
6
+ class GzipParser < Parser
7
+ Plugin.register_parser('gzip', self)
7
8
 
8
- def configure(conf)
9
- super
10
- end
9
+ def configure(conf)
10
+ super
11
+ end
11
12
 
12
- def parse(text)
13
- logger.info "Text: #{text}"
14
- logger.info "After compression: #{compress(text)}"
15
- end
13
+ def parse(text)
14
+ log.info("Text: #{text}")
15
+ log.info("After compression: #{compress(text)}")
16
+ text
17
+ end
16
18
 
17
- def compress(string, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY)
18
- output = Stream.new
19
- gz = Zlib::GzipWriter.new(output, level, strategy)
20
- gz.write(string)
21
- gz.close
22
- output.string
19
+ def compress(string, level = Zlib::DEFAULT_COMPRESSION, strategy = Zlib::DEFAULT_STRATEGY)
20
+ output = Stream.new
21
+ gz = Zlib::GzipWriter.new(output, level, strategy)
22
+ gz.write(string)
23
+ gz.close
24
+ output.string
25
+ end
23
26
  end
24
27
  end
25
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adp-fluentd-plugin-gzip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksander Dudek