google-cloud-batch 0.2.0 → 0.3.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: 055d29454e10af845521dba680c7a187d4a49198836730a8b6579e185e584451
4
- data.tar.gz: 5f1b99cb3070157b43b224b914e7fb4ff42530a3818cabd91091a65b80bd795e
3
+ metadata.gz: fdf5b90586a24dcdf4cc1cb0de666693a1a6c8156a522ce9fa8c6916eab6df9b
4
+ data.tar.gz: ce9bfbe4a45478629549d0fef694aaa71e014e737b38aeca4b89bcff9cba06c0
5
5
  SHA512:
6
- metadata.gz: f40fc7805ff5e4a041265a25bfdcd8a536ae26a3f4bbea5fe5a79f4a68708314ab2bf5287d897e4b36bd5c6d3f3a5d44bd77cdb1426f022e38a5b799c15b679d
7
- data.tar.gz: '013822c138398d6b57397eb358ba3e86875ac97ad35f8fefa9221b3993b665eb0acbc4cb0559343efc662d7606ec2fb4daae14b7b4fb39f0f0b7f898844d25a8'
6
+ metadata.gz: 5bd9b1d8cb11bc03e4442a8b9097da869c7de41e34fcc378e9d82ad560fc79f4e37142a56377a2284a7d5a5f7bcda35748da47f4fadb5319dfc28f753fead662
7
+ data.tar.gz: 6bd611ae3d1c2b21ea24eff9a998a4df6ed52ccc666997a8dbd9e7077be9a5d4897f262cbd02585ef1b545dc287def7783f67ba406c34ef3a9cc289e471e5273
data/AUTHENTICATION.md CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
112
112
  To configure your system for this, simply:
113
113
 
114
114
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
115
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
115
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
116
116
  3. Write code as if already authenticated.
117
117
 
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -31,32 +31,6 @@ In order to use this library, you first need to go through the following steps:
31
31
  1. [Enable the API.](https://console.cloud.google.com/apis/library/batch.googleapis.com)
32
32
  1. {file:AUTHENTICATION.md Set up authentication.}
33
33
 
34
- ## Enabling Logging
35
-
36
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
37
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
38
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
39
- 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)
40
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
41
-
42
- Configuring a Ruby stdlib logger:
43
-
44
- ```ruby
45
- require "logger"
46
-
47
- module MyLogger
48
- LOGGER = Logger.new $stderr, level: Logger::WARN
49
- def logger
50
- LOGGER
51
- end
52
- end
53
-
54
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
55
- module GRPC
56
- extend MyLogger
57
- end
58
- ```
59
-
60
34
  ## Supported Ruby Versions
61
35
 
62
36
  This library is supported on Ruby 2.6+.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Batch
23
- VERSION = "0.2.0"
23
+ VERSION = "0.3.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::Batch::V1::BatchService::Client](https://googleapis.dev/ruby/google-cloud-batch-v1/latest/Google/Cloud/Batch/V1/BatchService/Client.html)
52
- # for version V1 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 V1 of the API.
53
+ # However, you can specify a different API version by passing it in the
54
54
  # `version` parameter. If the BatchService 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 BatchService
59
61
  #
@@ -63,17 +65,19 @@ module Google
63
65
  #
64
66
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
65
67
  # Defaults to `:v1`.
66
- # @return [BatchService::Client] A client object for the specified version.
68
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
69
+ # @return [::Object] A client object for the specified version.
67
70
  #
68
- def self.batch_service version: :v1, &block
71
+ def self.batch_service version: :v1, transport: :grpc, &block
69
72
  require "google/cloud/batch/#{version.to_s.downcase}"
70
73
 
71
74
  package_name = Google::Cloud::Batch
72
75
  .constants
73
76
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
74
77
  .first
75
- package_module = Google::Cloud::Batch.const_get package_name
76
- package_module.const_get(:BatchService).const_get(:Client).new(&block)
78
+ service_module = Google::Cloud::Batch.const_get(package_name).const_get(:BatchService)
79
+ service_module = service_module.const_get(:Rest) if transport == :rest
80
+ service_module.const_get(:Client).new(&block)
77
81
  end
78
82
 
79
83
  ##
@@ -93,7 +97,7 @@ module Google
93
97
  # * `timeout` (*type:* `Numeric`) -
94
98
  # Default timeout in seconds.
95
99
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
96
- # Additional gRPC headers to be sent with the call.
100
+ # Additional headers to be sent with the call.
97
101
  # * `retry_policy` (*type:* `Hash`) -
98
102
  # The retry policy. The value is a hash with the following keys:
99
103
  # * `: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-batch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.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-01 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-batch-v1
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.0'
19
+ version: '0.7'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.0'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  - !ruby/object:Gem::Version
193
193
  version: '0'
194
194
  requirements: []
195
- rubygems_version: 3.3.14
195
+ rubygems_version: 3.4.2
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: API Client library for the Batch API