google-cloud-translate-v2 0.3.1 → 0.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: 1bb98f73d54e027af43cc9f4ba780a8d852eb50dce090ab6a2cdd50932b016b4
4
- data.tar.gz: 5af2179778a280b0d62fdf04fad7452b23aa2cc3e8c1c1eed874f80d1bbe58bb
3
+ metadata.gz: 586284e6210ccef2aac0f858f71cd77fc9a8eb0b2528561e9baad2ee7c88adfd
4
+ data.tar.gz: ec9dccce1565561e285e923c14dcf2de79780a337845421f238c2ab92f293497
5
5
  SHA512:
6
- metadata.gz: 2a4bd413a606211c3dfa27a8ab2e418e218e393c8be3e33b29d1001a75e111d2c4b0fa393991070478bc911df3c3f5dd725eaae64e9b46ac6d68f02108ecf25b
7
- data.tar.gz: ad186e21770a180eda22997ed79d46e8d466f54141ad0924bd1fb0c7a71bb201e839a6fa123b32b5f58d9b3165df5731a7eb5cbeef82542e745fe9ffebceeca7
6
+ metadata.gz: bb9067b94440eeb3a010323db2a02b5c4627a160bed4487bedda8f3d7f518831f9329ee1af7f46d292a2345fafbd5a63a35f4e69a4f4e194d859a6719f50523c
7
+ data.tar.gz: 522718b79198cceb83a123d5e4aea1b026681e0a4011c2ce9355e3c98467b880a03d4f665bdb8510610964e7c04d0eb2709f5d31999d8f246e813ae2e898ffd5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 0.4.0 (2022-07-28)
4
+
5
+ #### Features
6
+
7
+ * Update minimum Ruby version to 2.6 ([#18868](https://github.com/googleapis/google-cloud-ruby/issues/18868))
8
+
3
9
  ### 0.3.1 / 2021-06-17
4
10
 
5
11
  #### Bug Fixes
data/README.md CHANGED
@@ -42,11 +42,11 @@ for class and method documentation.
42
42
 
43
43
  ## Supported Ruby Versions
44
44
 
45
- This library is supported on Ruby 2.5+.
45
+ This library is supported on Ruby 2.6+.
46
46
 
47
47
  Google provides official support for Ruby versions that are actively supported
48
- by Ruby Core—that is, Ruby versions that are either in normal maintenance or in
49
- security maintenance, and not end of life. Currently, this means Ruby 2.5 and
50
- later. Older versions of Ruby _may_ still work, but are unsupported and not
51
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
52
- about the Ruby support schedule.
48
+ by Ruby Core—that is, Ruby versions that are either in normal maintenance or
49
+ in security maintenance, and not end of life. Older versions of Ruby _may_
50
+ still work, but are unsupported and not recommended. See
51
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
52
+ support schedule.
@@ -26,7 +26,7 @@ module Google
26
26
  ##
27
27
  # @private
28
28
  # Represents the Translation API REST service, exposing the API calls.
29
- class Service #:nodoc:
29
+ class Service # :nodoc:
30
30
  API_VERSION = "v2".freeze
31
31
  API_HOST = "translate.googleapis.com".freeze
32
32
 
@@ -161,14 +161,14 @@ module Google
161
161
  self.reasons = ["rateLimitExceeded", "userRateLimitExceeded"]
162
162
  self.backoff = ->(retries) { sleep retries.to_i }
163
163
 
164
- def initialize options = {} #:nodoc:
164
+ def initialize options = {} # :nodoc:
165
165
  @max_retries = (options[:retries] || Backoff.retries).to_i
166
166
  @http_codes = (options[:http_codes] || Backoff.http_codes).to_a
167
167
  @reasons = (options[:reasons] || Backoff.reasons).to_a
168
168
  @backoff = options[:backoff] || Backoff.backoff
169
169
  end
170
170
 
171
- def execute #:nodoc:
171
+ def execute # :nodoc:
172
172
  current_retries = 0
173
173
  loop do
174
174
  response = yield # Expecting Faraday::Response
@@ -181,7 +181,7 @@ module Google
181
181
 
182
182
  protected
183
183
 
184
- def retry? result, current_retries #:nodoc:
184
+ def retry? result, current_retries # :nodoc:
185
185
  if current_retries < @max_retries
186
186
  return true if retry_http_code? result
187
187
  return true if retry_error_reason? result
@@ -189,11 +189,11 @@ module Google
189
189
  false
190
190
  end
191
191
 
192
- def retry_http_code? response #:nodoc:
192
+ def retry_http_code? response # :nodoc:
193
193
  @http_codes.include? response.status
194
194
  end
195
195
 
196
- def retry_error_reason? response #:nodoc:
196
+ def retry_error_reason? response # :nodoc:
197
197
  result = JSON.parse response.body
198
198
  if result && result["error"] && result["error"]["errors"]
199
199
  Array(result["error"]["errors"]).each do |error|
@@ -17,7 +17,7 @@ module Google
17
17
  module Cloud
18
18
  module Translate
19
19
  module V2
20
- VERSION = "0.3.1".freeze
20
+ VERSION = "0.4.0".freeze
21
21
  end
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-translate-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.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: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2022-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -110,28 +110,28 @@ dependencies:
110
110
  requirements:
111
111
  - - "~>"
112
112
  - !ruby/object:Gem::Version
113
- version: 1.25.1
113
+ version: 1.26.1
114
114
  type: :development
115
115
  prerelease: false
116
116
  version_requirements: !ruby/object:Gem::Requirement
117
117
  requirements:
118
118
  - - "~>"
119
119
  - !ruby/object:Gem::Version
120
- version: 1.25.1
120
+ version: 1.26.1
121
121
  - !ruby/object:Gem::Dependency
122
122
  name: minitest
123
123
  requirement: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - "~>"
126
126
  - !ruby/object:Gem::Version
127
- version: '5.14'
127
+ version: '5.16'
128
128
  type: :development
129
129
  prerelease: false
130
130
  version_requirements: !ruby/object:Gem::Requirement
131
131
  requirements:
132
132
  - - "~>"
133
133
  - !ruby/object:Gem::Version
134
- version: '5.14'
134
+ version: '5.16'
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: minitest-focus
137
137
  requirement: !ruby/object:Gem::Requirement
@@ -264,14 +264,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
264
264
  requirements:
265
265
  - - ">="
266
266
  - !ruby/object:Gem::Version
267
- version: '2.5'
267
+ version: '2.6'
268
268
  required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  requirements:
270
270
  - - ">="
271
271
  - !ruby/object:Gem::Version
272
272
  version: '0'
273
273
  requirements: []
274
- rubygems_version: 3.2.17
274
+ rubygems_version: 3.3.14
275
275
  signing_key:
276
276
  specification_version: 4
277
277
  summary: API Client library for Cloud Translation V2 API