google-cloud-run-client 1.8.1 → 1.10.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/.yardopts +1 -1
- data/README.md +6 -12
- data/lib/google/cloud/run/client/version.rb +1 -1
- data/lib/google/cloud/run.rb +71 -0
- metadata +9 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2add445f96e1b7d8542e8b298a980e9bf0ca946c64ca4e1dbbd3a1d527d37bb0
|
|
4
|
+
data.tar.gz: 29a43c276152b706df4d5c79ee713457864e06e58886083fadb72172af263b73
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 529698bdb4cf29271db8d27f3ae627a6ae0f0dadabffa788ee4492eeb15753be691a18b12fb92df8d372cbfb3e394d967c690e570e1a56ad7f2527818d3268dd
|
|
7
|
+
data.tar.gz: e20fe9c86d8ae3c722f09abba1fc50311ed96cf81103621b8b3244ee30d3e5577d9f2c800fee745d83943040aaadabc26775919420602e18c3f080dfb90c0c7b
|
data/.yardopts
CHANGED
data/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
# Ruby Client for the Cloud Run API
|
|
1
|
+
# Ruby Client for the Cloud Run Admin API
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.
|
|
4
4
|
|
|
5
|
-
Cloud Run deploys and manages user provided container images that scale automatically based on incoming requests.
|
|
6
5
|
|
|
7
6
|
Actual client classes for the various versions of this API are defined in
|
|
8
7
|
_versioned_ client gems, with names of the form `google-cloud-run-v*`.
|
|
@@ -18,9 +17,6 @@ themselves can be found in the client library documentation for the versioned
|
|
|
18
17
|
client gems:
|
|
19
18
|
[google-cloud-run-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest).
|
|
20
19
|
|
|
21
|
-
See also the [Product Documentation](https://cloud.google.com/run)
|
|
22
|
-
for more usage information.
|
|
23
|
-
|
|
24
20
|
## Quick Start
|
|
25
21
|
|
|
26
22
|
```
|
|
@@ -76,12 +72,10 @@ working, try updating the versioned clients in your bundle or installed gems:
|
|
|
76
72
|
|
|
77
73
|
This library is supported on Ruby 3.2+.
|
|
78
74
|
|
|
79
|
-
Google provides official support for Ruby versions
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
|
84
|
-
support schedule.
|
|
75
|
+
Google provides official support for Ruby versions as described in the
|
|
76
|
+
[Supported Ruby versions](https://docs.cloud.google.com/ruby/getting-started/supported-ruby-versions)
|
|
77
|
+
policy. Older versions of Ruby _may_ still work, but are unsupported and not
|
|
78
|
+
recommended.
|
|
85
79
|
|
|
86
80
|
## Which client should I use?
|
|
87
81
|
|
data/lib/google/cloud/run.rb
CHANGED
|
@@ -465,6 +465,77 @@ module Google
|
|
|
465
465
|
false
|
|
466
466
|
end
|
|
467
467
|
|
|
468
|
+
##
|
|
469
|
+
# Create a new client object for SourceUpload.
|
|
470
|
+
#
|
|
471
|
+
# By default, this returns an instance of
|
|
472
|
+
# [Google::Cloud::Run::V2::SourceUpload::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-SourceUpload-Client)
|
|
473
|
+
# for a gRPC client for version V2 of the API.
|
|
474
|
+
# However, you can specify a different API version by passing it in the
|
|
475
|
+
# `version` parameter. If the SourceUpload service is
|
|
476
|
+
# supported by that API version, and the corresponding gem is available, the
|
|
477
|
+
# appropriate versioned client will be returned.
|
|
478
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
|
479
|
+
# the `transport` parameter.
|
|
480
|
+
#
|
|
481
|
+
# Raises an exception if the currently installed versioned client gem for the
|
|
482
|
+
# given API version does not support the given transport of the SourceUpload service.
|
|
483
|
+
# You can determine whether the method will succeed by calling
|
|
484
|
+
# {Google::Cloud::Run.source_upload_available?}.
|
|
485
|
+
#
|
|
486
|
+
# ## About SourceUpload
|
|
487
|
+
#
|
|
488
|
+
# The Cloud Run Source Upload API allows you to upload source code to deploy
|
|
489
|
+
# Cloud Run resources.
|
|
490
|
+
#
|
|
491
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
492
|
+
# Defaults to `:v2`.
|
|
493
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
494
|
+
# @return [::Object] A client object for the specified version.
|
|
495
|
+
#
|
|
496
|
+
def self.source_upload version: :v2, transport: :grpc, &block
|
|
497
|
+
require "google/cloud/run/#{version.to_s.downcase}"
|
|
498
|
+
|
|
499
|
+
package_name = Google::Cloud::Run
|
|
500
|
+
.constants
|
|
501
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
502
|
+
.first
|
|
503
|
+
service_module = Google::Cloud::Run.const_get(package_name).const_get(:SourceUpload)
|
|
504
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
|
505
|
+
service_module.const_get(:Client).new(&block)
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
##
|
|
509
|
+
# Determines whether the SourceUpload service is supported by the current client.
|
|
510
|
+
# If true, you can retrieve a client object by calling {Google::Cloud::Run.source_upload}.
|
|
511
|
+
# If false, that method will raise an exception. This could happen if the given
|
|
512
|
+
# API version does not exist or does not support the SourceUpload service,
|
|
513
|
+
# or if the versioned client gem needs an update to support the SourceUpload service.
|
|
514
|
+
#
|
|
515
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
|
516
|
+
# Defaults to `:v2`.
|
|
517
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
|
518
|
+
# @return [boolean] Whether the service is available.
|
|
519
|
+
#
|
|
520
|
+
def self.source_upload_available? version: :v2, transport: :grpc
|
|
521
|
+
require "google/cloud/run/#{version.to_s.downcase}"
|
|
522
|
+
package_name = Google::Cloud::Run
|
|
523
|
+
.constants
|
|
524
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
|
525
|
+
.first
|
|
526
|
+
return false unless package_name
|
|
527
|
+
service_module = Google::Cloud::Run.const_get package_name
|
|
528
|
+
return false unless service_module.const_defined? :SourceUpload
|
|
529
|
+
service_module = service_module.const_get :SourceUpload
|
|
530
|
+
if transport == :rest
|
|
531
|
+
return false unless service_module.const_defined? :Rest
|
|
532
|
+
service_module = service_module.const_get :Rest
|
|
533
|
+
end
|
|
534
|
+
service_module.const_defined? :Client
|
|
535
|
+
rescue ::LoadError
|
|
536
|
+
false
|
|
537
|
+
end
|
|
538
|
+
|
|
468
539
|
##
|
|
469
540
|
# Create a new client object for Tasks.
|
|
470
541
|
#
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-run-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -43,8 +43,10 @@ dependencies:
|
|
|
43
43
|
- - "<"
|
|
44
44
|
- !ruby/object:Gem::Version
|
|
45
45
|
version: 2.a
|
|
46
|
-
description:
|
|
47
|
-
|
|
46
|
+
description: Deploy and manage user provided container images that scale automatically
|
|
47
|
+
based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving
|
|
48
|
+
API specification, while v2 is aligned with Google Cloud AIP-based API standards,
|
|
49
|
+
as described in https://google.aip.dev/.
|
|
48
50
|
email: googleapis-packages@google.com
|
|
49
51
|
executables: []
|
|
50
52
|
extensions: []
|
|
@@ -77,5 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
77
79
|
requirements: []
|
|
78
80
|
rubygems_version: 3.6.9
|
|
79
81
|
specification_version: 4
|
|
80
|
-
summary:
|
|
82
|
+
summary: Deploy and manage user provided container images that scale automatically
|
|
83
|
+
based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving
|
|
84
|
+
API specification, while v2 is aligned with Google Cloud AIP-based API standards,
|
|
85
|
+
as described in https://google.aip.dev/.
|
|
81
86
|
test_files: []
|