fluent-plugin-gcloud-pubsub 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 567b6fb76121f3492d47a459a3de2a29d535afa6
4
- data.tar.gz: 290f0a7dab1ca7206083561df0645905dacd9cdc
3
+ metadata.gz: 8d878aabfbf2141b06cc3cb88ed30dc9fd489489
4
+ data.tar.gz: 3afc6cd5e1526c59ff1790be228b34b790c82257
5
5
  SHA512:
6
- metadata.gz: bf695bd0c8812e5bcb6dd1472a382b5617bff728be5827e01d2652c3a2fe84d37e10be7849ed2a5ec4e6ea9e4b74ac091bedca3055f2ff99f1cab849cacd5e62
7
- data.tar.gz: 4dd54deb86ccda01acd2258169ecadb6014f7e453366f06632ee28d74fe516ec94bd5d9f0ae867d70fac5c968a55fc6c73da08928679955b9a28d1708660e5d6
6
+ metadata.gz: fcf5cf434f2c383105e2c5cbef2d66774c73ccec45458847e16740dce51435e4f7536656b2c588ec83652821a5de7b9bc0d7b4834dba60279f20545e583709fa
7
+ data.tar.gz: 1bec29afa87de15cb29ccd1881a11ec82086696f25225a22156ca986955ad21efe78011759d599dc1eaaeb37d796f96e791543fcf2b81979be83f5a817aead2b
data/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # fluent-plugin-gcloud-pubsub
2
2
  [![Build Status](https://travis-ci.org/mdoi/fluent-plugin-gcloud-pubsub.svg?branch=master)](https://travis-ci.org/mdoi/fluent-plugin-gcloud-pubsub)
3
-
3
+ [![Gem Version](https://badge.fury.io/rb/fluent-plugin-gcloud-pubsub.svg)](http://badge.fury.io/rb/fluent-plugin-gcloud-pubsub)
4
4
 
5
5
  ## Overview
6
- [Cloud Pub/Sub](https://cloud.google.com/pubsub/) Input/Output plugin for [Fluentd](http://www.fluentd.org/) using [gcloud](https://googlecloudplatform.github.io/gcloud-ruby/) gem
6
+ [Cloud Pub/Sub](https://cloud.google.com/pubsub/) Input/Output plugin for [Fluentd](http://www.fluentd.org/) with [gcloud](https://googlecloudplatform.github.io/gcloud-ruby/) gem
7
7
 
8
- - Publish BufferdOutput chunk into Cloud Pub/Sub using [batch publishing](http://googlecloudplatform.github.io/gcloud-ruby/docs/v0.2.0/Gcloud/Pubsub/Topic.html#method-i-publish)
8
+ - Publish BufferedOutput chunk into Cloud Pub/Sub with [batch publishing](http://googlecloudplatform.github.io/gcloud-ruby/docs/v0.2.0/Gcloud/Pubsub/Topic.html#method-i-publish)
9
9
  - [Pull](http://googlecloudplatform.github.io/gcloud-ruby/docs/v0.2.0/Gcloud/Pubsub/Subscription.html#method-i-pull) messages from Cloud Pub/Sub
10
10
 
11
11
  ## Preparation
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.license = "MIT"
8
8
  gem.homepage = "https://github.com/mdoi/fluent-plugin-gcloud-pubsub"
9
9
  gem.summary = gem.description
10
- gem.version = "0.0.1"
10
+ gem.version = "0.0.2"
11
11
  gem.authors = ["Masayuki DOI"]
12
12
  gem.email = "dotquasar@gmail.com"
13
13
  gem.has_rdoc = false
@@ -56,9 +56,10 @@ module Fluent
56
56
  end
57
57
  end
58
58
  end
59
- rescue
59
+ rescue => e
60
60
  log.error "unexpected error", :error=>$!.to_s
61
61
  log.error_backtrace
62
+ raise e
62
63
  end
63
64
  end
64
65
  end
@@ -2,11 +2,20 @@ require_relative "../test_helper"
2
2
 
3
3
 
4
4
  class GcloudPubSubOutputTest < Test::Unit::TestCase
5
+ DEFAULT_CONFIG = <<-EOC
6
+ type gcloud_pubsub
7
+ project project-test
8
+ topic topic-test
9
+ key key-test
10
+ flush_interval 1
11
+ EOC
12
+ ReRaisedError = Class.new(RuntimeError)
13
+
5
14
  def setup
6
15
  Fluent::Test.setup
7
16
  end
8
17
 
9
- def create_driver(conf=CONFIG)
18
+ def create_driver(conf)
10
19
  Fluent::Test::BufferedOutputTestDriver.new(Fluent::GcloudPubSubOutput).configure(conf)
11
20
  end
12
21
 
@@ -24,4 +33,18 @@ class GcloudPubSubOutputTest < Test::Unit::TestCase
24
33
  assert_equal('key-test', d.instance.key)
25
34
  assert_equal(1, d.instance.flush_interval)
26
35
  end
36
+
37
+ def test_re_raise_errors
38
+ d = create_driver(DEFAULT_CONFIG)
39
+ chunk = Fluent::MemoryBufferChunk.new('key', 'data')
40
+ client = Object.new
41
+ def client.publish
42
+ raise ReRaisedError
43
+ end
44
+ d.instance.instance_variable_set(:@client, client)
45
+
46
+ assert_raises ReRaisedError do
47
+ d.instance.write(chunk)
48
+ end
49
+ end
27
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-gcloud-pubsub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masayuki DOI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-21 00:00:00.000000000 Z
11
+ date: 2015-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.4.5
135
+ rubygems_version: 2.4.5.1
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Google Cloud Pub/Sub input/output plugin for Fluentd event collector