google-cloud-pubsub 2.12.1 → 2.13.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/google/cloud/pubsub/subscription.rb +50 -0
- data/lib/google/cloud/pubsub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06c05b51b56c92420e68bd4decf6cbcf91f2027c572cb89302bcae505e6a3f5b
|
4
|
+
data.tar.gz: b2072f171d8fcf1e3d7506ef86c278b5d7d60faa4dbbb0092b16fe759e1d4245
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65446317085d8522281bbfbf84f923f6a6efa98342afd4ac4900995436ad57b91d11ce77498fda558d3f37de9fb540ac99bfd38d825bbc54267e2b0490c5c1ca
|
7
|
+
data.tar.gz: 5a421f55fd6f75449162b1c7fbba30e78bd99409a6af3e62861e9cf95e5de2699fdd76ae23dbd4806123086fa1f25077590313ddc36adeea9d9d993e34c01293
|
data/CHANGELOG.md
CHANGED
@@ -303,6 +303,56 @@ module Google
|
|
303
303
|
config.freeze
|
304
304
|
end
|
305
305
|
|
306
|
+
##
|
307
|
+
# Inspect the Subscription's bigquery configuration settings. The
|
308
|
+
# configuration can be changed by modifying the values in the method's
|
309
|
+
# block.
|
310
|
+
#
|
311
|
+
# @yield [bigquery_config] a block for modifying the bigquery configuration
|
312
|
+
# @yieldparam [Google::Cloud::PubSub::V1::BigQueryConfig] bigquery_config
|
313
|
+
#
|
314
|
+
# @return [Google::Cloud::PubSub::V1::BigQueryConfig]
|
315
|
+
#
|
316
|
+
# @example
|
317
|
+
# require "google/cloud/pubsub"
|
318
|
+
#
|
319
|
+
# pubsub = Google::Cloud::PubSub.new
|
320
|
+
#
|
321
|
+
# sub = pubsub.subscription "my-topic-sub"
|
322
|
+
# sub.bigquery_config.table #=> "my-project:dataset-id.table-id"
|
323
|
+
# sub.bigquery_config.use_topic_schema #=> true
|
324
|
+
# sub.bigquery_config.write_metadata #=> false
|
325
|
+
#
|
326
|
+
# @example Update the bigquery configuration by passing a block:
|
327
|
+
# require "google/cloud/pubsub"
|
328
|
+
#
|
329
|
+
# pubsub = Google::Cloud::PubSub.new
|
330
|
+
# sub = pubsub.subscription "my-subscription"
|
331
|
+
#
|
332
|
+
# sub.bigquery_config do |bc|
|
333
|
+
# bc.write_metadata = true
|
334
|
+
# bc.use_topic_schema = false
|
335
|
+
# end
|
336
|
+
#
|
337
|
+
def bigquery_config
|
338
|
+
ensure_service!
|
339
|
+
|
340
|
+
config = reference? ? Google::Cloud::PubSub::V1::BigQueryConfig.new : @grpc.bigquery_config
|
341
|
+
|
342
|
+
if block_given?
|
343
|
+
old_config = config.dup
|
344
|
+
yield config
|
345
|
+
new_config = config
|
346
|
+
|
347
|
+
if old_config != new_config # has the object been changed?
|
348
|
+
update_grpc = Google::Cloud::PubSub::V1::Subscription.new name: name, bigquery_config: new_config
|
349
|
+
@grpc = service.update_subscription update_grpc, :bigquery_config
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
config.freeze
|
354
|
+
end
|
355
|
+
|
306
356
|
##
|
307
357
|
# A hash of user-provided labels associated with this subscription.
|
308
358
|
# Labels can be used to organize and group subscriptions.See [Creating
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-pubsub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Moore
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|