google-cloud-tasks 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIGRATING.md +47 -1
- data/lib/google/cloud/tasks/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: 117c09fd7b2ef0688e9312987c5506198dd5b1c83d920ec31fdee85c0140c4c9
|
4
|
+
data.tar.gz: 102b0b7fe0aa65dec8ed7b642eebcbd7f67bbc8d26cba7dc6ca245310649c66b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9beb63408d5f71920c9ad0da5c19d1247c962e8546552b2102ee62818b3f35e16dd8dd17dd9243f1a6798d41e94195a9e2eaf49e757731e6384a9ac11b2b4a7
|
7
|
+
data.tar.gz: f7c53d7df9a5b54a63e93c714d7aba626ef7038e86bf1c35e621f95e9759ee08ee5746ae0c4e362519ef014ce43904b17b417616aade696a7113a313b521e9a8
|
data/MIGRATING.md
CHANGED
@@ -30,6 +30,10 @@ To summarize:
|
|
30
30
|
resource paths. These methods now take keyword rather than positional
|
31
31
|
arguments, and are also available in a separate paths module. See
|
32
32
|
[Resource Path Helpers](#resource-path-helpers) for more info.
|
33
|
+
* Previously, clients reported RPC errors by raising instances of
|
34
|
+
`Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
|
35
|
+
`Google::Cloud::Error` and its subclasses. See
|
36
|
+
[Handling Errors](#handling-errors) for more info.
|
33
37
|
* Some classes have moved into different namespaces. See
|
34
38
|
[Class Namespaces](#class-namespaces) for more info.
|
35
39
|
|
@@ -240,7 +244,7 @@ In the 2.0 client, you can also use the paths module as a convenience module.
|
|
240
244
|
|
241
245
|
New:
|
242
246
|
```
|
243
|
-
# Bring the
|
247
|
+
# Bring the path helper methods into the current class
|
244
248
|
include Google::Cloud::Tasks::V2::CloudTasks::Paths
|
245
249
|
|
246
250
|
def foo
|
@@ -255,6 +259,48 @@ def foo
|
|
255
259
|
end
|
256
260
|
```
|
257
261
|
|
262
|
+
### Handling Errors
|
263
|
+
|
264
|
+
The client reports standard
|
265
|
+
[gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
|
266
|
+
by raising exceptions. In older releases, these exceptions were located in the
|
267
|
+
`Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
|
268
|
+
exception class, defined in the `google-gax` gem. However, these classes were
|
269
|
+
different from the standard exceptions (subclasses of `Google::Cloud::Error`)
|
270
|
+
thrown by other client libraries such as `google-cloud-storage`.
|
271
|
+
|
272
|
+
The 2.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
|
273
|
+
for consistency across all the Google Cloud client libraries. In general, these
|
274
|
+
exceptions have the same name as their counterparts from older releases, but
|
275
|
+
are located in the `Google::Cloud` namespace rather than the `Google::Gax`
|
276
|
+
namespace.
|
277
|
+
|
278
|
+
Old:
|
279
|
+
```
|
280
|
+
client = Google::Cloud::Tasks.new
|
281
|
+
|
282
|
+
parent = "projects/my-project/locations/-"
|
283
|
+
|
284
|
+
begin
|
285
|
+
response = client.list_queues parent, page_size: 10
|
286
|
+
rescue Google::Gax::Error => e
|
287
|
+
# Handle exceptions that subclass Google::Gax::Error
|
288
|
+
end
|
289
|
+
```
|
290
|
+
|
291
|
+
New:
|
292
|
+
```
|
293
|
+
client = Google::Cloud::Tasks.cloud_tasks
|
294
|
+
|
295
|
+
parent = "projects/my-project/locations/-"
|
296
|
+
|
297
|
+
begin
|
298
|
+
response = client.list_queues parent: parent, page_size: 10
|
299
|
+
rescue Google::Cloud::Error => e
|
300
|
+
# Handle exceptions that subclass Google::Cloud::Error
|
301
|
+
end
|
302
|
+
```
|
303
|
+
|
258
304
|
### Class Namespaces
|
259
305
|
|
260
306
|
In older releases, the client object was of class
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|