pubsub_client 1.1.0 → 1.2.0

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
  SHA256:
3
- metadata.gz: 7da1c7755c4338934a7b0b9067b5dbc509cc11dbe9f22b046578048d23d3529b
4
- data.tar.gz: cab1c8f5d426d36805931f0e75fd6976a65812f5c9ab86b607a61596c1a5d8a9
3
+ metadata.gz: f957900bdf24e83c57067bb4e1d21c0010bf0e7d6aacc45da639c2250c7fa1b4
4
+ data.tar.gz: 036d770cee6fa93d718bb5aa91236825eb8bfe510293a0e352c611c46645bed0
5
5
  SHA512:
6
- metadata.gz: 68b17c969910bb8534ac1d904ea65d78997bac2d20f5992cecbc1c35ef4bc96f7c544662d63591efefddde3038912fda18e86401bca2669f07348baab4da4c1e
7
- data.tar.gz: 8529bb3c895d07054a2fa957c33fdb344a7fc2927a5a72448c37554066374afbd0de3c7223a8bcb2b9168accdad5d72a9e573e4331378829a901db8ad9b640b5
6
+ metadata.gz: 6f52651a2b7b2f7279266a96850a84e4ca3639d454ce5f6fa437276b545c8c79e5d7fa99cddd760f9b0987c18739003eca20efbeadebe17e9fa794c042f8c3b5
7
+ data.tar.gz: 8157eaf01bef5317607e77b687f107fa3579a1a4b251bc8e6d4922a600d177274436a9302130642de2f6f8d86f9f79ca6f42bed5b3a973b92f52874194e68d92
@@ -1,3 +1,7 @@
1
+ Version 1.2.0 2020-09-25
2
+ ------------------------
3
+ aede3ab Raise custom error if GOOGLE_APPLICATION_CREDENTIALS not set
4
+
1
5
  Version 1.1.0 2020-09-25
2
6
  ------------------------
3
7
  d3f8ed1 Throw error if topic does not exist
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PubsubClient
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubsub_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apartment List Platforms