google-cloud-scheduler 2.1.0 → 2.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: 0fef3aa1839ff5c5fcaf278aa5fb03b522bc8dc218b9b230b0781c388b2cb664
4
- data.tar.gz: 2a6bf024d3272c5ff9e3be45bb4fe30cf7a1f9a351ce71e092b8fe4f09e4c028
3
+ metadata.gz: d8f4217b58de7acdb27f5844ee1846d86c1b921d4ec5ca91037f22418876f096
4
+ data.tar.gz: 1ec7bb133c180da0a217d72b90e369469a36737279b14b4a4093ab29f7e3bb5b
5
5
  SHA512:
6
- metadata.gz: '095c224fa7ad170ff6e6056428eccb18a85dea51c9187e9583be6371f8525ab2e9e8f9b8f71aa6eb42d0d53b5d99ed18f09f75df9599cb378e8c1cd0dfe6cd6f'
7
- data.tar.gz: e3b9cf8c7130c75266abaf960664ccfed643bfd7c806177c240a073363b33f95c221df60ae732d05ce65ddd48db7c6c8cbdcb0ed9c2bf07b61a8dd21c65c2959
6
+ metadata.gz: f5bbf96cc00caf869342285bd29954321cd0f0bcd0481e2fcdfbe690e7b11d4e476a1399101f6aa6bd66364203d0e897078d4c5660a389f95adc6e48938d706b
7
+ data.tar.gz: 16494c26d3ebdef612cc5b5e8b51af55ae517b9c38ec9a141a303da5a3f15cffe047daedfdb855486b36c7f08d72d0b50341a6bf1d3276e41752569252a4f246
@@ -30,6 +30,10 @@ To summarize:
30
30
  resource paths. These methods now take keyword rather than positional
31
31
  arguments, 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
 
@@ -241,7 +245,7 @@ In the 2.0 client, you can also use the paths module as a convenience module.
241
245
 
242
246
  New:
243
247
  ```
244
- # Bring the session_path method into the current class
248
+ # Bring the path helper methods into the current class
245
249
  include Google::Cloud::Scheduler::V1::CloudScheduler::Paths
246
250
 
247
251
  def foo
@@ -256,6 +260,48 @@ def foo
256
260
  end
257
261
  ```
258
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
+
259
305
  ### Class Namespaces
260
306
 
261
307
  In older releases, the client object was of class
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Scheduler
23
- VERSION = "2.1.0"
23
+ VERSION = "2.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-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.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-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core