google-cloud-os_login 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/os_login/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: 1ff1bef41e4725e7769c8ffd4217de4d4f1647b7df752fa644d004e4085d3778
|
4
|
+
data.tar.gz: d225b0dcee335f6fc12e148c485bedbe1455f9e654180f96daaedc5c8cc38551
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7cb85c58dbb02fe1ee694274af178f6b965bd9181504b46a1ebe8bfc495301d3b2f243edb205b61bed568cc3d3b1c512038cc9243c6911483328fb0c7b6f3c5f
|
7
|
+
data.tar.gz: 98d954f9ae494c6e0b25e0fb4f77ab8bad99d3e0a64afad440356c79e29b9539b7e61286b8fcbe3a30d9d96e02ce07b6cfc5dc5789ad604f2b87931d08a00b4a
|
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::OsLogin::V1::OsLoginService::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::OsLogin.new
|
279
|
+
|
280
|
+
key_name = "users/my-user/sshPublicKeys/12345"
|
281
|
+
|
282
|
+
begin
|
283
|
+
response = client.get_ssh_public_key key_name
|
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::OsLogin.os_login_service
|
292
|
+
|
293
|
+
key_name = "users/my-user/sshPublicKeys/12345"
|
294
|
+
|
295
|
+
begin
|
296
|
+
response = client.get_ssh_public_key name: key_name
|
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, some data type (protobuf) classes were located under the
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-os_login
|
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-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|