google-cloud-redis 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/redis/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: 20a8f69c6fd7ba840a7dd6298ffb28834eb7291237abd630d52d7021d64c8547
|
4
|
+
data.tar.gz: 17245d3cf5a6ff11e2aec4efe4bf17e3b6ad2d5536e25aca55cf36749b2425af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aad708c21831df90143ddc7a7f573fbcdd5b8ab83d6706ed0b4f7d0c016c08bfadb182fdb93c51d71755269f181948c26576b6c26475c042ebd0a7d180a24734
|
7
|
+
data.tar.gz: ca0e3c432c8e9f69a08b00feba4a645cc23695b7503bada0b18bbc006f7476c4e69203ad6f74b425605d4028db584a53d6d054999fad75d7bdd91e9d43e8097f
|
data/MIGRATING.md
CHANGED
@@ -30,6 +30,10 @@ To summarize:
|
|
30
30
|
resource paths. These paths are now instance methods on the client objects,
|
31
31
|
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
|
|
@@ -238,7 +242,7 @@ In the 1.0 client, you can also use the paths module as a convenience module.
|
|
238
242
|
|
239
243
|
New:
|
240
244
|
```
|
241
|
-
# Bring the
|
245
|
+
# Bring the path helper methods into the current class
|
242
246
|
include Google::Cloud::Redis::V1::CloudRedis::Paths
|
243
247
|
|
244
248
|
def foo
|
@@ -253,6 +257,48 @@ def foo
|
|
253
257
|
end
|
254
258
|
```
|
255
259
|
|
260
|
+
### Handling Errors
|
261
|
+
|
262
|
+
The client reports standard
|
263
|
+
[gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
|
264
|
+
by raising exceptions. In older releases, these exceptions were located in the
|
265
|
+
`Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
|
266
|
+
exception class, defined in the `google-gax` gem. However, these classes were
|
267
|
+
different from the standard exceptions (subclasses of `Google::Cloud::Error`)
|
268
|
+
thrown by other client libraries such as `google-cloud-storage`.
|
269
|
+
|
270
|
+
The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
|
271
|
+
for consistency across all the Google Cloud client libraries. In general, these
|
272
|
+
exceptions have the same name as their counterparts from older releases, but
|
273
|
+
are located in the `Google::Cloud` namespace rather than the `Google::Gax`
|
274
|
+
namespace.
|
275
|
+
|
276
|
+
Old:
|
277
|
+
```
|
278
|
+
client = Google::Cloud::Redis.new
|
279
|
+
|
280
|
+
parent = "projects/my-project/locations/-"
|
281
|
+
|
282
|
+
begin
|
283
|
+
response = client.list_instances parent
|
284
|
+
rescue Google::Gax::Error => e
|
285
|
+
# Handle exceptions that subclass Google::Gax::Error
|
286
|
+
end
|
287
|
+
```
|
288
|
+
|
289
|
+
New:
|
290
|
+
```
|
291
|
+
client = Google::Cloud::Redis.cloud_redis
|
292
|
+
|
293
|
+
parent = "projects/my-project/locations/-"
|
294
|
+
|
295
|
+
begin
|
296
|
+
response = client.list_instances parent: parent
|
297
|
+
rescue Google::Cloud::Error => e
|
298
|
+
# Handle exceptions that subclass Google::Cloud::Error
|
299
|
+
end
|
300
|
+
```
|
301
|
+
|
256
302
|
### Class Namespaces
|
257
303
|
|
258
304
|
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-redis
|
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
|