fluent-plugin-gcloud-pubsub-custom 0.1.0 → 0.1.1

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: d0d5b921e5457be93cc2d3c8876bd11aae90e41b
4
- data.tar.gz: f74e1e5ab85e31ee5090cc84ac6926136ad8eb8f
3
+ metadata.gz: 702ae45ef8246c99127824b67457c6bf2b8a7e15
4
+ data.tar.gz: 094ed9fbc03b448390e123328a835e6898c97e97
5
5
  SHA512:
6
- metadata.gz: 553e885ee97a831dffa3441e999865ff039e41e30803e2e0ec29ed7db71ffc178481a38c2dceaa86f965a2f1a484f539c2b671e8c74f842ec27cc7ef2c628bc1
7
- data.tar.gz: 39066e1bbca376d1c128dc2f6fa30de54d20fa7ee3b7b1eb795df6054d7f4f041877cd26e47a3043a03df411aecbdd90eee028e24a73491150f79d514675c497
6
+ metadata.gz: dc1f80d983a3cf20a3205778f0b97ad97a5c866f51f504daeaa7ef70952648d0cf3b20fd6270de4c576f49c2148bd83671c645adc5d3c4dc52c43fb0f8ca76cb
7
+ data.tar.gz: 6bd444101d59692f9f064fcbe518ac0c5483c47e860ec890e4625d0cb0b7848c3cd7911391a0e1273d1760129cd84cb962bfb4a80f4776a01e68f181c0c19b29
data/README.md CHANGED
@@ -118,6 +118,8 @@ Use `gcloud_pubsub` input plugin.
118
118
 
119
119
  ## ChangeLog
120
120
 
121
+ - Release 0.1.1 - 2016/08/27
122
+ - Bump up google-cloud-pubsub (gcloud-ruby) to 0.20
121
123
  - Release 0.1.0 - 2016/08/22
122
124
  - Use formatter / parser plugin and add format configuration
123
125
  - Bump up gcloud-ruby to 0.12
@@ -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 = "0.1.0"
10
+ gem.version = "0.1.1"
11
11
  gem.authors = ["Yoshihiro MIYAI"]
12
12
  gem.email = "msparrow17@gmail.com"
13
13
  gem.has_rdoc = false
@@ -17,7 +17,7 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ['lib']
18
18
 
19
19
  gem.add_runtime_dependency "fluentd", [">= 0.10.58", "< 2"]
20
- gem.add_runtime_dependency "gcloud", "~> 0.12"
20
+ gem.add_runtime_dependency "google-cloud-pubsub", "~> 0.20.0"
21
21
 
22
22
  gem.add_development_dependency "bundler"
23
23
  gem.add_development_dependency "rake"
@@ -1,4 +1,4 @@
1
- require 'gcloud'
1
+ require 'google/cloud'
2
2
 
3
3
  module Fluent
4
4
  module GcloudPubSub
@@ -6,7 +6,7 @@ module Fluent
6
6
 
7
7
  class Publisher
8
8
  def initialize(project, key, topic, autocreate_topic)
9
- pubsub = (Gcloud.new project, key).pubsub
9
+ pubsub = (Google::Cloud.new project, key).pubsub
10
10
 
11
11
  @client = pubsub.topic topic, autocreate: autocreate_topic
12
12
  raise Fluent::GcloudPubSub::Error.new "topic:#{topic} does not exist." if @client.nil?
@@ -23,8 +23,9 @@ module Fluent
23
23
 
24
24
  class Subscriber
25
25
  def initialize(project, key, topic, subscription)
26
- pubsub = (Gcloud.new project, key).pubsub
27
- @client = pubsub.subscription subscription
26
+ pubsub = (Google::Cloud.new project, key).pubsub
27
+ topic = pubsub.topic topic
28
+ @client = topic.subscription subscription
28
29
  raise Fluent::GcloudPubSub::Error.new "subscription:#{subscription} does not exist." if @client.nil?
29
30
  end
30
31
 
@@ -82,7 +82,7 @@ module Fluent
82
82
  end
83
83
 
84
84
  def convert_line_to_event(line, es)
85
- line.chomp! # remove \n
85
+ line = line.chomp # remove \n
86
86
  @parser.parse(line) { |time, record|
87
87
  if time && record
88
88
  es.add(time, record)
@@ -59,7 +59,7 @@ class GcloudPubSubOutputTest < Test::Unit::TestCase
59
59
  @publisher = mock!
60
60
  @pubsub_mock = mock!
61
61
  @gcloud_mock = mock!.pubsub { @pubsub_mock }
62
- stub(Gcloud).new { @gcloud_mock }
62
+ stub(Google::Cloud).new { @gcloud_mock }
63
63
  end
64
64
 
65
65
  test '"autocreate_topic" is enabled' do
@@ -80,7 +80,7 @@ class GcloudPubSubOutputTest < Test::Unit::TestCase
80
80
  @publisher = mock!
81
81
  @pubsub_mock = mock!.topic(anything, anything) { @publisher }
82
82
  @gcloud_mock = mock!.pubsub { @pubsub_mock }
83
- stub(Gcloud).new { @gcloud_mock }
83
+ stub(Google::Cloud).new { @gcloud_mock }
84
84
  end
85
85
 
86
86
  setup do
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: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshihiro MIYAI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-22 00:00:00.000000000 Z
11
+ date: 2016-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -31,19 +31,19 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2'
33
33
  - !ruby/object:Gem::Dependency
34
- name: gcloud
34
+ name: google-cloud-pubsub
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.12'
39
+ version: 0.20.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.12'
46
+ version: 0.20.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement