pubsub_client 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +4 -0
- data/lib/pubsub_client.rb +5 -0
- data/lib/pubsub_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f957900bdf24e83c57067bb4e1d21c0010bf0e7d6aacc45da639c2250c7fa1b4
|
4
|
+
data.tar.gz: 036d770cee6fa93d718bb5aa91236825eb8bfe510293a0e352c611c46645bed0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f52651a2b7b2f7279266a96850a84e4ca3639d454ce5f6fa437276b545c8c79e5d7fa99cddd760f9b0987c18739003eca20efbeadebe17e9fa794c042f8c3b5
|
7
|
+
data.tar.gz: 8157eaf01bef5317607e77b687f107fa3579a1a4b251bc8e6d4922a600d177274436a9302130642de2f6f8d86f9f79ca6f42bed5b3a973b92f52874194e68d92
|
data/CHANGELOG.txt
CHANGED
data/lib/pubsub_client.rb
CHANGED
@@ -5,6 +5,7 @@ require 'pubsub_client/publisher_factory'
|
|
5
5
|
module PubsubClient
|
6
6
|
Error = Class.new(StandardError)
|
7
7
|
ConfigurationError = Class.new(Error)
|
8
|
+
CredentialsError = Class.new(Error)
|
8
9
|
InvalidTopicError = Class.new(Error)
|
9
10
|
|
10
11
|
class << self
|
@@ -14,6 +15,10 @@ module PubsubClient
|
|
14
15
|
end
|
15
16
|
|
16
17
|
def publish(message, topic, &block)
|
18
|
+
unless ENV['GOOGLE_APPLICATION_CREDENTIALS']
|
19
|
+
raise CredentialsError, 'GOOGLE_APPLICATION_CREDENTIALS must be set'
|
20
|
+
end
|
21
|
+
|
17
22
|
@publisher_factory ||= PublisherFactory.new
|
18
23
|
@publisher_factory.build(topic).publish(message, &block)
|
19
24
|
end
|