google-cloud-translate-v2 0.4.0 → 0.5.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: 586284e6210ccef2aac0f858f71cd77fc9a8eb0b2528561e9baad2ee7c88adfd
4
- data.tar.gz: ec9dccce1565561e285e923c14dcf2de79780a337845421f238c2ab92f293497
3
+ metadata.gz: 1131904fc14fd5303f899a7b6e081900d9df3a0beb08e248cd0f4e2308089590
4
+ data.tar.gz: a6c65dc850f74a29e89f6457341d180e94c2e4b457eb75314afc8bc41f5b46a4
5
5
  SHA512:
6
- metadata.gz: bb9067b94440eeb3a010323db2a02b5c4627a160bed4487bedda8f3d7f518831f9329ee1af7f46d292a2345fafbd5a63a35f4e69a4f4e194d859a6719f50523c
7
- data.tar.gz: 522718b79198cceb83a123d5e4aea1b026681e0a4011c2ce9355e3c98467b880a03d4f665bdb8510610964e7c04d0eb2709f5d31999d8f246e813ae2e898ffd5
6
+ metadata.gz: 694ea001207a3960a67d4bc18e67020981047fc38738770e2abc0295b397db817fbef94b1ed28c63130b45bafd14290d7ded846ec4753daf790ca099a02f9c8d
7
+ data.tar.gz: 308236cea26c0da0cb69691dae97615dcef4778753abb72b864723f3f75c4b39ab8d747448b85dbeae4a41daf3ee3f09e04e9f9a033c6e48c8a00ac0ccde71b1
data/AUTHENTICATION.md CHANGED
@@ -113,15 +113,6 @@ To configure your system for this, simply:
113
113
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
114
114
  *should* only be used during development.
115
115
 
116
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
117
- [dev-console]: https://console.cloud.google.com/project
118
-
119
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
120
-
121
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
122
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
123
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
124
-
125
116
  ## Creating a Service Account
126
117
 
127
118
  Google Cloud requires a **Project ID** and **Service Account Credentials** to
@@ -131,31 +122,22 @@ connect to most services with google-cloud-translate.
131
122
  If you are not running this client on Google Compute Engine, you need a Google
132
123
  Developers service account.
133
124
 
134
- 1. Visit the [Google Developers Console][dev-console].
125
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
135
126
  1. Create a new project or click on an existing project.
136
- 1. Activate the slide-out navigation tray and select **API Manager**. From
127
+ 1. Activate the menu in the upper left and select **APIs & Services**. From
137
128
  here, you will enable the APIs that your application requires.
138
129
 
139
- ![Enable the APIs that your application requires][enable-apis]
140
-
141
130
  *Note: You may need to enable billing in order to use these services.*
142
131
 
143
132
  1. Select **Credentials** from the side navigation.
144
133
 
145
- You should see a screen like one of the following.
146
-
147
- ![Create a new service account][create-new-service-account]
148
-
149
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
150
-
151
- Find the "Add credentials" drop down and select "Service account" to be
152
- guided through downloading a new JSON key file.
153
-
154
- If you want to re-use an existing service account, you can easily generate a
155
- new key file. Just select the account you wish to re-use, and click "Generate
156
- new JSON key":
134
+ Find the "Create credentials" drop down near the top of the page, and select
135
+ "Service account" to be guided through downloading a new JSON key file.
157
136
 
158
- ![Re-use an existing service account][reuse-service-account]
137
+ If you want to re-use an existing service account, you can easily generate
138
+ a new key file. Just select the account you wish to re-use click the pencil
139
+ tool on the right side to edit the service account, select the **Keys** tab,
140
+ and then select **Add Key**.
159
141
 
160
142
  The key file you download will be used by this library to authenticate API
161
143
  requests and should be stored in a secure location.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Release History
2
2
 
3
+ ### 0.5.0 (2024-03-10)
4
+
5
+ #### Features
6
+
7
+ * Update minimum supported Ruby version to 2.7 ([#25298](https://github.com/googleapis/google-cloud-ruby/issues/25298))
8
+
9
+ ### 0.4.1 (2023-05-19)
10
+
11
+ #### Documentation
12
+
13
+ * Fixed broken links in authentication documentation ([#21619](https://github.com/googleapis/google-cloud-ruby/issues/21619))
14
+
3
15
  ### 0.4.0 (2022-07-28)
4
16
 
5
17
  #### Features
@@ -50,7 +50,7 @@ module Google
50
50
  body = {
51
51
  q: Array(text), target: to, source: from, format: format,
52
52
  model: model, cid: cid
53
- }.delete_if { |_k, v| v.nil? }.to_json
53
+ }.compact.to_json
54
54
 
55
55
  post "/language/translate/v2", body
56
56
  end
@@ -104,7 +104,7 @@ module Google
104
104
  def http
105
105
  @http ||= Faraday.new url: @url, request: {
106
106
  open_timeout: @timeout, timeout: @timeout
107
- }.delete_if { |_k, v| v.nil? }
107
+ }.compact
108
108
  end
109
109
 
110
110
  ##
@@ -162,10 +162,10 @@ module Google
162
162
  self.backoff = ->(retries) { sleep retries.to_i }
163
163
 
164
164
  def initialize options = {} # :nodoc:
165
- @max_retries = (options[:retries] || Backoff.retries).to_i
166
- @http_codes = (options[:http_codes] || Backoff.http_codes).to_a
167
- @reasons = (options[:reasons] || Backoff.reasons).to_a
168
- @backoff = options[:backoff] || Backoff.backoff
165
+ @max_retries = (options[:retries] || Backoff.retries).to_i
166
+ @http_codes = (options[:http_codes] || Backoff.http_codes).to_a
167
+ @reasons = (options[:reasons] || Backoff.reasons).to_a
168
+ @backoff = options[:backoff] || Backoff.backoff
169
169
  end
170
170
 
171
171
  def execute # :nodoc:
@@ -17,7 +17,7 @@ module Google
17
17
  module Cloud
18
18
  module Translate
19
19
  module V2
20
- VERSION = "0.4.0".freeze
20
+ VERSION = "0.5.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.4.0
4
+ version: 0.5.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-28 00:00:00.000000000 Z
11
+ date: 2024-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -104,132 +104,6 @@ dependencies:
104
104
  - - "~>"
105
105
  - !ruby/object:Gem::Version
106
106
  version: '1.6'
107
- - !ruby/object:Gem::Dependency
108
- name: google-style
109
- requirement: !ruby/object:Gem::Requirement
110
- requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: 1.26.1
114
- type: :development
115
- prerelease: false
116
- version_requirements: !ruby/object:Gem::Requirement
117
- requirements:
118
- - - "~>"
119
- - !ruby/object:Gem::Version
120
- version: 1.26.1
121
- - !ruby/object:Gem::Dependency
122
- name: minitest
123
- requirement: !ruby/object:Gem::Requirement
124
- requirements:
125
- - - "~>"
126
- - !ruby/object:Gem::Version
127
- version: '5.16'
128
- type: :development
129
- prerelease: false
130
- version_requirements: !ruby/object:Gem::Requirement
131
- requirements:
132
- - - "~>"
133
- - !ruby/object:Gem::Version
134
- version: '5.16'
135
- - !ruby/object:Gem::Dependency
136
- name: minitest-focus
137
- requirement: !ruby/object:Gem::Requirement
138
- requirements:
139
- - - "~>"
140
- - !ruby/object:Gem::Version
141
- version: '1.1'
142
- type: :development
143
- prerelease: false
144
- version_requirements: !ruby/object:Gem::Requirement
145
- requirements:
146
- - - "~>"
147
- - !ruby/object:Gem::Version
148
- version: '1.1'
149
- - !ruby/object:Gem::Dependency
150
- name: minitest-rg
151
- requirement: !ruby/object:Gem::Requirement
152
- requirements:
153
- - - "~>"
154
- - !ruby/object:Gem::Version
155
- version: '5.2'
156
- type: :development
157
- prerelease: false
158
- version_requirements: !ruby/object:Gem::Requirement
159
- requirements:
160
- - - "~>"
161
- - !ruby/object:Gem::Version
162
- version: '5.2'
163
- - !ruby/object:Gem::Dependency
164
- name: rake
165
- requirement: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - ">="
168
- - !ruby/object:Gem::Version
169
- version: '12.0'
170
- type: :development
171
- prerelease: false
172
- version_requirements: !ruby/object:Gem::Requirement
173
- requirements:
174
- - - ">="
175
- - !ruby/object:Gem::Version
176
- version: '12.0'
177
- - !ruby/object:Gem::Dependency
178
- name: redcarpet
179
- requirement: !ruby/object:Gem::Requirement
180
- requirements:
181
- - - "~>"
182
- - !ruby/object:Gem::Version
183
- version: '3.0'
184
- type: :development
185
- prerelease: false
186
- version_requirements: !ruby/object:Gem::Requirement
187
- requirements:
188
- - - "~>"
189
- - !ruby/object:Gem::Version
190
- version: '3.0'
191
- - !ruby/object:Gem::Dependency
192
- name: simplecov
193
- requirement: !ruby/object:Gem::Requirement
194
- requirements:
195
- - - "~>"
196
- - !ruby/object:Gem::Version
197
- version: '0.18'
198
- type: :development
199
- prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
201
- requirements:
202
- - - "~>"
203
- - !ruby/object:Gem::Version
204
- version: '0.18'
205
- - !ruby/object:Gem::Dependency
206
- name: yard
207
- requirement: !ruby/object:Gem::Requirement
208
- requirements:
209
- - - "~>"
210
- - !ruby/object:Gem::Version
211
- version: '0.9'
212
- type: :development
213
- prerelease: false
214
- version_requirements: !ruby/object:Gem::Requirement
215
- requirements:
216
- - - "~>"
217
- - !ruby/object:Gem::Version
218
- version: '0.9'
219
- - !ruby/object:Gem::Dependency
220
- name: yard-doctest
221
- requirement: !ruby/object:Gem::Requirement
222
- requirements:
223
- - - "~>"
224
- - !ruby/object:Gem::Version
225
- version: 0.1.13
226
- type: :development
227
- prerelease: false
228
- version_requirements: !ruby/object:Gem::Requirement
229
- requirements:
230
- - - "~>"
231
- - !ruby/object:Gem::Version
232
- version: 0.1.13
233
107
  description: Cloud Translation can dynamically translate text between thousands of
234
108
  language pairs. Translation lets websites and programs programmatically integrate
235
109
  with the translation service.
@@ -264,14 +138,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
264
138
  requirements:
265
139
  - - ">="
266
140
  - !ruby/object:Gem::Version
267
- version: '2.6'
141
+ version: '2.7'
268
142
  required_rubygems_version: !ruby/object:Gem::Requirement
269
143
  requirements:
270
144
  - - ">="
271
145
  - !ruby/object:Gem::Version
272
146
  version: '0'
273
147
  requirements: []
274
- rubygems_version: 3.3.14
148
+ rubygems_version: 3.5.6
275
149
  signing_key:
276
150
  specification_version: 4
277
151
  summary: API Client library for Cloud Translation V2 API