fluent-plugin-gcloud-pubsub-custom 1.3.1 → 1.3.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: f0a62386644d80eebb6214916876ea4fa93ee46c
4
- data.tar.gz: 83668024e715e68d105b538695754ee216bae8ec
3
+ metadata.gz: 4c1d001b87fc5d90ec9539e1fd22792b9d2cd45b
4
+ data.tar.gz: '0449660048a17af7b4a7626c28ecadee76852392'
5
5
  SHA512:
6
- metadata.gz: '01928a7bf6ed624164964f810630e30f85ddf1af2e7932ca8c72d8cc0463d9dab46c51abea3840048b7cef3ff5fdc3346891c810fa241732620914e49e8eae30'
7
- data.tar.gz: b81b1bfa75ef7bac2be76615b82d3a6a739657e71ea6913d104c8cc8bbe588497caea94dd0c4fa2d69c7a8ec2df7d419cb227ef6dbd8a1935260a2f9895ba6cc
6
+ metadata.gz: 8b2cc614e5bbdfd0923be3c300ccd4855b5f8598c1e89ed382c2f571529ac461a613f3c2f1404aca25141b6c6093c61c227aa6957e3fa99b04f5b0922ffe31a7
7
+ data.tar.gz: 3126f3675aadcfbdb06f04d0abbb104d30fc2f5ec593af7cc974839cf9d13e3407ee26cb80c11b6443e46febeb4bbd57fa12ae2bdbb5cdcd8d655d3b59d7ada8
@@ -1,11 +1,9 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.1
5
- - 2.2
6
- - 2.3.6
7
- - 2.4.3
8
- - 2.5.0
4
+ - 2.4.6
5
+ - 2.5.5
6
+ - 2.6.3
9
7
  - ruby-head
10
8
 
11
9
  gemfile:
@@ -1,5 +1,10 @@
1
1
  ## ChangeLog
2
2
 
3
+ ### Release 1.3.2 - 2019/08/16
4
+
5
+ - Input plugin
6
+ - Make `topic` parameter optional
7
+
3
8
  ### Release 1.3.1 - 2018/06/08
4
9
 
5
10
  - Input plugin
data/README.md CHANGED
@@ -133,8 +133,8 @@ Use `gcloud_pubsub` input plugin.
133
133
  - Set your credential file path.
134
134
  - Running fluentd on GCP, you can use scope instead of specifying this.
135
135
  - You can also use environment variable such as `GCLOUD_KEYFILE`.
136
- - `topic` (required)
137
- - Set topic name to pull.
136
+ - `topic` (optional)
137
+ - Set topic name that the subscription belongs to.
138
138
  - `subscription` (required)
139
139
  - Set subscription name to pull.
140
140
  - `max_messages` (optional, default: `100`)
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.license = "MIT"
8
8
  gem.homepage = "https://github.com/mia-0032/fluent-plugin-gcloud-pubsub-custom"
9
9
  gem.summary = gem.description
10
- gem.version = "1.3.1"
10
+ gem.version = "1.3.2"
11
11
  gem.authors = ["Yoshihiro MIYAI"]
12
12
  gem.email = "msparrow17@gmail.com"
13
13
  gem.has_rdoc = false
@@ -59,8 +59,12 @@ module Fluent
59
59
  class Subscriber
60
60
  def initialize(project, key, topic_name, subscription_name)
61
61
  pubsub = Google::Cloud::Pubsub.new project_id: project, credentials: key
62
- topic = pubsub.topic topic_name
63
- @client = topic.subscription subscription_name
62
+ if topic_name.nil?
63
+ @client = pubsub.subscription subscription_name
64
+ else
65
+ topic = pubsub.topic topic_name
66
+ @client = topic.subscription subscription_name
67
+ end
64
68
  raise Error.new "subscription:#{subscription_name} does not exist." if @client.nil?
65
69
  end
66
70
 
@@ -26,7 +26,7 @@ module Fluent::Plugin
26
26
  desc 'Set your credential file path.'
27
27
  config_param :key, :string, default: nil
28
28
  desc 'Set topic name to pull.'
29
- config_param :topic, :string
29
+ config_param :topic, :string, default: nil
30
30
  desc 'Set subscription name to pull.'
31
31
  config_param :subscription, :string
32
32
  desc 'Pulling messages by intervals of specified seconds.'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-gcloud-pubsub-custom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshihiro MIYAI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-08 00:00:00.000000000 Z
11
+ date: 2019-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd