google-cloud-scheduler 2.6.1 → 2.7.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: 51bbfb2d430ed4fe9625b3cf3cb268ea7d9a66229bbbae1d55c3f490a58eeab7
4
- data.tar.gz: 86da4c35b5a31e484520a861fde5f755a9c2824950d226c2494d07c8b7651348
3
+ metadata.gz: 6c160a91e57c8d23f266a015519e3b306c6bac3dec6827b7b7996fbef9a512a7
4
+ data.tar.gz: 6b2a5636c03b3433385d5e6f18a01b61cf28c5b6ea519dab74444f115bf83449
5
5
  SHA512:
6
- metadata.gz: ce8d2f4e8e9f335969a65455bcc195a273c2477f65a3beb3befcb89f850c20a170f728f2905863253f2d19ebbe6d81332758933641cbdaaa89213fc536714265
7
- data.tar.gz: b847865fe52b303fb0e9063cafda293eb7e6aace0a56d7c006b59568184b14925e649ceff8908899e6e5c5a26247cfa5bb6a332760332d432cc2593fd9dcad9f
6
+ metadata.gz: 2ba262a4d7d20e39b8905574b61e6a31059f1312aebde2bfb01054245e435059a78d3a41f39a9d95f14ced204ed69b65f0221b3d90c3c5ad50a54ec50834f630
7
+ data.tar.gz: acb5db41c92bbd293487c2c91030b5fad0f12c0026ef4c631499174f9e5b2e17214662aff2af88dbd9bdb27e4d00a792fb2b8fec6f35d2892c66a5c54911baae
data/README.md CHANGED
@@ -43,9 +43,40 @@ and includes substantial interface changes. Existing code written for earlier
43
43
  versions of this library will likely require updates to use this version.
44
44
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
45
 
46
+ ## Debug Logging
47
+
48
+ This library comes with opt-in Debug Logging that can help you troubleshoot
49
+ your application's integration with the API. When logging is activated, key
50
+ events such as requests and responses, along with data payloads and metadata
51
+ such as headers and client configuration, are logged to the standard error
52
+ stream.
53
+
54
+ **WARNING:** Client Library Debug Logging includes your data payloads in
55
+ plaintext, which could include sensitive data such as PII for yourself or your
56
+ customers, private keys, or other security data that could be compromising if
57
+ leaked. Always practice good data hygiene with your application logs, and follow
58
+ the principle of least access. Google also recommends that Client Library Debug
59
+ Logging be enabled only temporarily during active debugging, and not used
60
+ permanently in production.
61
+
62
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
63
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
64
+ list of client library gem names. This will select the default logging behavior,
65
+ which writes logs to the standard error stream. On a local workstation, this may
66
+ result in logs appearing on the console. When running on a Google Cloud hosting
67
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
68
+ results in logs appearing alongside your application logs in the
69
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
70
+
71
+ Debug logging also requires that the versioned clients for this service be
72
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
73
+ 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).
76
+
46
77
  ## Supported Ruby Versions
47
78
 
48
- This library is supported on Ruby 2.7+.
79
+ This library is supported on Ruby 3.0+.
49
80
 
50
81
  Google provides official support for Ruby versions that are actively supported
51
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Scheduler
23
- VERSION = "2.6.1"
23
+ VERSION = "2.7.0"
24
24
  end
25
25
  end
26
26
  end
@@ -58,6 +58,11 @@ module Google
58
58
  # You can also specify a different transport by passing `:rest` or `:grpc` in
59
59
  # the `transport` parameter.
60
60
  #
61
+ # Raises an exception if the currently installed versioned client gem for the
62
+ # given API version does not support the given transport of the CloudScheduler service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::Scheduler.cloud_scheduler_available?}.
65
+ #
61
66
  # ## About CloudScheduler
62
67
  #
63
68
  # The Cloud Scheduler API allows external entities to reliably
@@ -80,6 +85,37 @@ module Google
80
85
  service_module.const_get(:Client).new(&block)
81
86
  end
82
87
 
88
+ ##
89
+ # Determines whether the CloudScheduler service is supported by the current client.
90
+ # If true, you can retrieve a client object by calling {Google::Cloud::Scheduler.cloud_scheduler}.
91
+ # If false, that method will raise an exception. This could happen if the given
92
+ # API version does not exist or does not support the CloudScheduler service,
93
+ # or if the versioned client gem needs an update to support the CloudScheduler service.
94
+ #
95
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
96
+ # Defaults to `:v1`.
97
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
98
+ # @return [boolean] Whether the service is available.
99
+ #
100
+ def self.cloud_scheduler_available? version: :v1, transport: :grpc
101
+ require "google/cloud/scheduler/#{version.to_s.downcase}"
102
+ package_name = Google::Cloud::Scheduler
103
+ .constants
104
+ .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
105
+ .first
106
+ return false unless package_name
107
+ service_module = Google::Cloud::Scheduler.const_get package_name
108
+ return false unless service_module.const_defined? :CloudScheduler
109
+ service_module = service_module.const_get :CloudScheduler
110
+ if transport == :rest
111
+ return false unless service_module.const_defined? :Rest
112
+ service_module = service_module.const_get :Rest
113
+ end
114
+ service_module.const_defined? :Client
115
+ rescue ::LoadError
116
+ false
117
+ end
118
+
83
119
  ##
84
120
  # Configure the google-cloud-scheduler library.
85
121
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-scheduler
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-08-08 00:00:00.000000000 Z
10
+ date: 2025-01-29 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: google-cloud-core
@@ -87,7 +86,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
87
86
  licenses:
88
87
  - Apache-2.0
89
88
  metadata: {}
90
- post_install_message:
91
89
  rdoc_options: []
92
90
  require_paths:
93
91
  - lib
@@ -95,15 +93,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
93
  requirements:
96
94
  - - ">="
97
95
  - !ruby/object:Gem::Version
98
- version: '2.7'
96
+ version: '3.0'
99
97
  required_rubygems_version: !ruby/object:Gem::Requirement
100
98
  requirements:
101
99
  - - ">="
102
100
  - !ruby/object:Gem::Version
103
101
  version: '0'
104
102
  requirements: []
105
- rubygems_version: 3.5.6
106
- signing_key:
103
+ rubygems_version: 3.6.2
107
104
  specification_version: 4
108
105
  summary: API Client library for the Cloud Scheduler API
109
106
  test_files: []