google-cloud-run-client 1.3.0 → 1.4.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: 53e4842f0b0c2cecb561cdd206e4973cade13939b28a117fa239be6a5f4c164e
4
- data.tar.gz: 58d46ff642eccfb8e9af7bb190b81c7d8320effd5e4fa09f25ccd5ef4960053c
3
+ metadata.gz: 83ec48aa543fedbde16fe74a8448d07953af89eb4797dc06e4ab398825ee7aad
4
+ data.tar.gz: b3280abe889dcafdd7f6a0582979f8701bd1bc16c1cd806efba2d32b1e5c2ecd
5
5
  SHA512:
6
- metadata.gz: 797208b1a8365198b234ba142f20c6d3297cf73e54fbfd5c342010254156edd846c27bb58359a2662f003f5b7d0428d6b2f1211c2c10a9851462dfc136ae1a1f
7
- data.tar.gz: 65dfc0a6f6b772c5341fa37e7203cdb837f2d49d144219005dd5e4e51dde58e49c5da74c2045ff3745354514c1f131df004ec8bdf33119d45679290459088a28
6
+ metadata.gz: 84a2f8d4ed72ac9019b002b42007454779c9584f1a78a722f4997d99f6fab4bdb53e041c5e658c046376875bf72e67a373a6b99626044189b958e74146164176
7
+ data.tar.gz: f1795b28827c67601c1887c0155e2075a00035c0c740822d71a6afd8903c8abdc1f0f95ccbb1e5a2c858178f89138c5d5b2d2c5dea2d2bf9612d1ce56e4f8c81
data/README.md CHANGED
@@ -34,9 +34,39 @@ In order to use this library, you first need to go through the following steps:
34
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/run.googleapis.com)
35
35
  1. {file:AUTHENTICATION.md Set up authentication.}
36
36
 
37
+ ## Debug Logging
38
+
39
+ This library comes with opt-in Debug Logging that can help you troubleshoot
40
+ your application's integration with the API. When logging is activated, key
41
+ events such as requests and responses, along with data payloads and metadata
42
+ such as headers and client configuration, are logged to the standard error
43
+ stream.
44
+
45
+ **WARNING:** Client Library Debug Logging includes your data payloads in
46
+ plaintext, which could include sensitive data such as PII for yourself or your
47
+ customers, private keys, or other security data that could be compromising if
48
+ leaked. Always practice good data hygiene with your application logs, and follow
49
+ the principle of least access. Google also recommends that Client Library Debug
50
+ Logging be enabled only temporarily during active debugging, and not used
51
+ permanently in production.
52
+
53
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
54
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
55
+ list of client library gem names. This will select the default logging behavior,
56
+ which writes logs to the standard error stream. On a local workstation, this may
57
+ result in logs appearing on the console. When running on a Google Cloud hosting
58
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
59
+ results in logs appearing alongside your application logs in the
60
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
61
+
62
+ Debug logging also requires that the versioned clients for this service be
63
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
64
+ working, try updating the versioned clients in your bundle or installed gems:
65
+ [google-cloud-run-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest).
66
+
37
67
  ## Supported Ruby Versions
38
68
 
39
- This library is supported on Ruby 2.7+.
69
+ This library is supported on Ruby 3.0+.
40
70
 
41
71
  Google provides official support for Ruby versions that are actively supported
42
72
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -18,7 +18,7 @@ module Google
18
18
  module Cloud
19
19
  module Run
20
20
  module Client
21
- VERSION = "1.3.0"
21
+ VERSION = "1.4.0"
22
22
  end
23
23
  end
24
24
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the Builds service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::Run.builds_available?}.
65
+ #
61
66
  # ## About Builds
62
67
  #
63
68
  # Cloud Run Build Control Plane API
@@ -79,6 +84,37 @@ module Google
79
84
  service_module.const_get(:Client).new(&block)
80
85
  end
81
86
 
87
+ ##
88
+ # Determines whether the Builds service is supported by the current client.
89
+ # If true, you can retrieve a client object by calling {Google::Cloud::Run.builds}.
90
+ # If false, that method will raise an exception. This could happen if the given
91
+ # API version does not exist or does not support the Builds service,
92
+ # or if the versioned client gem needs an update to support the Builds service.
93
+ #
94
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
95
+ # Defaults to `:v2`.
96
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
97
+ # @return [boolean] Whether the service is available.
98
+ #
99
+ def self.builds_available? version: :v2, transport: :grpc
100
+ require "google/cloud/run/#{version.to_s.downcase}"
101
+ package_name = Google::Cloud::Run
102
+ .constants
103
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
104
+ .first
105
+ return false unless package_name
106
+ service_module = Google::Cloud::Run.const_get package_name
107
+ return false unless service_module.const_defined? :Builds
108
+ service_module = service_module.const_get :Builds
109
+ if transport == :rest
110
+ return false unless service_module.const_defined? :Rest
111
+ service_module = service_module.const_get :Rest
112
+ end
113
+ service_module.const_defined? :Client
114
+ rescue ::LoadError
115
+ false
116
+ end
117
+
82
118
  ##
83
119
  # Create a new client object for Executions.
84
120
  #
@@ -92,6 +128,11 @@ module Google
92
128
  # You can also specify a different transport by passing `:rest` or `:grpc` in
93
129
  # the `transport` parameter.
94
130
  #
131
+ # Raises an exception if the currently installed versioned client gem for the
132
+ # given API version does not support the given transport of the Executions service.
133
+ # You can determine whether the method will succeed by calling
134
+ # {Google::Cloud::Run.executions_available?}.
135
+ #
95
136
  # ## About Executions
96
137
  #
97
138
  # Cloud Run Execution Control Plane API.
@@ -113,6 +154,37 @@ module Google
113
154
  service_module.const_get(:Client).new(&block)
114
155
  end
115
156
 
157
+ ##
158
+ # Determines whether the Executions service is supported by the current client.
159
+ # If true, you can retrieve a client object by calling {Google::Cloud::Run.executions}.
160
+ # If false, that method will raise an exception. This could happen if the given
161
+ # API version does not exist or does not support the Executions service,
162
+ # or if the versioned client gem needs an update to support the Executions service.
163
+ #
164
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
165
+ # Defaults to `:v2`.
166
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
167
+ # @return [boolean] Whether the service is available.
168
+ #
169
+ def self.executions_available? version: :v2, transport: :grpc
170
+ require "google/cloud/run/#{version.to_s.downcase}"
171
+ package_name = Google::Cloud::Run
172
+ .constants
173
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
174
+ .first
175
+ return false unless package_name
176
+ service_module = Google::Cloud::Run.const_get package_name
177
+ return false unless service_module.const_defined? :Executions
178
+ service_module = service_module.const_get :Executions
179
+ if transport == :rest
180
+ return false unless service_module.const_defined? :Rest
181
+ service_module = service_module.const_get :Rest
182
+ end
183
+ service_module.const_defined? :Client
184
+ rescue ::LoadError
185
+ false
186
+ end
187
+
116
188
  ##
117
189
  # Create a new client object for Jobs.
118
190
  #
@@ -126,6 +198,11 @@ module Google
126
198
  # You can also specify a different transport by passing `:rest` or `:grpc` in
127
199
  # the `transport` parameter.
128
200
  #
201
+ # Raises an exception if the currently installed versioned client gem for the
202
+ # given API version does not support the given transport of the Jobs service.
203
+ # You can determine whether the method will succeed by calling
204
+ # {Google::Cloud::Run.jobs_available?}.
205
+ #
129
206
  # ## About Jobs
130
207
  #
131
208
  # Cloud Run Job Control Plane API.
@@ -147,6 +224,37 @@ module Google
147
224
  service_module.const_get(:Client).new(&block)
148
225
  end
149
226
 
227
+ ##
228
+ # Determines whether the Jobs service is supported by the current client.
229
+ # If true, you can retrieve a client object by calling {Google::Cloud::Run.jobs}.
230
+ # If false, that method will raise an exception. This could happen if the given
231
+ # API version does not exist or does not support the Jobs service,
232
+ # or if the versioned client gem needs an update to support the Jobs service.
233
+ #
234
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
235
+ # Defaults to `:v2`.
236
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
237
+ # @return [boolean] Whether the service is available.
238
+ #
239
+ def self.jobs_available? version: :v2, transport: :grpc
240
+ require "google/cloud/run/#{version.to_s.downcase}"
241
+ package_name = Google::Cloud::Run
242
+ .constants
243
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
244
+ .first
245
+ return false unless package_name
246
+ service_module = Google::Cloud::Run.const_get package_name
247
+ return false unless service_module.const_defined? :Jobs
248
+ service_module = service_module.const_get :Jobs
249
+ if transport == :rest
250
+ return false unless service_module.const_defined? :Rest
251
+ service_module = service_module.const_get :Rest
252
+ end
253
+ service_module.const_defined? :Client
254
+ rescue ::LoadError
255
+ false
256
+ end
257
+
150
258
  ##
151
259
  # Create a new client object for Revisions.
152
260
  #
@@ -160,6 +268,11 @@ module Google
160
268
  # You can also specify a different transport by passing `:rest` or `:grpc` in
161
269
  # the `transport` parameter.
162
270
  #
271
+ # Raises an exception if the currently installed versioned client gem for the
272
+ # given API version does not support the given transport of the Revisions service.
273
+ # You can determine whether the method will succeed by calling
274
+ # {Google::Cloud::Run.revisions_available?}.
275
+ #
163
276
  # ## About Revisions
164
277
  #
165
278
  # Cloud Run Revision Control Plane API.
@@ -181,6 +294,37 @@ module Google
181
294
  service_module.const_get(:Client).new(&block)
182
295
  end
183
296
 
297
+ ##
298
+ # Determines whether the Revisions service is supported by the current client.
299
+ # If true, you can retrieve a client object by calling {Google::Cloud::Run.revisions}.
300
+ # If false, that method will raise an exception. This could happen if the given
301
+ # API version does not exist or does not support the Revisions service,
302
+ # or if the versioned client gem needs an update to support the Revisions service.
303
+ #
304
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
305
+ # Defaults to `:v2`.
306
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
307
+ # @return [boolean] Whether the service is available.
308
+ #
309
+ def self.revisions_available? version: :v2, transport: :grpc
310
+ require "google/cloud/run/#{version.to_s.downcase}"
311
+ package_name = Google::Cloud::Run
312
+ .constants
313
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
314
+ .first
315
+ return false unless package_name
316
+ service_module = Google::Cloud::Run.const_get package_name
317
+ return false unless service_module.const_defined? :Revisions
318
+ service_module = service_module.const_get :Revisions
319
+ if transport == :rest
320
+ return false unless service_module.const_defined? :Rest
321
+ service_module = service_module.const_get :Rest
322
+ end
323
+ service_module.const_defined? :Client
324
+ rescue ::LoadError
325
+ false
326
+ end
327
+
184
328
  ##
185
329
  # Create a new client object for Services.
186
330
  #
@@ -194,6 +338,11 @@ module Google
194
338
  # You can also specify a different transport by passing `:rest` or `:grpc` in
195
339
  # the `transport` parameter.
196
340
  #
341
+ # Raises an exception if the currently installed versioned client gem for the
342
+ # given API version does not support the given transport of the Services service.
343
+ # You can determine whether the method will succeed by calling
344
+ # {Google::Cloud::Run.services_available?}.
345
+ #
197
346
  # ## About Services
198
347
  #
199
348
  # Cloud Run Service Control Plane API
@@ -215,6 +364,37 @@ module Google
215
364
  service_module.const_get(:Client).new(&block)
216
365
  end
217
366
 
367
+ ##
368
+ # Determines whether the Services service is supported by the current client.
369
+ # If true, you can retrieve a client object by calling {Google::Cloud::Run.services}.
370
+ # If false, that method will raise an exception. This could happen if the given
371
+ # API version does not exist or does not support the Services service,
372
+ # or if the versioned client gem needs an update to support the Services service.
373
+ #
374
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
375
+ # Defaults to `:v2`.
376
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
377
+ # @return [boolean] Whether the service is available.
378
+ #
379
+ def self.services_available? version: :v2, transport: :grpc
380
+ require "google/cloud/run/#{version.to_s.downcase}"
381
+ package_name = Google::Cloud::Run
382
+ .constants
383
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
384
+ .first
385
+ return false unless package_name
386
+ service_module = Google::Cloud::Run.const_get package_name
387
+ return false unless service_module.const_defined? :Services
388
+ service_module = service_module.const_get :Services
389
+ if transport == :rest
390
+ return false unless service_module.const_defined? :Rest
391
+ service_module = service_module.const_get :Rest
392
+ end
393
+ service_module.const_defined? :Client
394
+ rescue ::LoadError
395
+ false
396
+ end
397
+
218
398
  ##
219
399
  # Create a new client object for Tasks.
220
400
  #
@@ -228,6 +408,11 @@ module Google
228
408
  # You can also specify a different transport by passing `:rest` or `:grpc` in
229
409
  # the `transport` parameter.
230
410
  #
411
+ # Raises an exception if the currently installed versioned client gem for the
412
+ # given API version does not support the given transport of the Tasks service.
413
+ # You can determine whether the method will succeed by calling
414
+ # {Google::Cloud::Run.tasks_available?}.
415
+ #
231
416
  # ## About Tasks
232
417
  #
233
418
  # Cloud Run Task Control Plane API.
@@ -249,6 +434,37 @@ module Google
249
434
  service_module.const_get(:Client).new(&block)
250
435
  end
251
436
 
437
+ ##
438
+ # Determines whether the Tasks service is supported by the current client.
439
+ # If true, you can retrieve a client object by calling {Google::Cloud::Run.tasks}.
440
+ # If false, that method will raise an exception. This could happen if the given
441
+ # API version does not exist or does not support the Tasks service,
442
+ # or if the versioned client gem needs an update to support the Tasks service.
443
+ #
444
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
445
+ # Defaults to `:v2`.
446
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
447
+ # @return [boolean] Whether the service is available.
448
+ #
449
+ def self.tasks_available? version: :v2, transport: :grpc
450
+ require "google/cloud/run/#{version.to_s.downcase}"
451
+ package_name = Google::Cloud::Run
452
+ .constants
453
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
454
+ .first
455
+ return false unless package_name
456
+ service_module = Google::Cloud::Run.const_get package_name
457
+ return false unless service_module.const_defined? :Tasks
458
+ service_module = service_module.const_get :Tasks
459
+ if transport == :rest
460
+ return false unless service_module.const_defined? :Rest
461
+ service_module = service_module.const_get :Rest
462
+ end
463
+ service_module.const_defined? :Client
464
+ rescue ::LoadError
465
+ false
466
+ end
467
+
252
468
  ##
253
469
  # Configure the google-cloud-run-client library.
254
470
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-run-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-10-24 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -62,7 +61,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
62
61
  licenses:
63
62
  - Apache-2.0
64
63
  metadata: {}
65
- post_install_message:
66
64
  rdoc_options: []
67
65
  require_paths:
68
66
  - lib
@@ -70,15 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
68
  requirements:
71
69
  - - ">="
72
70
  - !ruby/object:Gem::Version
73
- version: '2.7'
71
+ version: '3.0'
74
72
  required_rubygems_version: !ruby/object:Gem::Requirement
75
73
  requirements:
76
74
  - - ">="
77
75
  - !ruby/object:Gem::Version
78
76
  version: '0'
79
77
  requirements: []
80
- rubygems_version: 3.5.21
81
- signing_key:
78
+ rubygems_version: 3.6.2
82
79
  specification_version: 4
83
80
  summary: API Client library for the Cloud Run API
84
81
  test_files: []