google-cloud-run-client 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +3 -3
- data/lib/google/cloud/run/client/version.rb +1 -1
- data/lib/google/cloud/run.rb +34 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53e4842f0b0c2cecb561cdd206e4973cade13939b28a117fa239be6a5f4c164e
|
4
|
+
data.tar.gz: 58d46ff642eccfb8e9af7bb190b81c7d8320effd5e4fa09f25ccd5ef4960053c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 797208b1a8365198b234ba142f20c6d3297cf73e54fbfd5c342010254156edd846c27bb58359a2662f003f5b7d0428d6b2f1211c2c10a9851462dfc136ae1a1f
|
7
|
+
data.tar.gz: 65dfc0a6f6b772c5341fa37e7203cdb837f2d49d144219005dd5e4e51dde58e49c5da74c2045ff3745354514c1f131df004ec8bdf33119d45679290459088a28
|
data/AUTHENTICATION.md
CHANGED
@@ -56,7 +56,7 @@ To configure a credentials file for an individual client initialization:
|
|
56
56
|
```ruby
|
57
57
|
require "google/cloud/run"
|
58
58
|
|
59
|
-
client = Google::Cloud::Run.
|
59
|
+
client = Google::Cloud::Run.builds do |config|
|
60
60
|
config.credentials = "path/to/credentialfile.json"
|
61
61
|
end
|
62
62
|
```
|
@@ -70,7 +70,7 @@ Google::Cloud::Run.configure do |config|
|
|
70
70
|
config.credentials = "path/to/credentialfile.json"
|
71
71
|
end
|
72
72
|
|
73
|
-
client = Google::Cloud::Run.
|
73
|
+
client = Google::Cloud::Run.builds
|
74
74
|
```
|
75
75
|
|
76
76
|
### Environment Variables
|
@@ -100,7 +100,7 @@ require "google/cloud/run"
|
|
100
100
|
|
101
101
|
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json"
|
102
102
|
|
103
|
-
client = Google::Cloud::Run.
|
103
|
+
client = Google::Cloud::Run.builds
|
104
104
|
```
|
105
105
|
|
106
106
|
### Local ADC file
|
data/lib/google/cloud/run.rb
CHANGED
@@ -45,6 +45,40 @@ end
|
|
45
45
|
module Google
|
46
46
|
module Cloud
|
47
47
|
module Run
|
48
|
+
##
|
49
|
+
# Create a new client object for Builds.
|
50
|
+
#
|
51
|
+
# By default, this returns an instance of
|
52
|
+
# [Google::Cloud::Run::V2::Builds::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Builds-Client)
|
53
|
+
# for a gRPC client for version V2 of the API.
|
54
|
+
# However, you can specify a different API version by passing it in the
|
55
|
+
# `version` parameter. If the Builds service is
|
56
|
+
# supported by that API version, and the corresponding gem is available, the
|
57
|
+
# appropriate versioned client will be returned.
|
58
|
+
# You can also specify a different transport by passing `:rest` or `:grpc` in
|
59
|
+
# the `transport` parameter.
|
60
|
+
#
|
61
|
+
# ## About Builds
|
62
|
+
#
|
63
|
+
# Cloud Run Build Control Plane API
|
64
|
+
#
|
65
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
66
|
+
# Defaults to `:v2`.
|
67
|
+
# @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
|
68
|
+
# @return [::Object] A client object for the specified version.
|
69
|
+
#
|
70
|
+
def self.builds version: :v2, transport: :grpc, &block
|
71
|
+
require "google/cloud/run/#{version.to_s.downcase}"
|
72
|
+
|
73
|
+
package_name = Google::Cloud::Run
|
74
|
+
.constants
|
75
|
+
.select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
|
76
|
+
.first
|
77
|
+
service_module = Google::Cloud::Run.const_get(package_name).const_get(:Builds)
|
78
|
+
service_module = service_module.const_get(:Rest) if transport == :rest
|
79
|
+
service_module.const_get(:Client).new(&block)
|
80
|
+
end
|
81
|
+
|
48
82
|
##
|
49
83
|
# Create a new client object for Executions.
|
50
84
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.17'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
36
|
version: 2.a
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0.
|
43
|
+
version: '0.17'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.a
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
|
-
rubygems_version: 3.5.
|
80
|
+
rubygems_version: 3.5.21
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: API Client library for the Cloud Run API
|