google-cloud-tasks 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1cc50dfecb3f597a199a499fb844ed1aeaf64a01c236929f52e98952f64812ca
4
- data.tar.gz: f35ccb520f801b76804e416ff511e4a8f2ae020bc057561f894d5fa53e684535
3
+ metadata.gz: e2cfac8a910b3a3267718f729c25f2e03b83f9fbf1b8135b5fc7d1a1b9d76b39
4
+ data.tar.gz: 0f68d1169edfa70549b2074da178740a1f8038dd8d6b89eb7895a9e648d7f961
5
5
  SHA512:
6
- metadata.gz: 30974d1760b15207036e1835325382b31ded4d0e1fc61f4837ce3b3eec7fefd4a79295ce291989d7d107629b8289c28cff90b25aa33d8b0bbec015fc3a9ee9b2
7
- data.tar.gz: 1f633682a2c97b82aefb92a970f285dffbbde84c18ffdfdef4b3ddcf088cf585a6aeea3d3128a893508913a6ef3ffdb99c530c2bd8448cbc98354a0468d9918a
6
+ metadata.gz: 74b32073e5b3ff07450cdcbda7362248a3b626a77631237d39fbe0266f493d21b23910b27124fb048ed5e610c63e27bafeea6fdb3173b416d6c9736c14247568
7
+ data.tar.gz: a2eff5bd67fcc9c31b85aee092fb6554d6450bf198a266059c1c9cfa4d1fedc217e4f33ab49abc3bf0d56ac178e110ab2b0d37c32739891116813958e8beaf6f
data/README.md CHANGED
@@ -44,9 +44,41 @@ and includes substantial interface changes. Existing code written for earlier
44
44
  versions of this library will likely require updates to use this version.
45
45
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
46
46
 
47
+ ## Debug Logging
48
+
49
+ This library comes with opt-in Debug Logging that can help you troubleshoot
50
+ your application's integration with the API. When logging is activated, key
51
+ events such as requests and responses, along with data payloads and metadata
52
+ such as headers and client configuration, are logged to the standard error
53
+ stream.
54
+
55
+ **WARNING:** Client Library Debug Logging includes your data payloads in
56
+ plaintext, which could include sensitive data such as PII for yourself or your
57
+ customers, private keys, or other security data that could be compromising if
58
+ leaked. Always practice good data hygiene with your application logs, and follow
59
+ the principle of least access. Google also recommends that Client Library Debug
60
+ Logging be enabled only temporarily during active debugging, and not used
61
+ permanently in production.
62
+
63
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
64
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
65
+ list of client library gem names. This will select the default logging behavior,
66
+ which writes logs to the standard error stream. On a local workstation, this may
67
+ result in logs appearing on the console. When running on a Google Cloud hosting
68
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
69
+ results in logs appearing alongside your application logs in the
70
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
71
+
72
+ Debug logging also requires that the versioned clients for this service be
73
+ sufficiently recent, released after about Dec 10, 2024. If logging is not
74
+ working, try updating the versioned clients in your bundle or installed gems:
75
+ [google-cloud-tasks-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2/latest),
76
+ [google-cloud-tasks-v2beta2](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta2/latest),
77
+ [google-cloud-tasks-v2beta3](https://cloud.google.com/ruby/docs/reference/google-cloud-tasks-v2beta3/latest).
78
+
47
79
  ## Supported Ruby Versions
48
80
 
49
- This library is supported on Ruby 2.7+.
81
+ This library is supported on Ruby 3.0+.
50
82
 
51
83
  Google provides official support for Ruby versions that are actively supported
52
84
  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 Tasks
23
- VERSION = "2.6.0"
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 CloudTasks service.
63
+ # You can determine whether the method will succeed by calling
64
+ # {Google::Cloud::Tasks.cloud_tasks_available?}.
65
+ #
61
66
  # ## About CloudTasks
62
67
  #
63
68
  # Cloud Tasks allows developers to manage the execution of background
@@ -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 CloudTasks service is supported by the current client.
90
+ # If true, you can retrieve a client object by calling {Google::Cloud::Tasks.cloud_tasks}.
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 CloudTasks service,
93
+ # or if the versioned client gem needs an update to support the CloudTasks service.
94
+ #
95
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
96
+ # Defaults to `:v2`.
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_tasks_available? version: :v2, transport: :grpc
101
+ require "google/cloud/tasks/#{version.to_s.downcase}"
102
+ package_name = Google::Cloud::Tasks
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::Tasks.const_get package_name
108
+ return false unless service_module.const_defined? :CloudTasks
109
+ service_module = service_module.const_get :CloudTasks
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-tasks library.
85
121
  #
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
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-02-26 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
@@ -105,7 +104,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
105
104
  licenses:
106
105
  - Apache-2.0
107
106
  metadata: {}
108
- post_install_message:
109
107
  rdoc_options: []
110
108
  require_paths:
111
109
  - lib
@@ -113,15 +111,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
111
  requirements:
114
112
  - - ">="
115
113
  - !ruby/object:Gem::Version
116
- version: '2.7'
114
+ version: '3.0'
117
115
  required_rubygems_version: !ruby/object:Gem::Requirement
118
116
  requirements:
119
117
  - - ">="
120
118
  - !ruby/object:Gem::Version
121
119
  version: '0'
122
120
  requirements: []
123
- rubygems_version: 3.5.6
124
- signing_key:
121
+ rubygems_version: 3.6.2
125
122
  specification_version: 4
126
123
  summary: API Client library for the Cloud Tasks API
127
124
  test_files: []