google-cloud-automl 1.1.4 → 1.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: '0405540873953574d3ce46c1f9ba2b5023dfede1ae8aeb13bfd8ad130c9c238c'
4
- data.tar.gz: 982ea2364aef3753d1e30c105b525b4d9189b72e98c12d066e13b57d9f32b6e3
3
+ metadata.gz: b10a1929f314b5edb9e9c678f2fdc15ca2a46b73d36945dc004c9f577dee0ef9
4
+ data.tar.gz: 274fe34d6706ec998fb13f6a64f7b661a3167d4481c02a36d4d0422c55853f16
5
5
  SHA512:
6
- metadata.gz: 4ac9b3779dcffda57711d717865b6af7fa222778134fae01a925606c036e405478b0d4065a3222644ff8996e4f3ad14a0dee3ac485cb4b9a1c5b1876db1b1663
7
- data.tar.gz: 305b96e4e4916f79b8ec2d02e6128550a505fa0f6e8dd19cc323854bb9360a36491f00c62e9f0c6618e744e4f22c8ef2a37aee0ff2bd3faed08ba19c13798141
6
+ metadata.gz: aa2a32fc73a5f9b5caf18674f04301b2a3d51c42190cb2ccdfedcb787e40f2088b0dfc6a8b72a5a56f3dc86a58575aae867921004a520ba4981a29acb1504637
7
+ data.tar.gz: 10fda5552328032c69217e0b61197b9a61737e4d453f8133246719e841dc27d3440485600217627ef2c27336f26a7bce030d1b9de152074dda6961e65f238cba
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
@@ -11,7 +11,7 @@ verisoned gems in as dependencies, and provides high-level methods for
11
11
  constructing clients. More information on versioned clients can be found below
12
12
  in the section titled *Which client should I use?*.
13
13
 
14
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-automl/latest)
14
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-automl/latest)
15
15
  for this library, google-cloud-automl, to see the convenience methods for
16
16
  constructing client objects. Reference documentation for the client objects
17
17
  themselves can be found in the client library documentation for the versioned
@@ -43,42 +43,16 @@ and includes substantial interface changes. Existing code written for earlier
43
43
  versions of this library will likely require updates to use this version.
44
44
  See the {file:MIGRATING.md MIGRATING.md} document for more information.
45
45
 
46
- ## Enabling Logging
47
-
48
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
50
- or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
- 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)
52
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
53
-
54
- Configuring a Ruby stdlib logger:
55
-
56
- ```ruby
57
- require "logger"
58
-
59
- module MyLogger
60
- LOGGER = Logger.new $stderr, level: Logger::WARN
61
- def logger
62
- LOGGER
63
- end
64
- end
65
-
66
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
67
- module GRPC
68
- extend MyLogger
69
- end
70
- ```
71
-
72
46
  ## Supported Ruby Versions
73
47
 
74
- This library is supported on Ruby 2.5+.
48
+ This library is supported on Ruby 2.6+.
75
49
 
76
50
  Google provides official support for Ruby versions that are actively supported
77
51
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
52
+ in security maintenance, and not end of life. Older versions of Ruby _may_
53
+ still work, but are unsupported and not recommended. See
54
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
55
+ support schedule.
82
56
 
83
57
  ## Which client should I use?
84
58
 
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+
18
+ module Google
19
+ module Cloud
20
+ module AutoML
21
+ class << self
22
+ # Backwards-compatibility hack: Define "auto_ml" as an alternative name
23
+ # for the "automl" method. The generator changed this name due to
24
+ # https://github.com/googleapis/gapic-generator-ruby/pull/935.
25
+ if public_method_defined?(:automl) && !public_method_defined?(:auto_ml)
26
+ alias auto_ml automl
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Cloud
22
22
  module AutoML
23
- VERSION = "1.1.4"
23
+ VERSION = "1.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::AutoML::V1::PredictionService::Client](https://googleapis.dev/ruby/google-cloud-automl-v1/latest/Google/Cloud/AutoML/V1/PredictionService/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 PredictionService 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 PredictionService
59
61
  #
@@ -64,17 +66,19 @@ module Google
64
66
  #
65
67
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
66
68
  # Defaults to `:v1`.
67
- # @return [PredictionService::Client] A client object for the specified version.
69
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
70
+ # @return [::Object] A client object for the specified version.
68
71
  #
69
- def self.prediction_service version: :v1, &block
72
+ def self.prediction_service version: :v1, transport: :grpc, &block
70
73
  require "google/cloud/automl/#{version.to_s.downcase}"
71
74
 
72
75
  package_name = Google::Cloud::AutoML
73
76
  .constants
74
77
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
75
78
  .first
76
- package_module = Google::Cloud::AutoML.const_get package_name
77
- package_module.const_get(:PredictionService).const_get(:Client).new(&block)
79
+ service_module = Google::Cloud::AutoML.const_get(package_name).const_get(:PredictionService)
80
+ service_module = service_module.const_get(:Rest) if transport == :rest
81
+ service_module.const_get(:Client).new(&block)
78
82
  end
79
83
 
80
84
  ##
@@ -82,11 +86,13 @@ module Google
82
86
  #
83
87
  # By default, this returns an instance of
84
88
  # [Google::Cloud::AutoML::V1::AutoML::Client](https://googleapis.dev/ruby/google-cloud-automl-v1/latest/Google/Cloud/AutoML/V1/AutoML/Client.html)
85
- # for version V1 of the API.
86
- # However, you can specify specify a different API version by passing it in the
89
+ # for a gRPC client for version V1 of the API.
90
+ # However, you can specify a different API version by passing it in the
87
91
  # `version` parameter. If the AutoML service is
88
92
  # supported by that API version, and the corresponding gem is available, the
89
93
  # appropriate versioned client will be returned.
94
+ # You can also specify a different transport by passing `:rest` or `:grpc` in
95
+ # the `transport` parameter.
90
96
  #
91
97
  # ## About AutoML
92
98
  #
@@ -107,17 +113,19 @@ module Google
107
113
  #
108
114
  # @param version [::String, ::Symbol] The API version to connect to. Optional.
109
115
  # Defaults to `:v1`.
110
- # @return [AutoML::Client] A client object for the specified version.
116
+ # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`.
117
+ # @return [::Object] A client object for the specified version.
111
118
  #
112
- def self.auto_ml version: :v1, &block
119
+ def self.auto_ml version: :v1, transport: :grpc, &block
113
120
  require "google/cloud/automl/#{version.to_s.downcase}"
114
121
 
115
122
  package_name = Google::Cloud::AutoML
116
123
  .constants
117
124
  .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") }
118
125
  .first
119
- package_module = Google::Cloud::AutoML.const_get package_name
120
- package_module.const_get(:AutoML).const_get(:Client).new(&block)
126
+ service_module = Google::Cloud::AutoML.const_get(package_name).const_get(:AutoML)
127
+ service_module = service_module.const_get(:Rest) if transport == :rest
128
+ service_module.const_get(:Client).new(&block)
121
129
  end
122
130
 
123
131
  ##
@@ -137,7 +145,7 @@ module Google
137
145
  # * `timeout` (*type:* `Numeric`) -
138
146
  # Default timeout in seconds.
139
147
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
140
- # Additional gRPC headers to be sent with the call.
148
+ # Additional headers to be sent with the call.
141
149
  # * `retry_policy` (*type:* `Hash`) -
142
150
  # The retry policy. The value is a hash with the following keys:
143
151
  # * `: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-automl
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.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-01-13 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-automl-v1
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.0'
19
+ version: '0.6'
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.6'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '0.0'
39
+ version: '0.7'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: 2.a
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '0.0'
49
+ version: '0.7'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: 2.a
@@ -70,28 +70,28 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: 1.25.1
73
+ version: 1.26.1
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: 1.25.1
80
+ version: 1.26.1
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: minitest
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: '5.14'
87
+ version: '5.16'
88
88
  type: :development
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: '5.14'
94
+ version: '5.16'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: minitest-focus
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -126,14 +126,14 @@ dependencies:
126
126
  requirements:
127
127
  - - ">="
128
128
  - !ruby/object:Gem::Version
129
- version: '12.0'
129
+ version: '13.0'
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
134
  - - ">="
135
135
  - !ruby/object:Gem::Version
136
- version: '12.0'
136
+ version: '13.0'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: redcarpet
139
139
  requirement: !ruby/object:Gem::Requirement
@@ -193,6 +193,7 @@ files:
193
193
  - README.md
194
194
  - lib/google-cloud-automl.rb
195
195
  - lib/google/cloud/automl.rb
196
+ - lib/google/cloud/automl/helpers.rb
196
197
  - lib/google/cloud/automl/version.rb
197
198
  homepage: https://github.com/googleapis/google-cloud-ruby
198
199
  licenses:
@@ -206,14 +207,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
207
  requirements:
207
208
  - - ">="
208
209
  - !ruby/object:Gem::Version
209
- version: '2.5'
210
+ version: '2.6'
210
211
  required_rubygems_version: !ruby/object:Gem::Requirement
211
212
  requirements:
212
213
  - - ">="
213
214
  - !ruby/object:Gem::Version
214
215
  version: '0'
215
216
  requirements: []
216
- rubygems_version: 3.3.5
217
+ rubygems_version: 3.4.2
217
218
  signing_key:
218
219
  specification_version: 4
219
220
  summary: API Client library for the Cloud AutoML API