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 +4 -4
- data/.travis.yml +27 -0
- data/README.md +3 -1
- data/{fluent-plugin-docker-metrics.gemspec → fluent-plugin-kv-parser.gemspec} +3 -3
- data/test/test_kv_parser.rb +11 -2
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1a53deb399bffd47f49449f8bbfa63e03878e6d
|
4
|
+
data.tar.gz: b48b8a446f66993de9898882b338052edb72052d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
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
|
data/test/test_kv_parser.rb
CHANGED
@@ -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
|
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.
|
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:
|
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:
|
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:
|
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-
|
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
|
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.
|
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
|