google-cloud-dlp 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: 940a329c36c0713a62402cc6e94282a80bb8d2bbc5f700ea4849a37bdcf78a6f
4
- data.tar.gz: de27806bd8335d5b724690edf2b0f38c2609c5470edf8ed54176041332fe5bd4
3
+ metadata.gz: f636c4be0274a6f54c76a31f79b77d8ad19461dafeb3594a08df96ed8b01d4c3
4
+ data.tar.gz: 80902e3106908f6dd5c975d488e088112bd9071a4343a28a391a2386e03321a4
5
5
  SHA512:
6
- metadata.gz: bb4f0569ad9c04f0fa1df2395f1cf272dfbc6d88a88b3bb89d054c8c9cf9702efa6fc5b7424646ec909ccf18f505bb40d61371f922d71d3ffdbc4de377a447b8
7
- data.tar.gz: d861de53c68586f0102a45fe1fd825ad076a120889a296b11292f70fda32ca5d13049ac43cb3cdc30ed97c1478ac6c5ad419612bbeebc6326fdcef55ecbcc8d8
6
+ metadata.gz: 65994cf6dd72889c1d2adce76f99ab425e6bada15a5ab9296b6dcb7effba03397469d2fa5f3f833bbc6506d41aeed77c0adac55c109a9e76e8203e288e1bc978
7
+ data.tar.gz: 458b2125790c364374ddf7b4b495550b3b1279d66566fbdc3fdeac7e6185eea62f71aa82b909a78568c3004358329d61761129dfee42b6ccc926c92fac0ce7c5
@@ -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
 
@@ -268,7 +272,7 @@ Finally, in the 1.0 client, you can also use the paths module as a convenience m
268
272
 
269
273
  New:
270
274
  ```
271
- # Bring the session_path method into the current class
275
+ # Bring the path helper methods into the current class
272
276
  include Google::Cloud::Dlp::V2::DlpService::Paths
273
277
 
274
278
  def foo
@@ -284,6 +288,48 @@ def foo
284
288
  end
285
289
  ```
286
290
 
291
+ ### Handling Errors
292
+
293
+ The client reports standard
294
+ [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
295
+ by raising exceptions. In older releases, these exceptions were located in the
296
+ `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
297
+ exception class, defined in the `google-gax` gem. However, these classes were
298
+ different from the standard exceptions (subclasses of `Google::Cloud::Error`)
299
+ thrown by other client libraries such as `google-cloud-storage`.
300
+
301
+ The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
302
+ for consistency across all the Google Cloud client libraries. In general, these
303
+ exceptions have the same name as their counterparts from older releases, but
304
+ are located in the `Google::Cloud` namespace rather than the `Google::Gax`
305
+ namespace.
306
+
307
+ Old:
308
+ ```
309
+ client = Google::Cloud::Dlp.new
310
+
311
+ parent = "projects/my-project"
312
+
313
+ begin
314
+ response = client.list_inspect_templates parent, page_size: 10
315
+ rescue Google::Gax::Error => e
316
+ # Handle exceptions that subclass Google::Gax::Error
317
+ end
318
+ ```
319
+
320
+ New:
321
+ ```
322
+ client = Google::Cloud::Dlp.dlp_service
323
+
324
+ parent = "projects/my-project"
325
+
326
+ begin
327
+ response = client.list_inspect_templates parent: parent, page_size: 10
328
+ rescue Google::Cloud::Error => e
329
+ # Handle exceptions that subclass Google::Cloud::Error
330
+ end
331
+ ```
332
+
287
333
  ### Class Namespaces
288
334
 
289
335
  In older releases, the client object was of classes with names like:
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Dlp
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-dlp
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-21 00:00:00.000000000 Z
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