google-cloud-language 1.1.0 → 1.1.1
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 +1 -1
- data/MIGRATING.md +5 -5
- data/lib/google-cloud-language.rb +1 -1
- data/lib/google/cloud/language.rb +18 -13
- data/lib/google/cloud/language/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10327b254372149ae0c16ad1804488dac7acde3d3014afad3ddd257e776a4e37
|
4
|
+
data.tar.gz: 50154d720a4d63a2564206cb948f3d9f3976e7eee40bd9a9287eb986a289de31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f6dd2abfe0d62b87c98a36fa44e811cd75267d5e9e72b3fb61966fa0bf18a3830f183c366ae67d0ee38376a1ecf27b4d73e168b3162b0aa81377484cbc99b89
|
7
|
+
data.tar.gz: ac0346b0de01ba4869de4a81704c1faf3f3cf0e55b8fdce28ca7fb0cb11837e0ef499a47639d0840aeb58a524058c6af2c3ba9dd86e4ba105bfdf974e1a55c72
|
data/AUTHENTICATION.md
CHANGED
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
|
|
64
64
|
|
65
65
|
The environment variables that google-cloud-language
|
66
66
|
checks for credentials are configured on the service Credentials class (such as
|
67
|
-
|
67
|
+
`::Google::Cloud::Language::V1::LanguageService::Credentials`):
|
68
68
|
|
69
69
|
1. `LANGUAGE_CREDENTIALS` - Path to JSON file, or JSON contents
|
70
70
|
2. `LANGUAGE_KEYFILE` - Path to JSON file, or JSON contents
|
data/MIGRATING.md
CHANGED
@@ -71,7 +71,7 @@ timeout for all Language V1 clients:
|
|
71
71
|
```
|
72
72
|
Google::Cloud::Language::V1::LanguageService::Client.configure do |config|
|
73
73
|
config.credentials = "/path/to/credentials.json"
|
74
|
-
config.timeout =
|
74
|
+
config.timeout = 10.0
|
75
75
|
end
|
76
76
|
```
|
77
77
|
|
@@ -80,7 +80,7 @@ timeout for the `analyze_sentiment` call:
|
|
80
80
|
|
81
81
|
```
|
82
82
|
Google::Cloud::Language::V1::LanguageService::Client.configure do |config|
|
83
|
-
config.rpcs.analyze_sentinment.timeout =
|
83
|
+
config.rpcs.analyze_sentinment.timeout = 20.0
|
84
84
|
end
|
85
85
|
```
|
86
86
|
|
@@ -90,7 +90,7 @@ globally:
|
|
90
90
|
```
|
91
91
|
Google::Cloud::Language.configure do |config|
|
92
92
|
config.credentials = "/path/to/credentials.json"
|
93
|
-
config.timeout =
|
93
|
+
config.timeout = 10.0
|
94
94
|
end
|
95
95
|
```
|
96
96
|
|
@@ -193,7 +193,7 @@ document = {
|
|
193
193
|
type: Google::Cloud::Language::V1::Document::Type::PLAIN_TEXT
|
194
194
|
}
|
195
195
|
|
196
|
-
options = Google::Gax::CallOptions.new timeout:
|
196
|
+
options = Google::Gax::CallOptions.new timeout: 10.0
|
197
197
|
|
198
198
|
response = client.analyze_sentiment document, options: options
|
199
199
|
```
|
@@ -212,7 +212,7 @@ encoding = Google:Cloud::Language::V1::EncodingType::UTF8
|
|
212
212
|
# then add further keyword arguments for the call options.
|
213
213
|
response = client.analyze_sentiment(
|
214
214
|
{ document: document, encoding_type: encoding },
|
215
|
-
timeout:
|
215
|
+
timeout: 10.0
|
216
216
|
)
|
217
217
|
```
|
218
218
|
|
@@ -16,21 +16,26 @@
|
|
16
16
|
|
17
17
|
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
18
|
|
19
|
+
# Require this file early so that the version constant gets defined before
|
20
|
+
# requiring "google/cloud". This is because google-cloud-core will load the
|
21
|
+
# entrypoint (gem name) file, which in turn re-requires this file (hence
|
22
|
+
# causing a require cycle) unless the version constant is already defined.
|
19
23
|
require "google/cloud/language/version"
|
24
|
+
|
20
25
|
require "googleauth"
|
21
26
|
gem "google-cloud-core"
|
22
|
-
require "google/cloud" unless defined? Google::Cloud.new
|
27
|
+
require "google/cloud" unless defined? ::Google::Cloud.new
|
23
28
|
require "google/cloud/config"
|
24
29
|
|
25
30
|
# Set the default configuration
|
26
|
-
Google::Cloud.configure.add_config! :language do |config|
|
27
|
-
config.add_field! :credentials, nil, match: [String, Hash, Google::Auth::Credentials]
|
28
|
-
config.add_field! :lib_name, nil, match: String
|
29
|
-
config.add_field! :lib_version, nil, match: String
|
30
|
-
config.add_field! :interceptors, nil, match: Array
|
31
|
-
config.add_field! :timeout, nil, match: Numeric
|
32
|
-
config.add_field! :metadata, nil, match: Hash
|
33
|
-
config.add_field! :retry_policy, nil, match: [Hash, Proc]
|
31
|
+
::Google::Cloud.configure.add_config! :language do |config|
|
32
|
+
config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
|
33
|
+
config.add_field! :lib_name, nil, match: ::String
|
34
|
+
config.add_field! :lib_version, nil, match: ::String
|
35
|
+
config.add_field! :interceptors, nil, match: ::Array
|
36
|
+
config.add_field! :timeout, nil, match: ::Numeric
|
37
|
+
config.add_field! :metadata, nil, match: ::Hash
|
38
|
+
config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
|
34
39
|
end
|
35
40
|
|
36
41
|
module Google
|
@@ -52,7 +57,7 @@ module Google
|
|
52
57
|
# Provides text analysis operations such as sentiment analysis and entity
|
53
58
|
# recognition.
|
54
59
|
#
|
55
|
-
# @param version [String, Symbol] The API version to connect to. Optional.
|
60
|
+
# @param version [::String, ::Symbol] The API version to connect to. Optional.
|
56
61
|
# Defaults to `:v1`.
|
57
62
|
# @return [LanguageService::Client] A client object for the specified version.
|
58
63
|
#
|
@@ -93,12 +98,12 @@ module Google
|
|
93
98
|
# * `:retry_codes` (*type:* `Array<String>`) -
|
94
99
|
# The error codes that should trigger a retry.
|
95
100
|
#
|
96
|
-
# @return [Google::Cloud::Config] The default configuration used by this library
|
101
|
+
# @return [::Google::Cloud::Config] The default configuration used by this library
|
97
102
|
#
|
98
103
|
def self.configure
|
99
|
-
yield Google::Cloud.configure.language if block_given?
|
104
|
+
yield ::Google::Cloud.configure.language if block_given?
|
100
105
|
|
101
|
-
Google::Cloud.configure.language
|
106
|
+
::Google::Cloud.configure.language
|
102
107
|
end
|
103
108
|
end
|
104
109
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-language
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-cloud-core
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '5.
|
89
|
+
version: '5.14'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '5.
|
96
|
+
version: '5.14'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: minitest-autotest
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '5.2'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '12.0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '12.0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: redcarpet
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|