google-cloud-run-client 0.3.0 → 1.0.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: 581091773e0e9123c43393e0f4b9259b828a4874ab43b7cd2ffbee30a0271db7
4
- data.tar.gz: e10520bd155244c51485ea6dc0446c0ddec74e19530301d418b888d169c52754
3
+ metadata.gz: 7fde37102a1b399d9ff57533b13a9059e7cfe4f290bd9fa55e48a3e1d63e43c1
4
+ data.tar.gz: bf92cbbed67185734b49302a9424e8c029324704c26947601c4005649096612f
5
5
  SHA512:
6
- metadata.gz: f7de5d1739a8f31aca819ad1354fe76da273e878c9c78cf74cba7617cd8aeeed5ad3798b94afd62cd5c8ef10f6f2bef36a2240bdc2c98489c29e529faf9244de
7
- data.tar.gz: c8b3b4951a832cab1238db54a95cc432a6f5d1dc2fc8a8b4fda11c22f5b1a43a871a04c3e0064034a294c7b9c12fb7400dbc7d9e08502abdaa598d09cc117d95
6
+ metadata.gz: 30510a357a8f36c5556034c827f9c38347a0f50c374ff5d848e36e76a492c207ec1375aa2eb6fc03186aa56959d6ecfcb9d06695ccefe2d36f5ddc999754a19f
7
+ data.tar.gz: c469dd4ea7bbdc01338580115ee7e77386d20ece1985c0e796803373bb63b4dc98809695b16fa9df37e4e4f573f2c80b8db964b93ddc705ca4b4f3f4c4e29971
data/README.md CHANGED
@@ -16,7 +16,7 @@ for this library, google-cloud-run-client, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-run-v2](https://googleapis.dev/ruby/google-cloud-run-v2/latest).
19
+ [google-cloud-run-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest).
20
20
 
21
21
  See also the [Product Documentation](https://cloud.google.com/run)
22
22
  for more usage information.
@@ -34,32 +34,6 @@ 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
- ## Enabling Logging
38
-
39
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
40
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
41
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
42
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
43
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
44
-
45
- Configuring a Ruby stdlib logger:
46
-
47
- ```ruby
48
- require "logger"
49
-
50
- module MyLogger
51
- LOGGER = Logger.new $stderr, level: Logger::WARN
52
- def logger
53
- LOGGER
54
- end
55
- end
56
-
57
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
58
- module GRPC
59
- extend MyLogger
60
- end
61
- ```
62
-
63
37
  ## Supported Ruby Versions
64
38
 
65
39
  This library is supported on Ruby 2.6+.
@@ -18,7 +18,7 @@ module Google
18
18
  module Cloud
19
19
  module Run
20
20
  module Client
21
- VERSION = "0.3.0"
21
+ VERSION = "1.0.0"
22
22
  end
23
23
  end
24
24
  end
@@ -48,12 +48,14 @@ module Google
48
48
  # Create a new client object for Executions.
49
49
  #
50
50
  # By default, this returns an instance of
51
- # [Google::Cloud::Run::V2::Executions::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Executions/Client.html)
52
- # for version V2 of the API.
53
- # However, you can specify specify a different API version by passing it in the
51
+ # [Google::Cloud::Run::V2::Executions::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Executions-Client)
52
+ # for a gRPC client for version V2 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the Executions service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About Executions
59
61
  #
@@ -61,29 +63,33 @@ module Google
61
63
  #
62
64
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
63
65
  # Defaults to `:v2`.
64
- # @return [Executions::Client] A client object for the specified version.
66
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
67
+ # @return [::Object] A client object for the specified version.
65
68
  #
66
- def self.executions version: :v2, &block
69
+ def self.executions version: :v2, transport: :grpc, &block
67
70
  require "google/cloud/run/#{version.to_s.downcase}"
68
71
 
69
72
  package_name = Google::Cloud::Run
70
73
  .constants
71
74
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
72
75
  .first
73
- package_module = Google::Cloud::Run.const_get package_name
74
- package_module.const_get(:Executions).const_get(:Client).new(&block)
76
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Executions)
77
+ service_module = service_module.const_get(:Rest) if transport == :rest
78
+ service_module.const_get(:Client).new(&block)
75
79
  end
76
80
 
77
81
  ##
78
82
  # Create a new client object for Jobs.
79
83
  #
80
84
  # By default, this returns an instance of
81
- # [Google::Cloud::Run::V2::Jobs::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Jobs/Client.html)
82
- # for version V2 of the API.
83
- # However, you can specify specify a different API version by passing it in the
85
+ # [Google::Cloud::Run::V2::Jobs::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Jobs-Client)
86
+ # for a gRPC client for version V2 of the API.
87
+ # However, you can specify a different API version by passing it in the
84
88
  # `version` parameter. If the Jobs service is
85
89
  # supported by that API version, and the corresponding gem is available, the
86
90
  # appropriate versioned client will be returned.
91
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
92
+ # the `transport` parameter.
87
93
  #
88
94
  # ## About Jobs
89
95
  #
@@ -91,29 +97,33 @@ module Google
91
97
  #
92
98
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
93
99
  # Defaults to `:v2`.
94
- # @return [Jobs::Client] A client object for the specified version.
100
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
101
+ # @return [::Object] A client object for the specified version.
95
102
  #
96
- def self.jobs version: :v2, &block
103
+ def self.jobs version: :v2, transport: :grpc, &block
97
104
  require "google/cloud/run/#{version.to_s.downcase}"
98
105
 
99
106
  package_name = Google::Cloud::Run
100
107
  .constants
101
108
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
102
109
  .first
103
- package_module = Google::Cloud::Run.const_get package_name
104
- package_module.const_get(:Jobs).const_get(:Client).new(&block)
110
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Jobs)
111
+ service_module = service_module.const_get(:Rest) if transport == :rest
112
+ service_module.const_get(:Client).new(&block)
105
113
  end
106
114
 
107
115
  ##
108
116
  # Create a new client object for Revisions.
109
117
  #
110
118
  # By default, this returns an instance of
111
- # [Google::Cloud::Run::V2::Revisions::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Revisions/Client.html)
112
- # for version V2 of the API.
113
- # However, you can specify specify a different API version by passing it in the
119
+ # [Google::Cloud::Run::V2::Revisions::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Revisions-Client)
120
+ # for a gRPC client for version V2 of the API.
121
+ # However, you can specify a different API version by passing it in the
114
122
  # `version` parameter. If the Revisions service is
115
123
  # supported by that API version, and the corresponding gem is available, the
116
124
  # appropriate versioned client will be returned.
125
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
126
+ # the `transport` parameter.
117
127
  #
118
128
  # ## About Revisions
119
129
  #
@@ -121,29 +131,33 @@ module Google
121
131
  #
122
132
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
123
133
  # Defaults to `:v2`.
124
- # @return [Revisions::Client] A client object for the specified version.
134
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
135
+ # @return [::Object] A client object for the specified version.
125
136
  #
126
- def self.revisions version: :v2, &block
137
+ def self.revisions version: :v2, transport: :grpc, &block
127
138
  require "google/cloud/run/#{version.to_s.downcase}"
128
139
 
129
140
  package_name = Google::Cloud::Run
130
141
  .constants
131
142
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
132
143
  .first
133
- package_module = Google::Cloud::Run.const_get package_name
134
- package_module.const_get(:Revisions).const_get(:Client).new(&block)
144
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Revisions)
145
+ service_module = service_module.const_get(:Rest) if transport == :rest
146
+ service_module.const_get(:Client).new(&block)
135
147
  end
136
148
 
137
149
  ##
138
150
  # Create a new client object for Services.
139
151
  #
140
152
  # By default, this returns an instance of
141
- # [Google::Cloud::Run::V2::Services::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Services/Client.html)
142
- # for version V2 of the API.
143
- # However, you can specify specify a different API version by passing it in the
153
+ # [Google::Cloud::Run::V2::Services::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Services-Client)
154
+ # for a gRPC client for version V2 of the API.
155
+ # However, you can specify a different API version by passing it in the
144
156
  # `version` parameter. If the Services service is
145
157
  # supported by that API version, and the corresponding gem is available, the
146
158
  # appropriate versioned client will be returned.
159
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
160
+ # the `transport` parameter.
147
161
  #
148
162
  # ## About Services
149
163
  #
@@ -151,29 +165,33 @@ module Google
151
165
  #
152
166
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
153
167
  # Defaults to `:v2`.
154
- # @return [Services::Client] A client object for the specified version.
168
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
169
+ # @return [::Object] A client object for the specified version.
155
170
  #
156
- def self.services version: :v2, &block
171
+ def self.services version: :v2, transport: :grpc, &block
157
172
  require "google/cloud/run/#{version.to_s.downcase}"
158
173
 
159
174
  package_name = Google::Cloud::Run
160
175
  .constants
161
176
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
162
177
  .first
163
- package_module = Google::Cloud::Run.const_get package_name
164
- package_module.const_get(:Services).const_get(:Client).new(&block)
178
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Services)
179
+ service_module = service_module.const_get(:Rest) if transport == :rest
180
+ service_module.const_get(:Client).new(&block)
165
181
  end
166
182
 
167
183
  ##
168
184
  # Create a new client object for Tasks.
169
185
  #
170
186
  # By default, this returns an instance of
171
- # [Google::Cloud::Run::V2::Tasks::Client](https://googleapis.dev/ruby/google-cloud-run-v2/latest/Google/Cloud/Run/V2/Tasks/Client.html)
172
- # for version V2 of the API.
173
- # However, you can specify specify a different API version by passing it in the
187
+ # [Google::Cloud::Run::V2::Tasks::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-run-v2/latest/Google-Cloud-Run-V2-Tasks-Client)
188
+ # for a gRPC client for version V2 of the API.
189
+ # However, you can specify a different API version by passing it in the
174
190
  # `version` parameter. If the Tasks service is
175
191
  # supported by that API version, and the corresponding gem is available, the
176
192
  # appropriate versioned client will be returned.
193
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
194
+ # the `transport` parameter.
177
195
  #
178
196
  # ## About Tasks
179
197
  #
@@ -181,17 +199,19 @@ module Google
181
199
  #
182
200
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
183
201
  # Defaults to `:v2`.
184
- # @return [Tasks::Client] A client object for the specified version.
202
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
203
+ # @return [::Object] A client object for the specified version.
185
204
  #
186
- def self.tasks version: :v2, &block
205
+ def self.tasks version: :v2, transport: :grpc, &block
187
206
  require "google/cloud/run/#{version.to_s.downcase}"
188
207
 
189
208
  package_name = Google::Cloud::Run
190
209
  .constants
191
210
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
192
211
  .first
193
- package_module = Google::Cloud::Run.const_get package_name
194
- package_module.const_get(:Tasks).const_get(:Client).new(&block)
212
+ service_module = Google::Cloud::Run.const_get(package_name).const_get(:Tasks)
213
+ service_module = service_module.const_get(:Rest) if transport == :rest
214
+ service_module.const_get(:Client).new(&block)
195
215
  end
196
216
 
197
217
  ##
@@ -211,7 +231,7 @@ module Google
211
231
  # * `timeout` (*type:* `Numeric`) -
212
232
  # Default timeout in seconds.
213
233
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
214
- # Additional gRPC headers to be sent with the call.
234
+ # Additional headers to be sent with the call.
215
235
  # * `retry_policy` (*type:* `Hash`) -
216
236
  # The retry policy. The value is a hash with the following keys:
217
237
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
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: 0.3.0
4
+ version: 1.0.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: 2022-11-11 00:00:00.000000000 Z
11
+ date: 2023-07-28 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.5'
33
+ version: '0.7'
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.5'
43
+ version: '0.7'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubygems_version: 3.3.14
192
+ rubygems_version: 3.4.2
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: API Client library for the Cloud Run API