fluent-plugin-kv-parser 0.0.1 → 0.0.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: 787237ea7e0cdfbefdef04d5190387575c51ebd9
4
- data.tar.gz: f20c58f82c89bbcd528757dbd82806610182df83
3
+ metadata.gz: a1a53deb399bffd47f49449f8bbfa63e03878e6d
4
+ data.tar.gz: b48b8a446f66993de9898882b338052edb72052d
5
5
  SHA512:
6
- metadata.gz: 40a7a05d055b54ef13fe08ad99bcf22bedc74970b65316659a39c8d677c5629f1985c514f39dcf1285d696ef1f0b38a916d4165ed53cd3d87cca12255d00adf0
7
- data.tar.gz: 56f423018fb7e35d05ec54acd524d5f33fccb25ef5f09a5f58c00f83189992eb30cfc3b3167349eaa23fb52f9e79152c025f75e24b473ca64f5187e1a450dd57
6
+ metadata.gz: bfbd9d1d28e82e52e2456efc88d523f8fc3d047b7c1584f00b4578e83264e1e3a84fc217299b279982354d51ab02f5ea7f631cc1712c8ed966109b9f7631a8a4
7
+ data.tar.gz: 51662d5ce07894a5d9b9d79d2914639ac58579e10ff0a4ad1469e4c402fd1a3f45193350626baf422d8ad679db022719992f536d10a32e953237b85c6bc89e5c
data/.travis.yml ADDED
@@ -0,0 +1,27 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ - 2.1
7
+ - ruby-head
8
+ - rbx-2
9
+
10
+ os:
11
+ - linux
12
+ - osx
13
+
14
+ branches:
15
+ only:
16
+ - master
17
+
18
+ gemfile:
19
+ - Gemfile
20
+
21
+ script: bundle exec rake
22
+
23
+ matrix:
24
+ allow_failures:
25
+ - rvm: ruby-head
26
+ - rvm: rbx-2
27
+
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Key-Value Pairs Parser Plugin for [Fluentd](https://github.com/fluent/fluentd)
2
2
 
3
+ <img src="https://travis-ci.org/kiyoto/fluent-plugin-kv-parser.svg?branch=master"/>
4
+
3
5
  ## Overview
4
6
 
5
7
  This is a parser plugin for Fluentd. Learn more about parser plugins [here](https://docs.fluentd.org/articles/parser-plugin-overview).
@@ -75,4 +77,4 @@ gives
75
77
 
76
78
  ## License
77
79
 
78
- Apache 2.0. Copyright Kiyoto Tamura
80
+ Apache 2.0. Copyright Kiyoto Tamura
@@ -4,13 +4,13 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "fluent-plugin-kv-parser"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.description = 'Fluentd parser plugin to parse key value pairs'
9
9
  spec.authors = ["kiyoto"]
10
10
  spec.email = ["kiyoto@treasure-data.com"]
11
11
  spec.summary = %q{Fluentd parser plugin to parse key value pairs}
12
12
  spec.homepage = "https://github.com/kiyoto/fluent-plugin-kv-parser"
13
- spec.license = "Apache License, Version 2.0"
13
+ spec.license = "Apache-2.0"
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.add_development_dependency "bundler", '~> 1.7'
21
21
  spec.add_development_dependency "rake", '~> 10.1'
22
- spec.add_runtime_dependency "fluentd", '~> 0.10'
22
+ spec.add_runtime_dependency "fluentd", '~> 0.10.0'
23
23
  end
@@ -26,13 +26,22 @@ module ParserTest
26
26
 
27
27
  def test_with_time
28
28
  parser = Fluent::TextParser::KVParser.new
29
- parser.configure("types" => "time:time:%Y-%m-%dT%H:%M:%S")
29
+ parser.configure("types" => "time:time")
30
30
  parser.parse("k1=foo time=1970-01-01T01:00:00") {|time, v|
31
31
  assert_equal(3600, time)
32
32
  assert_equal("foo", v["k1"])
33
33
  }
34
34
  end
35
35
 
36
+ def test_with_custom_time_key
37
+ parser = Fluent::TextParser::KVParser.new
38
+ parser.configure("time_key" => "my_time", "types" => "my_time:time")
39
+ parser.parse("k1=foo my_time=1970-01-01T01:00:00") {|time, v|
40
+ assert_equal(3600, time)
41
+ assert_equal("foo", v["k1"])
42
+ }
43
+ end
44
+
36
45
  def test_custom_delimiter
37
46
  parser = Fluent::TextParser::KVParser.new
38
47
  parser.configure("kv_delimiter" => "|")
@@ -54,4 +63,4 @@ module ParserTest
54
63
  end
55
64
 
56
65
  end
57
- end
66
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-kv-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kiyoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-17 00:00:00.000000000 Z
11
+ date: 2017-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.10'
47
+ version: 0.10.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.10'
54
+ version: 0.10.0
55
55
  description: Fluentd parser plugin to parse key value pairs
56
56
  email:
57
57
  - kiyoto@treasure-data.com
@@ -59,15 +59,16 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - ".travis.yml"
62
63
  - Gemfile
63
64
  - README.md
64
65
  - Rakefile
65
- - fluent-plugin-docker-metrics.gemspec
66
+ - fluent-plugin-kv-parser.gemspec
66
67
  - lib/fluent/plugin/parser_kv.rb
67
68
  - test/test_kv_parser.rb
68
69
  homepage: https://github.com/kiyoto/fluent-plugin-kv-parser
69
70
  licenses:
70
- - Apache License, Version 2.0
71
+ - Apache-2.0
71
72
  metadata: {}
72
73
  post_install_message:
73
74
  rdoc_options: []
@@ -85,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
86
  version: '0'
86
87
  requirements: []
87
88
  rubyforge_project:
88
- rubygems_version: 2.2.2
89
+ rubygems_version: 2.6.12
89
90
  signing_key:
90
91
  specification_version: 4
91
92
  summary: Fluentd parser plugin to parse key value pairs