pubsub_client 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82ac8b7b0bd3910b7e69b2f63bb08bffae388afe1b02a39bd6e3e8b05e35d76b
4
- data.tar.gz: 98a3e736fb8e58cb13e9daf6e0ffd15e2507bef1156fe5da90a61be0979a8314
3
+ metadata.gz: 03ba6e12917979bfedb1b0d4aeade60f2ce675c561e99d57ace0b0850abb0f24
4
+ data.tar.gz: e0628ab5d8c8183c95a1a438be7e32964870d891d7ded108bf5ce4eb10f63c5d
5
5
  SHA512:
6
- metadata.gz: e22163305a0f11e5f80326964df992ccd8b56235a434dd0ed7fe20ac81340bcb69cad77cafa4782b35017fec54b6897112cfa0feade5a891fef0aad88496ccad
7
- data.tar.gz: 8e6bbeadb5b6c604fd984990a317ec8faf630daa0b73605aeb4873686b461c6f2fefea5debddbf51ba42269bcf9e3b9e166e9535d214ea33c7248742034d38ac
6
+ metadata.gz: 4dafd9b8a6da6055d4d10bba716eb54d72fb6202b84ed693c090a9a53aa16c43ec6306fc641943f207da575bab6922fade8780536392f2f6c5231c7f88dc1558
7
+ data.tar.gz: 2f975bcc3d71fb66d9031be80929b0e709d0605e7596039274e4591b7ab36f83c5f70b67a49d4aebb2adac1a3d75588595bf787a2c4f7e1fdec45078f708d176
@@ -1,3 +1,8 @@
1
+ Version 1.5.0 2020-11-05
2
+ ------------------------
3
+ 6cab366 Do not require GAC when stubbed
4
+ dab08dd Update `Subscriber#on_error` documentation
5
+
1
6
  Version 1.4.1 2020-10-26
2
7
  ------------------------
3
8
  d28d99f Pass published attributes all the way through the client
data/README.md CHANGED
@@ -51,7 +51,7 @@ end
51
51
 
52
52
  To subscribe to a topic, a client must first get a handle to the subscriber object. After doing so, a call to `subscriber.listener` will yield two arguments: the data (most clients will only need this) and the full Pub/Sub message (for anything more robust). Documentation for the full message can be found [here](https://googleapis.dev/ruby/google-cloud-pubsub/latest/Google/Cloud/PubSub/ReceivedMessage.html).
53
53
 
54
- Optionally, a client can choose to handle exceptions raised by the subscriber. If a client chooses to do so, the listener **must** be configured before `on_error` since the latter needs a handler to the underlying listener.
54
+ Optionally, a client can choose to handle exceptions raised by the subscriber. If a client chooses to do so, the listener **must** be configured before `on_error` since the latter needs a handler to the underlying listener. Additionally, exceptions will only be raised when the work inside the block is happening on the same thread. For instance, if the block enqueues a background worker and that worker raises an error, it will not be handled by the `on_error` block.
55
55
 
56
56
  #### Example
57
57
  ```ruby
@@ -16,6 +16,7 @@ module PubsubClient
16
16
  raise ConfigurationError, 'PubsubClient is already configured' if @publisher_factory || @subscriber_factory
17
17
  @publisher_factory = NullPublisherFactory.new
18
18
  @subscriber_factory = NullSubscriberFactory.new
19
+ @stubbed = true
19
20
  end
20
21
 
21
22
  # @param message [String] The message to publish.
@@ -38,6 +39,7 @@ module PubsubClient
38
39
  private
39
40
 
40
41
  def ensure_credentials!
42
+ return if defined?(@stubbed) && @stubbed
41
43
  unless ENV['GOOGLE_APPLICATION_CREDENTIALS']
42
44
  raise CredentialsError, 'GOOGLE_APPLICATION_CREDENTIALS must be set'
43
45
  end
@@ -1,3 +1,3 @@
1
1
  module PubsubClient
2
- VERSION = '1.4.1'
2
+ VERSION = '1.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubsub_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apartment List Platforms
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-26 00:00:00.000000000 Z
11
+ date: 2020-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.1.4
121
+ rubygems_version: 3.0.8
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: Google Pub/Sub Wrapper