google-cloud-recaptcha_enterprise 1.6.0 → 2.0.0

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: 4a0d40c57d5366089454b503dd0446d15ac7e4673ded45c062af04d936e9346d
4
- data.tar.gz: 6483a431a559dbebd5659b784563c2c4986ee45c67d99cb17d89547e528debbe
3
+ metadata.gz: 9957102654faddf6423a88e0bcb8166bf5eb91e856742d1ad814d81e116f9297
4
+ data.tar.gz: c651dc3cc5bc908d25a7ffc60b5da5c5fcf93bb6a9275825a659493b8307bf28
5
5
  SHA512:
6
- metadata.gz: 2b1ae48f1bd15b1f871e9785cb979b8a84d27655bd40c4a4d3c949d8640ba0f134beaa9422390f861b1856a53bb20980ccef90000abe81d61f4ac5f7cf32655e
7
- data.tar.gz: 7b22ba97fbd67a10a4e76839253848dcb560bc0a9e61bcdd58bd776f47a32beeb339458aa42c773f9af451c08554499da282c7ea16599ea7760033ebcbb5c440
6
+ metadata.gz: 2ce4d78ee05361329cd6c23aa153b6eca4f5d682e350735fb6e6f7b405f2ebe07813d6eb740e46a644796f1321b4c1c12584d0e87ad0a3047d33a2f356da0c1f
7
+ data.tar.gz: 24d86e730278466ecc59e3e4538930a152d526901f5ab0951684c3313a542591d93f33767da7030be2a7274dbd59b55adba39d535de8e7e1a9de586bdb7204ea
data/.yardopts CHANGED
@@ -8,5 +8,4 @@
8
8
  -
9
9
  README.md
10
10
  AUTHENTICATION.md
11
- MIGRATING.md
12
11
  LICENSE.md
data/README.md CHANGED
@@ -16,8 +16,7 @@ for this library, google-cloud-recaptcha_enterprise, to see the convenience meth
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
18
18
  client gems:
19
- [google-cloud-recaptcha_enterprise-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest),
20
- [google-cloud-recaptcha_enterprise-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1beta1/latest).
19
+ [google-cloud-recaptcha_enterprise-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/recaptcha-enterprise)
23
22
  for more usage information.
@@ -35,14 +34,6 @@ In order to use this library, you first need to go through the following steps:
35
34
  1. [Enable the API.](https://console.cloud.google.com/apis/library/recaptchaenterprise.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
38
- ## Migrating from 0.x versions
39
-
40
- The 1.0 release of the google-cloud-recaptcha_enterprise client is a significant upgrade
41
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
42
- and includes substantial interface changes. Existing code written for earlier
43
- versions of this library will likely require updates to use this version.
44
- See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
-
46
37
  ## Debug Logging
47
38
 
48
39
  This library comes with opt-in Debug Logging that can help you troubleshoot
@@ -71,8 +62,7 @@ results in logs appearing alongside your application logs in the
71
62
  Debug logging also requires that the versioned clients for this service be
72
63
  sufficiently recent, released after about Dec 10, 2024. If logging is not
73
64
  working, try updating the versioned clients in your bundle or installed gems:
74
- [google-cloud-recaptcha_enterprise-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest),
75
- [google-cloud-recaptcha_enterprise-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1beta1/latest).
65
+ [google-cloud-recaptcha_enterprise-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-recaptcha_enterprise-v1/latest).
76
66
 
77
67
  ## Supported Ruby Versions
78
68
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module RecaptchaEnterprise
23
- VERSION = "1.6.0"
23
+ VERSION = "2.0.0"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-recaptcha_enterprise
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-29 00:00:00.000000000 Z
10
+ date: 2025-02-13 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: google-cloud-core
@@ -27,42 +27,16 @@ dependencies:
27
27
  name: google-cloud-recaptcha_enterprise-v1
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0.17'
33
- - - "<"
34
- - !ruby/object:Gem::Version
35
- version: 2.a
36
- type: :runtime
37
- prerelease: false
38
- version_requirements: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: '0.17'
43
- - - "<"
44
- - !ruby/object:Gem::Version
45
- version: 2.a
46
- - !ruby/object:Gem::Dependency
47
- name: google-cloud-recaptcha_enterprise-v1beta1
48
- requirement: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: '0.12'
53
- - - "<"
30
+ - - "~>"
54
31
  - !ruby/object:Gem::Version
55
- version: 2.a
32
+ version: '1.6'
56
33
  type: :runtime
57
34
  prerelease: false
58
35
  version_requirements: !ruby/object:Gem::Requirement
59
36
  requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0.12'
63
- - - "<"
37
+ - - "~>"
64
38
  - !ruby/object:Gem::Version
65
- version: 2.a
39
+ version: '1.6'
66
40
  description: reCAPTCHA Enterprise is a service that protects your site from spam and
67
41
  abuse.
68
42
  email: googleapis-packages@google.com
@@ -73,7 +47,6 @@ files:
73
47
  - ".yardopts"
74
48
  - AUTHENTICATION.md
75
49
  - LICENSE.md
76
- - MIGRATING.md
77
50
  - README.md
78
51
  - lib/google-cloud-recaptcha_enterprise.rb
79
52
  - lib/google/cloud/recaptcha_enterprise.rb
@@ -96,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
69
  - !ruby/object:Gem::Version
97
70
  version: '0'
98
71
  requirements: []
99
- rubygems_version: 3.6.2
72
+ rubygems_version: 3.6.3
100
73
  specification_version: 4
101
74
  summary: API Client library for the reCAPTCHA Enterprise API
102
75
  test_files: []
data/MIGRATING.md DELETED
@@ -1,329 +0,0 @@
1
- ## Migrating to google-cloud-recaptcha_enterprise 1.0
2
-
3
- The 1.0 release of the google-cloud-recaptcha_enterprise client is a significant upgrade
4
- based on a [next-gen code generator](https://github.com/googleapis/gapic-generator-ruby),
5
- and includes substantial interface changes. Existing code written for earlier
6
- versions of this library will likely require updates to use this version.
7
- This document describes the changes that have been made, and what you need to
8
- do to update your usage.
9
-
10
- To summarize:
11
-
12
- * The 1.0 release supports versions V1 and V1beta1 of the reCAPTCHA
13
- Enterprise service. Earlier releases supported only V1beta1.
14
- * The library has been broken out into multiple libraries. The new gems
15
- `google-cloud-recaptcha_enterprise-v1` and `google-cloud-recaptcha_enterprise-v1beta1` contain the
16
- actual client classes for versions V1 and V1beta1 of the reCAPTCHA Enterprise service,
17
- and the gem `google-cloud-recaptcha_enterprise` now simply provides a convenience wrapper.
18
- See [Library Structure](#library-structure) for more info.
19
- * The library uses a new configuration mechanism giving you closer control
20
- over endpoint address, network timeouts, and retry. See
21
- [Client Configuration](#client-configuration) for more info. Furthermore,
22
- when creating a client object, you can customize its configuration in a
23
- block rather than passing arguments to the constructor. See
24
- [Creating Clients](#creating-clients) for more info.
25
- * Previously, positional arguments were used to indicate required arguments.
26
- Now, all method arguments are keyword arguments, with documentation that
27
- specifies whether they are required or optional. Additionally, you can pass
28
- a proto request object instead of separate arguments. See
29
- [Passing Arguments](#passing-arguments) for more info.
30
- * Previously, some client classes included helper methods for constructing
31
- resource paths. These methods now take keyword rather than positional
32
- arguments, and are also available in a separate paths module. See
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.
38
- * Some classes have moved into different namespaces. In particular, classes
39
- that were under `Google::Cloud::Recaptchaenterprise` were moved under
40
- `Google::Cloud::RecaptchaEnterprise`. See
41
- [Class Namespaces](#class-namespaces) for more info.
42
-
43
- ### Library Structure
44
-
45
- Older 0.x releases of the `google-cloud-recaptcha_enterprise` gem were all-in-one gems
46
- that included potentially multiple clients for multiple versions of the
47
- reCAPTCHA Enterprise service. The `Google::Cloud::RecaptchaEnterprise.new` factory method would
48
- return you an instance of a `Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseClient`
49
- object for the V1beta1 version of the service. (Version V1 of the service was
50
- not supported by 0.x releases.) All these classes were defined in the same gem.
51
-
52
- With the 1.0 release, the `google-cloud-recaptcha_enterprise` gem still provides factory
53
- methods for obtaining clients. (The method signatures will have changed. See
54
- [Creating Clients](#creating-clients) for details.) However, the actual client
55
- classes have been moved into separate gems, one per service version. The
56
- `Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client` class, along with its
57
- helpers and data types, is now part of the `google-cloud-recaptcha_enterprise-v1` gem.
58
- Similarly, the `Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client`
59
- class is part of the `google-cloud-recaptcha_enterprise-v1beta1` gem.
60
-
61
- For normal usage, you can continue to install the `google-cloud-recaptcha_enterprise` gem
62
- (which will bring in the versioned client gems as dependencies) and continue to
63
- use factory methods to create clients. However, you may alternatively choose to
64
- install only one of the versioned gems. For example, if you know you will only
65
- use `V1` of the service, you can install `google-cloud-recaptcha_enterprise-v1` by
66
- itself, and construct instances of the
67
- `Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client` client class directly.
68
-
69
- ### Client Configuration
70
-
71
- In older releases, if you wanted to customize performance parameters or
72
- low-level behavior of the client (such as credentials, timeouts, or
73
- instrumentation), you would pass a variety of keyword arguments to the client
74
- constructor. It was also extremely difficult to customize the default settings.
75
-
76
- With the 1.0 release, a configuration interface provides control over these
77
- parameters, including defaults for all instances of a client, and settings for
78
- each specific client instance. For example, to set default credentials and
79
- timeout for all reCAPTCHA Enterprise V1 clients:
80
-
81
- ```
82
- Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config|
83
- config.credentials = "/path/to/credentials.json"
84
- config.timeout = 10.0
85
- end
86
- ```
87
-
88
- Individual RPCs can also be configured independently. For example, to set the
89
- timeout for the `create_assessment` call:
90
-
91
- ```
92
- Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Client.configure do |config|
93
- config.rpcs.create_assessment.timeout = 20.0
94
- end
95
- ```
96
-
97
- Defaults for certain configurations can be set for all reCAPTCHA Enterprise versions and
98
- services globally:
99
-
100
- ```
101
- Google::Cloud::RecaptchaEnterprise.configure do |config|
102
- config.credentials = "/path/to/credentials.json"
103
- config.timeout = 10.0
104
- end
105
- ```
106
-
107
- Finally, you can override the configuration for each client instance. See the
108
- next section on [Creating Clients](#creating-clients) for details.
109
-
110
- ### Creating Clients
111
-
112
- In older releases, to create a client object, you would use the
113
- `Google::Cloud::RecaptchaEnterprise.new` class method. Keyword arguments were available to
114
- select a service version and to configure parameters such as credentials and
115
- timeouts.
116
-
117
- With the 1.0 release, use the `Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service` class
118
- method to create a client object. You may select a service version using the
119
- `:version` keyword argument. However, other configuration parameters should be
120
- set in a configuration block when you create the client.
121
-
122
- Old:
123
- ```
124
- client = Google::Cloud::RecaptchaEnterprise.new credentials: "/path/to/credentials.json"
125
- ```
126
-
127
- New:
128
- ```
129
- client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service do |config|
130
- config.credentials = "/path/to/credentials.json"
131
- end
132
- ```
133
-
134
- The configuration block is optional. If you do not provide it, or you do not
135
- set some configuration parameters, then the default configuration is used. See
136
- [Client Configuration](#client-configuration).
137
-
138
- ### Passing Arguments
139
-
140
- In older releases, required arguments would be passed as positional method
141
- arguments, while most optional arguments would be passed as keyword arguments.
142
-
143
- With the 1.0 release, all RPC arguments are passed as keyword arguments,
144
- regardless of whether they are required or optional. For example:
145
-
146
- Old:
147
- ```
148
- client = Google::Cloud::RecaptchaEnterprise.new
149
-
150
- parent = "projects/my-project"
151
-
152
- # Parent is a positional argument, while page_size is a keyword argument.
153
- response = client.list_keys parent, page_size: 10
154
- ```
155
-
156
- New:
157
- ```
158
- client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service
159
-
160
- parent = "projects/my-project"
161
-
162
- # Both parent and page_size are keyword arguments.
163
- response = client.list_keys parent: parent, page_size: 10
164
- ```
165
-
166
- In the 1.0 release, it is also possible to pass a request object, either
167
- as a hash or as a protocol buffer.
168
-
169
- New:
170
- ```
171
- client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service
172
-
173
- request = Google::Cloud::RecaptchaEnterprise::V1::ListKeysRequest.new(
174
- parent: "projects/my-project",
175
- page_size: 10
176
- )
177
-
178
- # Pass a request object as a positional argument:
179
- response = client.list_keys request
180
- ```
181
-
182
- Finally, in older releases, to provide call options, you would pass a
183
- `Google::Gax::CallOptions` object with the `:options` keyword argument. In the
184
- 1.0 release, pass call options using a _second set_ of keyword arguments.
185
-
186
- Old:
187
- ```
188
- client = Google::Cloud::RecaptchaEnterprise.new
189
-
190
- parent = "projects/my-project"
191
-
192
- options = Google::Gax::CallOptions.new timeout: 10.0
193
-
194
- response = client.list_keys parent, page_size: 10, options: options
195
- ```
196
-
197
- New:
198
- ```
199
- client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service
200
-
201
- parent = "projects/my-project"
202
-
203
- # Use a hash to wrap the normal call arguments (or pass a request object), and
204
- # then add further keyword arguments for the call options.
205
- response = client.list_keys(
206
- { parent: parent, page_size: 10 },
207
- timeout: 10.0
208
- )
209
- ```
210
-
211
- ### Resource Path Helpers
212
-
213
- The client library includes helper methods for generating the resource path
214
- strings passed to many calls. These helpers have changed in two ways:
215
-
216
- * In older releases, they are both _class_ methods and _instance_ methods on
217
- the client class. In the 1.0 release, they are _instance methods only_.
218
- However, they are also available on a separate paths module that you can
219
- include elsewhere for convenience.
220
- * In older releases, arguments to a resource path helper are passed as
221
- _positional_ arguments. In the 1.0 release, they are passed as named _keyword_
222
- arguments.
223
-
224
- Following is an example involving using a resource path helper.
225
-
226
- Old:
227
- ```
228
- client = Google::Cloud::RecaptchaEnterprise.new
229
-
230
- # Call the helper using positional arguments.
231
- parent = client.project_path "my-project"
232
-
233
- response = client.list_keys parent
234
- ```
235
-
236
- New:
237
- ```
238
- client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service
239
-
240
- # Call the helper using keyword arguments
241
- parent = client.project_path project: "my-project"
242
-
243
- response = client.list_keys parent: parent
244
- ```
245
-
246
- In the 1.0 client, you can also use the paths module as a convenience module.
247
-
248
- New:
249
- ```
250
- # Bring the path helper methods into the current class
251
- include Google::Cloud::RecaptchaEnterprise::V1::RecaptchaEnterpriseService::Paths
252
-
253
- def foo
254
- client = Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service
255
-
256
- # Call the included helper method
257
- parent = project_path project: "my-project"
258
-
259
- response = client.list_keys parent: parent
260
-
261
- # Do something with response...
262
- end
263
- ```
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
-
307
- ### Class Namespaces
308
-
309
- In older releases, (protobuf) data type classes were located under the module
310
- `Google::Cloud::Recaptchaenterprise` (note the lower-case "e"), even though the
311
- client class and most other classes were under `Google::Cloud::RecaptchaEnterprise`
312
- (with an upper-case "E"). In the 1.0 release, all classes, including data types,
313
- are under the module `Google::Cloud::RecaptchaEnterprise`.
314
-
315
- In older releases, the client object was of classes with names like:
316
- `Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseClient`.
317
- In the 1.0 release, the corresponding client object is of a different class:
318
- `Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Client`.
319
- Note that most users will use the factory methods such as
320
- `Google::Cloud::RecaptchaEnterprise.recaptcha_enterprise_service` to create instances of the client object,
321
- so you may not need to reference the actual class directly.
322
- See [Creating Clients](#creating-clients).
323
-
324
- In older releases, the credentials object was of class
325
- `Google::Cloud::RecaptchaEnterprise::V1beta1::Credentials`.
326
- In the 1.0 release, each service has its own credentials class, e.g.
327
- `Google::Cloud::RecaptchaEnterprise::V1beta1::RecaptchaEnterpriseService::Credentials`.
328
- Again, most users will not need to reference this class directly.
329
- See [Client Configuration](#client-configuration).