google-cloud-tasks 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: 3361e618a5e42d5b4415d354f7eb108286f08b0a028813456828c14f2cf5a9c9
4
- data.tar.gz: 4c5f829590732cdefeb53ff23ed3cb64225dd514c07b7c49fd337b96496abc48
3
+ metadata.gz: e2cfac8a910b3a3267718f729c25f2e03b83f9fbf1b8135b5fc7d1a1b9d76b39
4
+ data.tar.gz: 0f68d1169edfa70549b2074da178740a1f8038dd8d6b89eb7895a9e648d7f961
5
5
  SHA512:
6
- metadata.gz: d73037832f9526016ba36ccadb4af08a4d6b7fe32088561cab5e61368d876e9b802b7561c9a30977164689452a3a9cef0e2a8488129d1e1032a24bbf095714dd
7
- data.tar.gz: ffcda23bdbd23b4855027b4b6fa94cf7df0ba349a0a0cda28a8f1b9ba521ddebadd391cce09199f5d37f00000000dfdf0191f853b5df674783cc94a06bfd5071
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.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 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.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
@@ -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: []