google-cloud-translate 3.7.4 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +2 -18
- data/README.md +1 -1
- data/lib/google/cloud/translate/version.rb +1 -1
- data/lib/google/cloud/translate.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 18211db90c8f3939d07c3c0ddf9ec61a4192187a5b1da27eca264ace712ec4f9
|
|
4
|
+
data.tar.gz: ccbc932ea5dda16efa75ca5a642e0686c5f76cb08e323100a9ab09f8eb3468a2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd634e1737c3233f37992f82ce408aee41f86acf4d9360199d2947fca41fdbabbb77788fac77148177c7188012a2fb721909885685177652dfcbfb97853d11cf
|
|
7
|
+
data.tar.gz: 11d1578e4412e4e8781904b3d5d805f89df687fd61ca0b55506d675e1f2e263f39f5fb9335161d0125b98d88c1456d2405fb7029714fab65569e075545bcfa1e
|
data/AUTHENTICATION.md
CHANGED
|
@@ -33,12 +33,6 @@ credentials, there are several methods available to you.
|
|
|
33
33
|
|
|
34
34
|
Credentials are accepted in the following ways, in the following order or precedence:
|
|
35
35
|
|
|
36
|
-
> [!WARNING]
|
|
37
|
-
> If you accept a credential configuration (JSON file or Hash) from an
|
|
38
|
-
> external source for authentication to Google Cloud, you must validate it before
|
|
39
|
-
> providing it to a Google API client library. Providing an unvalidated credential
|
|
40
|
-
> configuration to Google APIs can compromise the security of your systems and data.
|
|
41
|
-
|
|
42
36
|
1. Credentials specified in method arguments
|
|
43
37
|
2. Credentials specified in configuration
|
|
44
38
|
3. Credentials pointed to or included in environment variables
|
|
@@ -60,30 +54,20 @@ whenever possible.
|
|
|
60
54
|
To configure a credentials file for an individual client initialization:
|
|
61
55
|
|
|
62
56
|
```ruby
|
|
63
|
-
require "googleauth"
|
|
64
57
|
require "google/cloud/translate"
|
|
65
58
|
|
|
66
|
-
credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
67
|
-
json_key_io: ::File.open("/path/to/keyfile.json")
|
|
68
|
-
)
|
|
69
|
-
|
|
70
59
|
client = Google::Cloud::Translate.translation_service do |config|
|
|
71
|
-
config.credentials =
|
|
60
|
+
config.credentials = "path/to/credentialfile.json"
|
|
72
61
|
end
|
|
73
62
|
```
|
|
74
63
|
|
|
75
64
|
To configure a credentials file globally for all clients:
|
|
76
65
|
|
|
77
66
|
```ruby
|
|
78
|
-
require "googleauth"
|
|
79
67
|
require "google/cloud/translate"
|
|
80
68
|
|
|
81
|
-
credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
82
|
-
json_key_io: ::File.open("/path/to/keyfile.json")
|
|
83
|
-
)
|
|
84
|
-
|
|
85
69
|
Google::Cloud::Translate.configure do |config|
|
|
86
|
-
config.credentials =
|
|
70
|
+
config.credentials = "path/to/credentialfile.json"
|
|
87
71
|
end
|
|
88
72
|
|
|
89
73
|
client = Google::Cloud::Translate.translation_service
|
data/README.md
CHANGED
|
@@ -84,7 +84,7 @@ working, try updating the versioned clients in your bundle or installed gems:
|
|
|
84
84
|
|
|
85
85
|
## Supported Ruby Versions
|
|
86
86
|
|
|
87
|
-
This library is supported on Ruby 3.
|
|
87
|
+
This library is supported on Ruby 3.2+.
|
|
88
88
|
|
|
89
89
|
Google provides official support for Ruby versions that are actively supported
|
|
90
90
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
|
@@ -138,6 +138,7 @@ module Google
|
|
|
138
138
|
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
139
139
|
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
140
140
|
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
141
|
+
# * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0.
|
|
141
142
|
# * `:retry_codes` (*type:* `Array<String>`) -
|
|
142
143
|
# The error codes that should trigger a retry.
|
|
143
144
|
#
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: google-cloud-translate
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.9.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Google LLC
|
|
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
91
91
|
requirements:
|
|
92
92
|
- - ">="
|
|
93
93
|
- !ruby/object:Gem::Version
|
|
94
|
-
version: '3.
|
|
94
|
+
version: '3.2'
|
|
95
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements:
|
|
97
97
|
- - ">="
|