fluent-plugin-td 0.10.29 → 0.11.0.rc1

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: 910b18fb23795e9d27ff8ebeb6a382b61a5fe814
4
- data.tar.gz: 71d77ea864bde3c88e35a077aaed26a338d0e530
3
+ metadata.gz: d1ae29d128d90dd331b4cc446ea185179c1a0a33
4
+ data.tar.gz: 5d8ed306878be4384000dcee1f60e94cea1a591d
5
5
  SHA512:
6
- metadata.gz: fd18a7186e55f8fbd464382572a2b315886578661ca39bbcfdec63ebbe7a384beca2fb6287dc2870e66b469b9e47e7f7a293882bc41b98df74987e5f4abbbdf8
7
- data.tar.gz: 80157c8f89bd3c5f8340a5c47b4674e454cd22a04274c1fb4e5bcba19090105f1dc73530c7c9f1a333aea764c0269c9dccb59c30dbcca2bf7c80f40b4cb0473d
6
+ metadata.gz: d2a2dde68301f045c80edcedcd0deaa6830eab6f449cabc9c5c98fc698138396d7f1a2556bf93f771096eecd9b9bdc12bdf6d97b6f32476c93f13fb6ebca3860
7
+ data.tar.gz: dcc9909052e4b5450f80d29b8f222803c0f70ea84c6db3ae00582fb70ecd9fa94fe69185604d09ac11ea41b76553d6897212b51bf8ef0e147458d7138d486b69
@@ -1,9 +1,8 @@
1
1
  rvm:
2
- - 1.9.3
3
- - 2.0
4
2
  - 2.1
5
3
  - 2.2.4
6
4
  - 2.3.1
5
+ - 2.4.0
7
6
  - ruby-head
8
7
 
9
8
  gemfile:
@@ -19,7 +18,5 @@ matrix:
19
18
  allow_failures:
20
19
  - rvm: ruby-head
21
20
  exclude:
22
- - rvm: 1.9.3
23
- gemfile: Gemfile
24
- - rvm: 2.0
25
- gemfile: Gemfile
21
+ - rvm: 2.4.0
22
+ gemfile: Gemfile.v0.12
data/ChangeLog CHANGED
@@ -1,3 +1,10 @@
1
+ Release 0.11.0.rc1 - 2017/01/20
2
+
3
+ * Fix event time handling for v0.14
4
+ * Drop ruby 1.9/2.0, fluentd v0.10 and msgpack v0.4 support
5
+ * Update td-client dependency to v1.0
6
+
7
+
1
8
  Release 0.10.29 - 2016/07/06
2
9
 
3
10
  * Work with fluentd v0.14
@@ -1,6 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'json', '= 1.8.3'
3
+ gem 'json', '= 1.8.6'
4
4
  gem 'fluentd', '~> 0.12.0'
5
5
 
6
6
  gemspec
@@ -18,8 +18,8 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ['lib']
19
19
  gem.license = "Apache-2.0"
20
20
 
21
- gem.add_dependency "fluentd", [">= 0.10.27", "< 2"]
22
- gem.add_dependency "td-client", "~> 0.8.66"
21
+ gem.add_dependency "fluentd", [">= 0.12.0", "< 2"]
22
+ gem.add_dependency "td-client", "~> 1.0"
23
23
  gem.add_development_dependency "rake", ">= 0.9.2"
24
24
  gem.add_development_dependency "webmock", "~> 1.16"
25
25
  gem.add_development_dependency "test-unit", "~> 3.0.8"
@@ -119,14 +119,14 @@ module Fluent
119
119
  end
120
120
 
121
121
  def format_stream(tag, es)
122
- out = $use_msgpack_5 ? MessagePack::Buffer.new : ''.force_encoding('ASCII-8BIT') # this condition will be removed after removed msgpack v0.4 support
122
+ out = MessagePack::Buffer.new
123
123
  off = out.size # size is same as bytesize in ASCII-8BIT string
124
124
  es.each { |time, record|
125
125
  # Applications may send non-hash record or broken chunk may generate non-hash record so such records should be skipped
126
126
  next unless record.is_a?(Hash)
127
127
 
128
128
  begin
129
- record['time'] = time
129
+ record['time'] = time.to_i
130
130
  record.delete(:time) if record.has_key?(:time)
131
131
 
132
132
  if record.size > @key_num_limit
@@ -1,5 +1,5 @@
1
1
  module Fluent
2
2
  module TreasureDataPlugin
3
- VERSION = '0.10.29'
3
+ VERSION = '0.11.0.rc1'
4
4
  end
5
5
  end
@@ -117,6 +117,25 @@ class TreasureDataLogOutputTest < Test::Unit::TestCase
117
117
  d.run
118
118
  end
119
119
 
120
+ def test_emit_with_event_time
121
+ omit "EventTime is not implemented with current Fluentd version" unless Fluent.const_defined?('EventTime')
122
+
123
+ event_time_klass = Fluent.const_get('EventTime')
124
+
125
+ event_time = event_time_klass.now
126
+ d = create_driver
127
+ _time, records = stub_seed_values
128
+ database, table = d.instance.instance_variable_get(:@key).split(".", 2)
129
+ stub_td_table_create_request(database, table)
130
+ stub_td_import_request(stub_request_body(records, event_time.to_i), database, table)
131
+
132
+ _test_time, test_records = stub_seed_values
133
+ test_records.each { |record|
134
+ d.emit(record, event_time)
135
+ }
136
+ d.run
137
+ end
138
+
120
139
  def test_emit_with_time_symbole
121
140
  d = create_driver
122
141
  time, records = stub_seed_values
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-td
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.29
4
+ version: 0.11.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Treasure Data, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-06 00:00:00.000000000 Z
11
+ date: 2017-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.27
19
+ version: 0.12.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.10.27
29
+ version: 0.12.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2'
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.8.66
39
+ version: '1.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.8.66
46
+ version: '1.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -137,12 +137,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
- - - ">="
140
+ - - ">"
141
141
  - !ruby/object:Gem::Version
142
- version: '0'
142
+ version: 1.3.1
143
143
  requirements: []
144
144
  rubyforge_project:
145
- rubygems_version: 2.5.1
145
+ rubygems_version: 2.6.8
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: Treasure Data Cloud Data Service plugin for Fluentd