fluent-plugin-mongo 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.2
1
+ 0.5.3
@@ -60,7 +60,7 @@ class MongoOutput < BufferedOutput
60
60
  end
61
61
 
62
62
  def format(tag, time, record)
63
- record.to_msgpack
63
+ [time, record].to_msgpack
64
64
  end
65
65
 
66
66
  def write(chunk)
@@ -83,8 +83,8 @@ class MongoOutput < BufferedOutput
83
83
 
84
84
  def collect_records(chunk)
85
85
  records = []
86
- chunk.msgpack_each { |record|
87
- record[@time_key] = Time.at(record[@time_key]) if @include_time_key
86
+ chunk.msgpack_each { |time, record|
87
+ record[@time_key] = Time.at(time || record[@time_key]) if @include_time_key
88
88
  records << record
89
89
  }
90
90
  records
@@ -59,8 +59,8 @@ class MongoOutputTest < Test::Unit::TestCase
59
59
  time = Time.parse("2011-01-02 13:14:15 UTC").to_i
60
60
  d.emit({'a' => 1}, time)
61
61
  d.emit({'a' => 2}, time)
62
- d.expect_format({'a' => 1, d.instance.time_key => time}.to_msgpack)
63
- d.expect_format({'a' => 2, d.instance.time_key => time}.to_msgpack)
62
+ d.expect_format([time, {'a' => 1, d.instance.time_key => time}].to_msgpack)
63
+ d.expect_format([time, {'a' => 2, d.instance.time_key => time}].to_msgpack)
64
64
 
65
65
  d.run
66
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-mongo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-29 00:00:00.000000000Z
12
+ date: 2011-12-20 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd
16
- requirement: &2152833680 !ruby/object:Gem::Requirement
16
+ requirement: &2160411800 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.10.6
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2152833680
24
+ version_requirements: *2160411800
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mongo
27
- requirement: &2152832300 !ruby/object:Gem::Requirement
27
+ requirement: &2160411080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.4.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2152832300
35
+ version_requirements: *2160411080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &2152830900 !ruby/object:Gem::Requirement
38
+ requirement: &2160410520 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.9.2
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2152830900
46
+ version_requirements: *2160410520
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: simplecov
49
- requirement: &2152829560 !ruby/object:Gem::Requirement
49
+ requirement: &2160409960 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.5.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *2152829560
57
+ version_requirements: *2160409960
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rr
60
- requirement: &2152828480 !ruby/object:Gem::Requirement
60
+ requirement: &2160409500 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 1.0.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *2152828480
68
+ version_requirements: *2160409500
69
69
  description: MongoDB plugin for Fluent event collector
70
70
  email: repeatedly@gmail.com
71
71
  executables:
@@ -105,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  segments:
107
107
  - 0
108
- hash: -781444712173380703
108
+ hash: -744088123008270238
109
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  none: false
111
111
  requirements:
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  version: '0'
115
115
  segments:
116
116
  - 0
117
- hash: -781444712173380703
117
+ hash: -744088123008270238
118
118
  requirements: []
119
119
  rubyforge_project:
120
120
  rubygems_version: 1.8.10