google-cloud-tasks 2.3.0 → 2.4.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: b9fcc37e2533944648acf487d8fec79b989d3e90b35a7c334b618ea89c118db9
4
- data.tar.gz: 2e7e989b220ac9e8fa34f570eab2007bf2d732023611c909981ab3ca9637fb93
3
+ metadata.gz: 0fe6deb27c48fdaa978cce569452bf171f61df5dfd897b686c441e8072fd4a77
4
+ data.tar.gz: 81eed103f58d31d6962d8c3c9ae5f64acd36d20a6fe7a34bb4b2727acff52de7
5
5
  SHA512:
6
- metadata.gz: c948415e1e6a63551bc9fff92cb81b0beb2bb76804a6b5651c17c777f002b7ab2438e294efc0f05ea35f89592438887bb41461227490e4a7513d2edbfba1cb9f
7
- data.tar.gz: ad02b49db1bfcac9196882f05934fb7a8be4ae69c818797a3db1c48e8a0c7912f45093131e874160192aec30bef34bfb74942baa6fb25966e77b3e30c3e28494
6
+ metadata.gz: b8b096e57a6685295485be4b02cdc3cd077b0c696b46e97e44b256bf7c4e7988cb9da1d0a3ca771c2770daa4aa20cd8b511058747b7ee218b22efcf565514ff3
7
+ data.tar.gz: a4e184c8c945f1e35d04fd29eefb65106828fc65c2d9084c3e134c902af6322b815136aaf5d254b14319c9e7e63715c5024ca827bbdfdf8382044d3f0d8f4b9a
data/AUTHENTICATION.md CHANGED
@@ -114,7 +114,7 @@ credentials are discovered.
114
114
  To configure your system for this, simply:
115
115
 
116
116
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
117
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
117
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
118
118
  3. Write code as if already authenticated.
119
119
 
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -44,32 +44,6 @@ 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
- ## Enabling Logging
48
-
49
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
50
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
51
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
52
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
53
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
54
-
55
- Configuring a Ruby stdlib logger:
56
-
57
- ```ruby
58
- require "logger"
59
-
60
- module MyLogger
61
- LOGGER = Logger.new $stderr, level: Logger::WARN
62
- def logger
63
- LOGGER
64
- end
65
- end
66
-
67
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
68
- module GRPC
69
- extend MyLogger
70
- end
71
- ```
72
-
73
47
  ## Supported Ruby Versions
74
48
 
75
49
  This library is supported on Ruby 2.6+.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Tasks
23
- VERSION = "2.3.0"
23
+ VERSION = "2.4.0"
24
24
  end
25
25
  end
26
26
  end
@@ -49,11 +49,13 @@ module Google
49
49
  #
50
50
  # By default, this returns an instance of
51
51
  # [Google::Cloud::Tasks::V2::CloudTasks::Client](https://googleapis.dev/ruby/google-cloud-tasks-v2/latest/Google/Cloud/Tasks/V2/CloudTasks/Client.html)
52
- # for version V2 of the API.
53
- # However, you can specify specify a different API version by passing it in the
52
+ # for a gRPC client for version V2 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the CloudTasks service is
55
55
  # supported by that API version, and the corresponding gem is available, the
56
56
  # appropriate versioned client will be returned.
57
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
58
+ # the `transport` parameter.
57
59
  #
58
60
  # ## About CloudTasks
59
61
  #
@@ -62,17 +64,19 @@ module Google
62
64
  #
63
65
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
64
66
  # Defaults to `:v2`.
65
- # @return [CloudTasks::Client] A client object for the specified version.
67
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
68
+ # @return [::Object] A client object for the specified version.
66
69
  #
67
- def self.cloud_tasks version: :v2, &block
70
+ def self.cloud_tasks version: :v2, transport: :grpc, &block
68
71
  require "google/cloud/tasks/#{version.to_s.downcase}"
69
72
 
70
73
  package_name = Google::Cloud::Tasks
71
74
  .constants
72
75
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
73
76
  .first
74
- package_module = Google::Cloud::Tasks.const_get package_name
75
- package_module.const_get(:CloudTasks).const_get(:Client).new(&block)
77
+ service_module = Google::Cloud::Tasks.const_get(package_name).const_get(:CloudTasks)
78
+ service_module = service_module.const_get(:Rest) if transport == :rest
79
+ service_module.const_get(:Client).new(&block)
76
80
  end
77
81
 
78
82
  ##
@@ -92,7 +96,7 @@ module Google
92
96
  # * `timeout` (*type:* `Numeric`) -
93
97
  # Default timeout in seconds.
94
98
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
95
- # Additional gRPC headers to be sent with the call.
99
+ # Additional headers to be sent with the call.
96
100
  # * `retry_policy` (*type:* `Hash`) -
97
101
  # The retry policy. The value is a hash with the following keys:
98
102
  # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-08 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-core
@@ -30,7 +30,7 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.0'
33
+ version: '0.7'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
36
  version: 2.a
@@ -40,7 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '0.0'
43
+ version: '0.7'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 2.a
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '0.0'
53
+ version: '0.8'
54
54
  - - "<"
55
55
  - !ruby/object:Gem::Version
56
56
  version: 2.a
@@ -60,7 +60,7 @@ dependencies:
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: '0.0'
63
+ version: '0.8'
64
64
  - - "<"
65
65
  - !ruby/object:Gem::Version
66
66
  version: 2.a
@@ -70,7 +70,7 @@ dependencies:
70
70
  requirements:
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
- version: '0.0'
73
+ version: '0.9'
74
74
  - - "<"
75
75
  - !ruby/object:Gem::Version
76
76
  version: 2.a
@@ -80,7 +80,7 @@ dependencies:
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: '0.0'
83
+ version: '0.9'
84
84
  - - "<"
85
85
  - !ruby/object:Gem::Version
86
86
  version: 2.a
@@ -232,7 +232,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
232
  - !ruby/object:Gem::Version
233
233
  version: '0'
234
234
  requirements: []
235
- rubygems_version: 3.3.14
235
+ rubygems_version: 3.4.2
236
236
  signing_key:
237
237
  specification_version: 4
238
238
  summary: API Client library for the Cloud Tasks API