fluent-plugin-gcloud-pubsub 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/fluent-plugin-gcloud-pubsub.gemspec +1 -1
- data/lib/fluent/plugin/out_gcloud_pubsub.rb +2 -1
- data/test/plugin/test_out_gcloud_pubsub.rb +24 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d878aabfbf2141b06cc3cb88ed30dc9fd489489
|
4
|
+
data.tar.gz: 3afc6cd5e1526c59ff1790be228b34b790c82257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/)
|
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
|
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.
|
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
|
@@ -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
|
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.
|
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-
|
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
|