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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 489c8c1ec2aa0e4399d48d022b34ade567d72b4af7e8841295311acb895828a6
4
- data.tar.gz: a1423d17fb3efa57ef3f05e53abadfb2df701858d1fefa8be608310123b513dd
3
+ metadata.gz: 1ff1bef41e4725e7769c8ffd4217de4d4f1647b7df752fa644d004e4085d3778
4
+ data.tar.gz: d225b0dcee335f6fc12e148c485bedbe1455f9e654180f96daaedc5c8cc38551
5
5
  SHA512:
6
- metadata.gz: bdcf3f2f1971fc17ae27afcb01976ee98153520553a75ba6b7d4855d1cbdccf9e51b301be7b76c960e19a8ee51c95d2d6c2abfb91b6575c8e1ba1c51b4876958
7
- data.tar.gz: f526179a6dd607bf4f1ddb05e029b830a873ed280fbc20089c82547c558d925ec4e5a665e552e104c338ef0140fff2190bb72f895b2220d26d5e0a6462f7318f
6
+ metadata.gz: 7cb85c58dbb02fe1ee694274af178f6b965bd9181504b46a1ebe8bfc495301d3b2f243edb205b61bed568cc3d3b1c512038cc9243c6911483328fb0c7b6f3c5f
7
+ data.tar.gz: 98d954f9ae494c6e0b25e0fb4f77ab8bad99d3e0a64afad440356c79e29b9539b7e61286b8fcbe3a30d9d96e02ce07b6cfc5dc5789ad604f2b87931d08a00b4a
@@ -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 session_path method into the current class
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
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module OsLogin
23
- VERSION = "1.1.0"
23
+ VERSION = "1.1.1"
24
24
  end
25
25
  end
26
26
  end
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.0
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-20 00:00:00.000000000 Z
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