google-cloud-scheduler 2.7.0 → 3.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: 6c160a91e57c8d23f266a015519e3b306c6bac3dec6827b7b7996fbef9a512a7
4
- data.tar.gz: 6b2a5636c03b3433385d5e6f18a01b61cf28c5b6ea519dab74444f115bf83449
3
+ metadata.gz: 146e7b2e2ba3614b4c1b4de905b10e3ea675e36f06f500b4734b6d68d8ca081a
4
+ data.tar.gz: 6ed470bb638760e06a0bae4928e8031928e852e5b6e21948f69e2c92d2b483b0
5
5
  SHA512:
6
- metadata.gz: 2ba262a4d7d20e39b8905574b61e6a31059f1312aebde2bfb01054245e435059a78d3a41f39a9d95f14ced204ed69b65f0221b3d90c3c5ad50a54ec50834f630
7
- data.tar.gz: acb5db41c92bbd293487c2c91030b5fad0f12c0026ef4c631499174f9e5b2e17214662aff2af88dbd9bdb27e4d00a792fb2b8fec6f35d2892c66a5c54911baae
6
+ metadata.gz: 21d00a7319bb4ec0e4ebfb0c67c9c4754e3d2a42b9112128f539c49609f0422f7d21f66716e267d20c521b71201215cf2123df79a9458ab527b3f4e8f101c961
7
+ data.tar.gz: 97700ee580056c9814d2f38e2ee3b239a2df510156d46e559fa64772607f79f4c25176f64fd905bf69b23f471dd3842d52f634f0547b3401af99fc72fe59042c
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-scheduler, to see the convenience methods for
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-scheduler-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest),
20
- [google-cloud-scheduler-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1beta1/latest).
19
+ [google-cloud-scheduler-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest).
21
20
 
22
21
  See also the [Product Documentation](https://cloud.google.com/scheduler)
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/cloudscheduler.googleapis.com)
36
35
  1. {file:AUTHENTICATION.md Set up authentication.}
37
36
 
38
- ## Migrating from 1.x versions
39
-
40
- The 2.0 release of the google-cloud-scheduler 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-scheduler-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1/latest),
75
- [google-cloud-scheduler-v1beta1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-v1beta1/latest).
65
+ [google-cloud-scheduler-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-scheduler-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 Scheduler
23
- VERSION = "2.7.0"
23
+ VERSION = "3.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-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 3.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-scheduler-v1
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0.10'
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.10'
43
- - - "<"
44
- - !ruby/object:Gem::Version
45
- version: 2.a
46
- - !ruby/object:Gem::Dependency
47
- name: google-cloud-scheduler-v1beta1
48
- requirement: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: '0.10'
53
- - - "<"
30
+ - - "~>"
54
31
  - !ruby/object:Gem::Version
55
- version: 2.a
32
+ version: '1.2'
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.10'
63
- - - "<"
37
+ - - "~>"
64
38
  - !ruby/object:Gem::Version
65
- version: 2.a
39
+ version: '1.2'
66
40
  description: Cloud Scheduler is a fully managed enterprise-grade cron job scheduler.
67
41
  It allows you to schedule virtually any job, including batch, big data jobs, cloud
68
42
  infrastructure operations, and more. You can automate everything, including retries
@@ -77,7 +51,6 @@ files:
77
51
  - ".yardopts"
78
52
  - AUTHENTICATION.md
79
53
  - LICENSE.md
80
- - MIGRATING.md
81
54
  - README.md
82
55
  - lib/google-cloud-scheduler.rb
83
56
  - lib/google/cloud/scheduler.rb
@@ -100,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
73
  - !ruby/object:Gem::Version
101
74
  version: '0'
102
75
  requirements: []
103
- rubygems_version: 3.6.2
76
+ rubygems_version: 3.6.3
104
77
  specification_version: 4
105
78
  summary: API Client library for the Cloud Scheduler API
106
79
  test_files: []
data/MIGRATING.md DELETED
@@ -1,321 +0,0 @@
1
- ## Migrating to google-cloud-scheduler 2.0
2
-
3
- The 2.0 release of the google-cloud-scheduler 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 library has been broken out into three libraries. The new gems
13
- `google-cloud-scheduler-v1` and `google-cloud-scheduler-v1beta1` contain the
14
- actual client classes for versions V1 and V1beta1 of the Cloud Scheduler
15
- service, and the gem `google-cloud-scheduler` now simply provides a
16
- convenience wrapper. See [Library Structure](#library-structure) for more
17
- info.
18
- * The library uses a new configuration mechanism giving you closer control
19
- over endpoint address, network timeouts, and retry. See
20
- [Client Configuration](#client-configuration) for more info. Furthermore,
21
- when creating a client object, you can customize its configuration in a
22
- block rather than passing arguments to the constructor. See
23
- [Creating Clients](#creating-clients) for more info.
24
- * Previously, positional arguments were used to indicate required arguments.
25
- Now, all method arguments are keyword arguments, with documentation that
26
- specifies whether they are required or optional. Additionally, you can pass
27
- a proto request object instead of separate arguments. See
28
- [Passing Arguments](#passing-arguments) for more info.
29
- * Previously, some client classes included helper methods for constructing
30
- resource paths. These methods now take keyword rather than positional
31
- arguments, and are also available in a separate paths module. See
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.
37
- * Some classes have moved into different namespaces. See
38
- [Class Namespaces](#class-namespaces) for more info.
39
-
40
- ### Library Structure
41
-
42
- Older 1.x releases of the `google-cloud-scheduler` gem were all-in-one gems that
43
- included potentially multiple clients for multiple versions of the Cloud
44
- Scheduler service. The `Google::Cloud::Scheduler.new` factory method would
45
- return you an instance of a `Google::Cloud::Scheduler::V1::CloudSchedulerClient`
46
- object for the V1 version of the service, or a
47
- `Google::Cloud::Scheduler::V1beta1::CloudSchedulerClient` object for the
48
- V1beta1 version of the service. All these classes were defined in the same gem.
49
-
50
- With the 2.0 release, the `google-cloud-scheduler` gem still provides factory
51
- methods for obtaining clients. (The method signatures will have changed. See
52
- [Creating Clients](#creating-clients) for details.) However, the actual client
53
- classes have been moved into separate gems, one per service version. The
54
- `Google::Cloud::Scheduler::V1::CloudScheduler::Client` class, along with its
55
- helpers and data types, is now part of the `google-cloud-scheduler-v1` gem.
56
- Similarly, the `Google::Cloud::Scheduler::V1beta1::CloudScheduler::Client`
57
- class is part of the `google-cloud-scheduler-v1beta1` gem.
58
-
59
- For normal usage, you can continue to install the `google-cloud-scheduler` gem
60
- (which will bring in the versioned client gems as dependencies) and continue to
61
- use factory methods to create clients. However, you may alternatively choose to
62
- install only one of the versioned gems. For example, if you know you will use only
63
- `V1` of the service, you can install `google-cloud-scheduler-v1` by itself, and
64
- construct instances of the
65
- `Google::Cloud::Scheduler::V1::CloudScheduler::Client` client class directly.
66
-
67
- ### Client Configuration
68
-
69
- In older releases, if you wanted to customize performance parameters or
70
- low-level behavior of the client (such as credentials, timeouts, or
71
- instrumentation), you would pass a variety of keyword arguments to the client
72
- constructor. It was also extremely difficult to customize the default settings.
73
-
74
- With the 2.0 release, a configuration interface provides control over these
75
- parameters, including defaults for all instances of a client, and settings for
76
- each specific client instance. For example, to set default credentials and
77
- timeout for all Cloud Scheduler V1 clients:
78
-
79
- ```
80
- Google::Cloud::Scheduler::V1::CloudScheduler::Client.configure do |config|
81
- config.credentials = "/path/to/credentials.json"
82
- config.timeout = 10.0
83
- end
84
- ```
85
-
86
- Individual RPCs can also be configured independently. For example, to set the
87
- timeout for the `list_jobs` call:
88
-
89
- ```
90
- Google::Cloud::Scheduler::V1::CloudScheduler::Client.configure do |config|
91
- config.rpcs.list_jobs.timeout = 20.0
92
- end
93
- ```
94
-
95
- Defaults for certain configurations can be set for all Scheduler versions
96
- globally:
97
-
98
- ```
99
- Google::Cloud::Scheduler.configure do |config|
100
- config.credentials = "/path/to/credentials.json"
101
- config.timeout = 10.0
102
- end
103
- ```
104
-
105
- Finally, you can override the configuration for each client instance. See the
106
- next section on [Creating Clients](#creating-clients) for details.
107
-
108
- ### Creating Clients
109
-
110
- In older releases, to create a client object, you would use the
111
- `Google::Cloud::Scheduler.new` class method. Keyword arguments were available to
112
- select a service version and to configure parameters such as credentials and
113
- timeouts.
114
-
115
- With the 2.0 release, use the `Google::Cloud::Scheduler.cloud_scheduler` class
116
- method to create a client object. You may select a service version using the
117
- `:version` keyword argument. However, other configuration parameters should be
118
- set in a configuration block when you create the client.
119
-
120
- Old:
121
- ```
122
- client = Google::Cloud::Scheduler.new credentials: "/path/to/credentials.json"
123
- ```
124
-
125
- New:
126
- ```
127
- client = Google::Cloud::Scheduler.cloud_scheduler do |config|
128
- config.credentials = "/path/to/credentials.json"
129
- end
130
- ```
131
-
132
- The configuration block is optional. If you do not provide it, or you do not
133
- set some configuration parameters, then the default configuration is used. See
134
- [Client Configuration](#client-configuration).
135
-
136
- ### Passing Arguments
137
-
138
- In older releases, required arguments would be passed as positional method
139
- arguments, while most optional arguments would be passed as keyword arguments.
140
-
141
- With the 2.0 release, all RPC arguments are passed as keyword arguments,
142
- regardless of whether they are required or optional. For example:
143
-
144
- Old:
145
- ```
146
- client = Google::Cloud::Scheduler.new
147
-
148
- parent = "projects/my-project/locations/-"
149
-
150
- # Parent is a positional argument, while page_size is a keyword argument.
151
- response = client.list_jobs parent, page_size: 10
152
- ```
153
-
154
- New:
155
- ```
156
- client = Google::Cloud::Scheduler.cloud_scheduler
157
-
158
- parent = "projects/my-project/locations/-"
159
-
160
- # Both parent and page_size are keyword arguments.
161
- response = client.list_jobs parent: parent, page_size: 10
162
- ```
163
-
164
- In the 2.0 release, it is also possible to pass a request object, either
165
- as a hash or as a protocol buffer.
166
-
167
- New:
168
- ```
169
- client = Google::Cloud::Scheduler.cloud_scheduler
170
-
171
- request = Google::Cloud::Scheduler::V1::ListJobsRequest.new(
172
- parent: "projects/my-project/locations/-",
173
- page_size: 10
174
- )
175
-
176
- # Pass a request object as a positional argument:
177
- response = client.list_jobs request
178
- ```
179
-
180
- Finally, in older releases, to provide call options, you would pass a
181
- `Google::Gax::CallOptions` object with the `:options` keyword argument. In the
182
- 2.0 release, pass call options using a _second set_ of keyword arguments.
183
-
184
- Old:
185
- ```
186
- client = Google::Cloud::Scheduler.new
187
-
188
- parent = "projects/my-project/locations/-"
189
-
190
- options = Google::Gax::CallOptions.new timeout: 10.0
191
-
192
- response = client.list_jobs parent, page_size: 10, options: options
193
- ```
194
-
195
- New:
196
- ```
197
- client = Google::Cloud::Scheduler.cloud_scheduler
198
-
199
- parent = "projects/my-project/locations/-"
200
-
201
- # Use a hash to wrap the normal call arguments (or pass a request object), and
202
- # then add further keyword arguments for the call options.
203
- response = client.list_jobs(
204
- { parent: parent, page_size: 10 },
205
- timeout: 10.0
206
- )
207
- ```
208
-
209
- ### Resource Path Helpers
210
-
211
- The client library includes helper methods for generating the resource path
212
- strings passed to many calls. These helpers have changed in two ways:
213
-
214
- * In older releases, they are both _class_ methods and _instance_ methods on
215
- the client class. In the 2.0 release, they are _instance methods only_.
216
- However, they are also available on a separate paths module that you can
217
- include elsewhere for convenience.
218
- * In older releases, arguments to a resource path helper are passed as
219
- _positional_ arguments. In the 2.0 release, they are passed as named _keyword_
220
- arguments.
221
-
222
- Following is an example involving using a resource path helper.
223
-
224
- Old:
225
- ```
226
- client = Google::Cloud::Scheduler.new
227
-
228
- # Call the helper using positional arguments.
229
- parent = client.location_path "my-project", "-"
230
-
231
- response = client.list_jobs parent
232
- ```
233
-
234
- New:
235
- ```
236
- client = Google::Cloud::Scheduler.cloud_scheduler
237
-
238
- # Call the helper using keyword arguments
239
- parent = client.location_path project: "my-project", location: "-"
240
-
241
- response = client.list_jobs parent: parent
242
- ```
243
-
244
- In the 2.0 client, you can also use the paths module as a convenience module.
245
-
246
- New:
247
- ```
248
- # Bring the path helper methods into the current class
249
- include Google::Cloud::Scheduler::V1::CloudScheduler::Paths
250
-
251
- def foo
252
- client = Google::Cloud::Scheduler.cloud_scheduler
253
-
254
- # Call the included helper method
255
- parent = location_path project: "my-project", location: "-"
256
-
257
- response = client.list_jobs parent: parent
258
-
259
- # Do something with response...
260
- end
261
- ```
262
-
263
- ### Handling Errors
264
-
265
- The client reports standard
266
- [gRPC error codes](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)
267
- by raising exceptions. In older releases, these exceptions were located in the
268
- `Google::Gax` namespace and were subclasses of the `Google::Gax::GaxError` base
269
- exception class, defined in the `google-gax` gem. However, these classes were
270
- different from the standard exceptions (subclasses of `Google::Cloud::Error`)
271
- thrown by other client libraries such as `google-cloud-storage`.
272
-
273
- The 2.0 client library now uses the `Google::Cloud::Error` exception hierarchy,
274
- for consistency across all the Google Cloud client libraries. In general, these
275
- exceptions have the same name as their counterparts from older releases, but
276
- are located in the `Google::Cloud` namespace rather than the `Google::Gax`
277
- namespace.
278
-
279
- Old:
280
- ```
281
- client = Google::Cloud::Scheduler.new
282
-
283
- parent = "projects/my-project/locations/-"
284
-
285
- begin
286
- response = client.list_jobs parent, page_size: 10
287
- rescue Google::Gax::Error => e
288
- # Handle exceptions that subclass Google::Gax::Error
289
- end
290
- ```
291
-
292
- New:
293
- ```
294
- client = Google::Cloud::Scheduler.cloud_scheduler
295
-
296
- parent = "projects/my-project/locations/-"
297
-
298
- begin
299
- response = client.list_jobs parent: parent, page_size: 10
300
- rescue Google::Cloud::Error => e
301
- # Handle exceptions that subclass Google::Cloud::Error
302
- end
303
- ```
304
-
305
- ### Class Namespaces
306
-
307
- In older releases, the client object was of class
308
- `Google::Cloud::Scheduler::V1::CloudSchedulerClient`.
309
- In the 2.0 release, the client object is of class
310
- `Google::Cloud::Scheduler::V1::CloudScheduler::Client`.
311
- Note that most users will use the `Google::Cloud::Scheduler.cloud_scheduler`
312
- factory method to create instances of the client object, so you may not need to
313
- reference the actual class directly.
314
- See [Creating Clients](#creating-clients).
315
-
316
- In older releases, the credentials object was of class
317
- `Google::Cloud::Scheduler::V1::Credentials`.
318
- In the 2.0 release, the credentials object is of class
319
- `Google::Cloud::Scheduler::V1::CloudScheduler::Credentials`.
320
- Again, most users will not need to reference this class directly.
321
- See [Client Configuration](#client-configuration).