google-cloud-asset 1.1.0 → 1.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/asset/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: 34d3de272e4b74abfe7fcc12d2a157657828005b27bbb8897d723d355d59497b
|
4
|
+
data.tar.gz: 60eab44d18f74fcf78c3b2a61eb684ac2af55b2b24f5e017fe72581dbd4d988c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60bc8fdfab9eff4720780f94ba0cc8654a289463a72cd530d2c3e530a8270ae69e962f17f6d223519201d0840ed4277838e25fad34e818d593b27e1a1044aab5
|
7
|
+
data.tar.gz: c1d2eb7279e6d5a564719f1bf3858258bab9bff6dafcd6b41e09562f1b7dc386a70b966acf026de52b6f7a17758c2eae7a776919fcd80156636a81cae13d0c82
|
data/MIGRATING.md
CHANGED
@@ -29,6 +29,10 @@ To summarize:
|
|
29
29
|
resource paths. These paths are now instance methods on the client objects,
|
30
30
|
and are also available in a separate paths module. See
|
31
31
|
[Resource Path Helpers](#resource-path-helpers) for more info.
|
32
|
+
* Previously, clients reported RPC errors by raising instances of
|
33
|
+
`Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
|
34
|
+
`Google::Cloud::Error` and its subclasses. See
|
35
|
+
[Handling Errors](#handling-errors) for more info.
|
32
36
|
* Some classes have moved into different namespaces. See
|
33
37
|
[Class Namespaces](#class-namespaces) for more info.
|
34
38
|
|
@@ -254,7 +258,7 @@ Finally, in the 1.0 client, you can also use the paths module as a convenience m
|
|
254
258
|
|
255
259
|
New:
|
256
260
|
```
|
257
|
-
# Bring the
|
261
|
+
# Bring the path helper methods into the current class
|
258
262
|
include Google::Cloud::Asset::V1::AssetService::Paths
|
259
263
|
|
260
264
|
def foo
|
@@ -269,6 +273,48 @@ def foo
|
|
269
273
|
end
|
270
274
|
```
|
271
275
|
|
276
|
+
### Handling Errors
|
277
|
+
|
278
|
+
The client reports standard
|
279
|
+
[gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
|
280
|
+
by raising exceptions. In older releases, these exceptions were located in the
|
281
|
+
`Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
|
282
|
+
exception class, defined in the `google-gax` gem. However, these classes were
|
283
|
+
different from the standard exceptions (subclasses of `Google::Cloud::Error`)
|
284
|
+
thrown by other client libraries such as `google-cloud-storage`.
|
285
|
+
|
286
|
+
The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy
|
287
|
+
for consistency across all the Google Cloud client libraries. In general, these
|
288
|
+
exceptions have the same name as their counterparts from older releases, but
|
289
|
+
are located in the `Google::Cloud` namespace rather than the `Google::Gax`
|
290
|
+
namespace.
|
291
|
+
|
292
|
+
Old:
|
293
|
+
```
|
294
|
+
client = Google::Cloud::Asset.new
|
295
|
+
|
296
|
+
name = "projects/my-project/feeds/my-feed"
|
297
|
+
|
298
|
+
begin
|
299
|
+
client.get_feed name
|
300
|
+
rescue Google::Gax::Error => e
|
301
|
+
# Handle exceptions that subclass Google::Gax::Error
|
302
|
+
end
|
303
|
+
```
|
304
|
+
|
305
|
+
New:
|
306
|
+
```
|
307
|
+
client = Google::Cloud::Asset.asset_service
|
308
|
+
|
309
|
+
name = "projects/my-project/feeds/my-feed"
|
310
|
+
|
311
|
+
begin
|
312
|
+
client.get_feed name: name
|
313
|
+
rescue Google::Cloud::Error => e
|
314
|
+
# Handle exceptions that subclass Google::Cloud::Error
|
315
|
+
end
|
316
|
+
```
|
317
|
+
|
272
318
|
### Class Namespaces
|
273
319
|
|
274
320
|
In older releases, the client object was of classes with names like:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-asset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.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
|