google-cloud-batch 0.1.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: 21fe531a9d62e06639ebdd24af24cb4a4f89a9d4fe1680ea7c1846da3af2cb75
4
- data.tar.gz: 5652a1218cbbd4e192892bf4e9397b337f5dee56c144f3cbf137bf9a916f0c7a
3
+ metadata.gz: fdf5b90586a24dcdf4cc1cb0de666693a1a6c8156a522ce9fa8c6916eab6df9b
4
+ data.tar.gz: ce9bfbe4a45478629549d0fef694aaa71e014e737b38aeca4b89bcff9cba06c0
5
5
  SHA512:
6
- metadata.gz: 29338b40430f2e72c78db84729503409a04f337d5a1944d16c68f6a265bc72ac93a8d60ce7a8a2fdc64b15048b4325edb31ad1e1f45ca5b0bc882015249fb20a
7
- data.tar.gz: 45cbafa2ed0cd900a9828a93cd8ce327c1b9f4a38b1e798812e619ad266f0c02bc782acecacc1e93ca3e5828da145c54c1b8c1a2038de42b6eeb865bd54783a9
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,42 +31,16 @@ 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
- This library is supported on Ruby 2.5+.
36
+ This library is supported on Ruby 2.6+.
63
37
 
64
38
  Google provides official support for Ruby versions that are actively supported
65
39
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
66
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
67
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
68
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
69
- about the Ruby support schedule.
40
+ in security maintenance, and not end of life. Older versions of Ruby _may_
41
+ still work, but are unsupported and not recommended. See
42
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
43
+ support schedule.
70
44
 
71
45
  ## Which client should I use?
72
46
 
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module Batch
23
- VERSION = "0.1.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.1.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-06-23 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
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -185,14 +185,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
185
  requirements:
186
186
  - - ">="
187
187
  - !ruby/object:Gem::Version
188
- version: '2.5'
188
+ version: '2.6'
189
189
  required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - ">="
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