fluent-plugin-record-reformer 0.2.10 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ ## 0.3.0 (2014/10/01)
2
+
3
+ Fixes:
4
+
5
+ * Fix to support camelCase record key name with `enable_ruby false`
6
+
1
7
  ## 0.2.10 (2014/09/22)
2
8
 
3
9
  Changes:
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "fluent-plugin-record-reformer"
6
- gem.version = "0.2.10"
6
+ gem.version = "0.3.0"
7
7
  gem.authors = ["Naotoshi Seo"]
8
8
  gem.email = "sonots@gmail.com"
9
9
  gem.homepage = "https://github.com/sonots/fluent-plugin-record-reformer"
@@ -155,7 +155,7 @@ module Fluent
155
155
  end
156
156
 
157
157
  def expand(str)
158
- str.gsub(/(\${[a-z_]+(\[-?[0-9]+\])?}|__[A-Z_]+__)/) {
158
+ str.gsub(/(\${[a-zA-Z_]+(\[-?[0-9]+\])?}|__[A-Z_]+__)/) {
159
159
  log.warn "record_reformer: unknown placeholder `#{$1}` found" unless @placeholders.include?($1)
160
160
  @placeholders[$1]
161
161
  }
@@ -259,21 +259,23 @@ describe Fluent::RecordReformerOutput do
259
259
  context "record with enable_ruby #{enable_ruby}" do
260
260
  let(:emit) do
261
261
  driver.run do
262
- driver.emit({'message' => '1'}, time.to_i)
263
- driver.emit({'message' => '2'}, time.to_i)
262
+ driver.emit({'message' => '1', 'eventType' => 'foo'}, time.to_i)
263
+ driver.emit({'message' => '2', 'eventType' => 'foo'}, time.to_i)
264
264
  end
265
265
  end
266
266
  let(:config) {%[
267
267
  tag tag
268
268
  enable_ruby #{enable_ruby}
269
269
  message bar ${message}
270
+ eventtype ${eventType}
271
+ remove_keys eventType
270
272
  ]}
271
273
  let(:tag) { 'prefix.test.tag.suffix' }
272
274
  let(:tag_parts) { tag.split('.') }
273
275
  before do
274
276
  Fluent::Engine.stub(:now).and_return(time)
275
- Fluent::Engine.should_receive(:emit).with("tag", time.to_i, { 'message' => "bar 1", })
276
- Fluent::Engine.should_receive(:emit).with("tag", time.to_i, { 'message' => "bar 2", })
277
+ Fluent::Engine.should_receive(:emit).with("tag", time.to_i, { 'message' => "bar 1", 'eventtype' => 'foo'})
278
+ Fluent::Engine.should_receive(:emit).with("tag", time.to_i, { 'message' => "bar 2", 'eventtype' => 'foo'})
277
279
  end
278
280
  it { emit }
279
281
  end
metadata CHANGED
@@ -1,83 +1,94 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-record-reformer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.3.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Naotoshi Seo
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-09-21 00:00:00.000000000 Z
12
+ date: 2014-09-30 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: fluentd
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - ">="
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: '0'
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - ">="
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0'
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: rake
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - ">="
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: '0'
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - ">="
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: '0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rspec
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
- - - ">="
51
+ - - ! '>='
46
52
  - !ruby/object:Gem::Version
47
53
  version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
- - - ">="
59
+ - - ! '>='
53
60
  - !ruby/object:Gem::Version
54
61
  version: '0'
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: pry
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
- - - ">="
67
+ - - ! '>='
60
68
  - !ruby/object:Gem::Version
61
69
  version: '0'
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
- - - ">="
75
+ - - ! '>='
67
76
  - !ruby/object:Gem::Version
68
77
  version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: pry-nav
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
- - - ">="
83
+ - - ! '>='
74
84
  - !ruby/object:Gem::Version
75
85
  version: '0'
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
- - - ">="
91
+ - - ! '>='
81
92
  - !ruby/object:Gem::Version
82
93
  version: '0'
83
94
  description: Fluentd plugin to add or replace fields of a event record
@@ -86,9 +97,9 @@ executables: []
86
97
  extensions: []
87
98
  extra_rdoc_files: []
88
99
  files:
89
- - ".gitignore"
90
- - ".rspec"
91
- - ".travis.yml"
100
+ - .gitignore
101
+ - .rspec
102
+ - .travis.yml
92
103
  - CHANGELOG.md
93
104
  - Gemfile
94
105
  - LICENSE
@@ -102,26 +113,33 @@ files:
102
113
  homepage: https://github.com/sonots/fluent-plugin-record-reformer
103
114
  licenses:
104
115
  - MIT
105
- metadata: {}
106
116
  post_install_message:
107
117
  rdoc_options: []
108
118
  require_paths:
109
119
  - lib
110
120
  required_ruby_version: !ruby/object:Gem::Requirement
121
+ none: false
111
122
  requirements:
112
- - - ">="
123
+ - - ! '>='
113
124
  - !ruby/object:Gem::Version
114
125
  version: '0'
126
+ segments:
127
+ - 0
128
+ hash: -981862289
115
129
  required_rubygems_version: !ruby/object:Gem::Requirement
130
+ none: false
116
131
  requirements:
117
- - - ">="
132
+ - - ! '>='
118
133
  - !ruby/object:Gem::Version
119
134
  version: '0'
135
+ segments:
136
+ - 0
137
+ hash: -981862289
120
138
  requirements: []
121
139
  rubyforge_project:
122
- rubygems_version: 2.2.2
140
+ rubygems_version: 1.8.23
123
141
  signing_key:
124
- specification_version: 4
142
+ specification_version: 3
125
143
  summary: Fluentd plugin to add or replace fields of a event record
126
144
  test_files:
127
145
  - spec/out_record_reformer_bench.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: ffbe7931997653ee415051eff4ca430c5fdbc632
4
- data.tar.gz: a6ffd10865335e3c91e75d69b20e412511ea320c
5
- SHA512:
6
- metadata.gz: eca2b0a0c6cb456e5c177c198cd7a69be88fcdfce008a400af9d99093b5e7a7a0a72168275edfecbd0ea432151dcecd16bcc50c3dd48d63bda3694ff6ebe43ec
7
- data.tar.gz: 28c39a08755b74263004f56a42750a1e5acdd077c2c568d317ce3d4e08d01fb6c762ec89b67305bb0309bc107d99ce337e1dfe5a064ebf92ef01f08b1abba0d9