fluent-plugin-redshift-out 0.4.0 → 0.4.1

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: 5b20d3794db1fa89bcd3023c16a7521da561463d
4
- data.tar.gz: c07149ac3e5cf6978b7ccd6b72becb7407274d88
3
+ metadata.gz: 28c952d81280b2ad7696326e84915b86cabdb6bc
4
+ data.tar.gz: 5610f078618641fd172df3444297dd4c0edd0909
5
5
  SHA512:
6
- metadata.gz: fea913edcc8f21adf6e7c9b9068b9ae0830fc2813fe0b37640b868dcff1dbdb45fb55566f8a1e9c2e6acf59dfb3a1511105181941523811238aa98a36ddbc56b
7
- data.tar.gz: 775d3b77816faa0c010e3f3eef54cec753f2ed12704bc1c89ed890c2db7464d2b206ff25a40e20ce9b63ca82e193fe10691e229c0c86e4ef987c9c33090c8a41
6
+ metadata.gz: 0508d4e80c3d3c50e58a0ce6b73703cda84cc129c1ffd9ce4da5ffcc3c420554489194de7b6cb512ffb4f0435d90b6f59a772ea9366b5fb067581c759fc014b7
7
+ data.tar.gz: a2445027f4b587eb41ccccac7444069e9a55fa74ba0c5388c171fe2d46bbb4c80b566243b3e21f4b3c158a7f0baa7060645ed21398527df2095dc82600399144
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -81,6 +81,7 @@ class RedshiftOutput < BufferedOutput
81
81
  @s3 = AWS::S3.new(options)
82
82
  @bucket = @s3.buckets[@s3_bucket]
83
83
  @redshift_connection = RedshiftConnection.new(@db_conf)
84
+ @redshift_connection.connect_start
84
85
  end
85
86
 
86
87
  def format(tag, time, record)
@@ -289,6 +290,9 @@ class RedshiftOutput < BufferedOutput
289
290
  def initialize(db_conf)
290
291
  @db_conf = db_conf
291
292
  @connection = nil
293
+ ObjectSpace.define_finalizer(self) {
294
+ close()
295
+ }
292
296
  end
293
297
 
294
298
  attr_reader :db_conf
@@ -187,6 +187,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
187
187
  end
188
188
 
189
189
  def test_format_csv
190
+ setup_mocks("")
190
191
  d_csv = create_driver_no_write(CONFIG_CSV)
191
192
  emit_csv(d_csv)
192
193
  d_csv.expect_format RECORD_CSV_A['log'] + "\n"
@@ -194,6 +195,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
194
195
  d_csv.run
195
196
  end
196
197
  def test_format_tsv
198
+ setup_mocks("")
197
199
  d_tsv = create_driver_no_write(CONFIG_TSV)
198
200
  emit_tsv(d_tsv)
199
201
  d_tsv.expect_format RECORD_TSV_A['log'] + "\n"
@@ -201,6 +203,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
201
203
  d_tsv.run
202
204
  end
203
205
  def test_format_json
206
+ setup_mocks("")
204
207
  d_json = create_driver_no_write(CONFIG_JSON)
205
208
  emit_json(d_json)
206
209
  d_json.expect_format RECORD_JSON_A.to_msgpack
@@ -209,6 +212,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
209
212
  end
210
213
 
211
214
  def test_format_msgpack
215
+ setup_mocks("")
212
216
  d_msgpack = create_driver_no_write(CONFIG_MSGPACK)
213
217
  emit_msgpack(d_msgpack)
214
218
  d_msgpack.expect_format({ 'log' => RECORD_MSGPACK_A }.to_msgpack)
@@ -254,6 +258,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
254
258
  end
255
259
  end
256
260
  end
261
+ conn.should_receive(:connect_start)
257
262
  end
258
263
  end
259
264
 
@@ -485,6 +490,7 @@ class RedshiftOutputTest < Test::Unit::TestCase
485
490
  end
486
491
 
487
492
  def test_maintenance_mode
493
+ setup_mocks("")
488
494
  flexmock(File).should_receive(:exists?).with(MAINTENANCE_FILE_PATH_FOR_TEST).and_return(true)
489
495
 
490
496
  d_json = create_driver(CONFIG_JSON)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-redshift-out
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naohiro Sakuma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-28 00:00:00.000000000 Z
11
+ date: 2016-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  version: '0'
164
164
  requirements: []
165
165
  rubyforge_project:
166
- rubygems_version: 2.4.5.1
166
+ rubygems_version: 2.5.1
167
167
  signing_key:
168
168
  specification_version: 4
169
169
  summary: Amazon Redshift output plugin for Fluentd