google-cloud-recaptcha_enterprise 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/recaptcha_enterprise/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: 529a2c3f83ac0da8d49de81c465b993abaf41a123e904c82600cd9199f2b8461
|
4
|
+
data.tar.gz: 6d7c6c5718797d2addafc75fe4d0db0104d7868d6ab686f389032bed91684484
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d248b9e234fcc19e32901d8da51bb1fb2a21c28b96202bc09e24b599cdb61e5bb4f1d464f8c1fa6c7204890b63b06cb973687d6b4235f93650d589b0c60e058
|
7
|
+
data.tar.gz: 8929d7525af0adbdfba2ead607118a2c726e47cb06dfa2ef6f4716403faba8475e30e016c7dfee840f03f98a5b60c828f21c352976360eb74c268be7d6293b86
|
data/MIGRATING.md
CHANGED
@@ -31,6 +31,10 @@ To summarize:
|
|
31
31
|
resource paths. These methods now take keyword rather than positional
|
32
32
|
arguments, and are also available in a separate paths module. See
|
33
33
|
[Resource Path Helpers](#resource-path-helpers) for more info.
|
34
|
+
* Previously, clients reported RPC errors by raising instances of
|
35
|
+
`Google::Gax::GaxError` and its subclasses. Now, RPC exceptions are of type
|
36
|
+
`Google::Cloud::Error` and its subclasses. See
|
37
|
+
[Handling Errors](#handling-errors) for more info.
|
34
38
|
* Some classes have moved into different namespaces. In particular, classes
|
35
39
|
that were under `Google::Cloud::Recaptchaenterprise` were moved under
|
36
40
|
`Google::Cloud::RecaptchaEnterprise`. See
|
@@ -243,7 +247,7 @@ In the 1.0 client, you can also use the paths module as a convenience module.
|
|
243
247
|
|
244
248
|
New:
|
245
249
|
```
|
246
|
-
# Bring the
|
250
|
+
# Bring the path helper methods into the current class
|
247
251
|
include Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Paths
|
248
252
|
|
249
253
|
def foo
|
@@ -258,6 +262,48 @@ def foo
|
|
258
262
|
end
|
259
263
|
```
|
260
264
|
|
265
|
+
### Handling Errors
|
266
|
+
|
267
|
+
The client reports standard
|
268
|
+
[gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
|
269
|
+
by raising exceptions. In older releases, these exceptions were located in the
|
270
|
+
`Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
|
271
|
+
exception class, defined in the `google-gax` gem. However, these classes were
|
272
|
+
different from the standard exceptions (subclasses of `Google::Cloud::Error`)
|
273
|
+
thrown by other client libraries such as `google-cloud-storage`.
|
274
|
+
|
275
|
+
The 1.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
|
276
|
+
for consistency across all the Google Cloud client libraries. In general, these
|
277
|
+
exceptions have the same name as their counterparts from older releases, but
|
278
|
+
are located in the `Google::Cloud` namespace rather than the `Google::Gax`
|
279
|
+
namespace.
|
280
|
+
|
281
|
+
Old:
|
282
|
+
```
|
283
|
+
client = Google::Cloud::RecaptchaEnterprise.new
|
284
|
+
|
285
|
+
parent = "projects/my-project"
|
286
|
+
|
287
|
+
begin
|
288
|
+
response = client.list_keys parent, page_size: 10
|
289
|
+
rescue Google::Gax::Error => e
|
290
|
+
# Handle exceptions that subclass Google::Gax::Error
|
291
|
+
end
|
292
|
+
```
|
293
|
+
|
294
|
+
New:
|
295
|
+
```
|
296
|
+
client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service
|
297
|
+
|
298
|
+
parent = "projects/my-project"
|
299
|
+
|
300
|
+
begin
|
301
|
+
response = client.list_keys parent: parent, page_size: 10
|
302
|
+
rescue Google::Cloud::Error => e
|
303
|
+
# Handle exceptions that subclass Google::Cloud::Error
|
304
|
+
end
|
305
|
+
```
|
306
|
+
|
261
307
|
### Class Namespaces
|
262
308
|
|
263
309
|
In older releases, (protobuf) data type classes were located under the module
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-recaptcha_enterprise
|
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
|