google-cloud-language 0.29.0 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -7
- data/lib/google/cloud/language.rb +5 -8
- data/lib/google/cloud/language/credentials.rb +1 -1
- data/lib/google/cloud/language/v1.rb +5 -14
- data/lib/google/cloud/language/v1/doc/google/cloud/language/v1/language_service.rb +3 -3
- data/lib/google/cloud/language/v1/doc/overview.rb +6 -5
- data/lib/google/cloud/language/v1/language_service_client.rb +9 -21
- data/lib/google/cloud/language/v1/language_service_services_pb.rb +1 -1
- data/lib/google/cloud/language/v1beta2.rb +1 -1
- data/lib/google/cloud/language/v1beta2/doc/overview.rb +1 -1
- metadata +9 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c813d3d6dc9cd348fc0e4675a8f8009d66be0fae8b58f54a86a8a45cf1a62e5
|
4
|
+
data.tar.gz: c6b760a0e3b995c747c2f7e65a30eec75bdefd4055b01d9498adff78fe4ae4b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a98d8fec21d9425b91d596f7c0a823b003f5226ef189ef75fb25f512afa2de7abec72bda65d479a57ea38472a83779d23261468b7d191c35f710ee983135dc64
|
7
|
+
data.tar.gz: b7df25dc2271c9c1c793595a507e293ab55804f0ed7e4e03c0f1335e83448644c971f8e5daee9a69884a09262fc4cb7f2134f2c23c7651ffbb6eda3b9d7dc318
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ruby Client for Google Cloud Natural Language API ([
|
1
|
+
# Ruby Client for Google Cloud Natural Language API ([Alpha](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
2
2
|
|
3
3
|
[Google Cloud Natural Language API][Product Documentation]:
|
4
4
|
Google Cloud Natural Language API provides natural language understanding
|
@@ -7,17 +7,14 @@ recognition, and text annotations.
|
|
7
7
|
- [Client Library Documentation][]
|
8
8
|
- [Product Documentation][]
|
9
9
|
|
10
|
-
*The 0.28.0 release introduced breaking changes relative to the previous
|
11
|
-
release, 0.27.1. For more details and instructions to migrate your code, please
|
12
|
-
visit the [migration guide](https://cloud.google.com/natural-language/docs/ruby-client-migration).*
|
13
|
-
|
14
10
|
## Quick Start
|
15
11
|
In order to use this library, you first need to go through the following
|
16
12
|
steps:
|
17
13
|
|
18
14
|
1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
19
|
-
2. [Enable
|
20
|
-
3. [
|
15
|
+
2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
16
|
+
3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/api/language)
|
17
|
+
4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
21
18
|
|
22
19
|
### Installation
|
23
20
|
```
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -20,7 +20,7 @@ module Google
|
|
20
20
|
# rubocop:disable LineLength
|
21
21
|
|
22
22
|
##
|
23
|
-
# # Ruby Client for Google Cloud Natural Language API ([
|
23
|
+
# # Ruby Client for Google Cloud Natural Language API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
24
24
|
#
|
25
25
|
# [Google Cloud Natural Language API][Product Documentation]:
|
26
26
|
# Google Cloud Natural Language API provides natural language understanding
|
@@ -28,17 +28,14 @@ module Google
|
|
28
28
|
# recognition, and text annotations.
|
29
29
|
# - [Product Documentation][]
|
30
30
|
#
|
31
|
-
# *The 0.28.0 release introduced breaking changes relative to the previous
|
32
|
-
# release, 0.27.1. For more details and instructions to migrate your code, please
|
33
|
-
# visit the [migration guide](https://cloud.google.com/natural-language/docs/ruby-client-migration).*
|
34
|
-
#
|
35
31
|
# ## Quick Start
|
36
32
|
# In order to use this library, you first need to go through the following
|
37
33
|
# steps:
|
38
34
|
#
|
39
35
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
40
|
-
# 2. [Enable
|
41
|
-
# 3. [
|
36
|
+
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
37
|
+
# 3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/api/language)
|
38
|
+
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
42
39
|
#
|
43
40
|
# ### Preview
|
44
41
|
# #### LanguageServiceClient
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -19,7 +19,7 @@ module Google
|
|
19
19
|
# rubocop:disable LineLength
|
20
20
|
|
21
21
|
##
|
22
|
-
# # Ruby Client for Google Cloud Natural Language API ([
|
22
|
+
# # Ruby Client for Google Cloud Natural Language API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
23
23
|
#
|
24
24
|
# [Google Cloud Natural Language API][Product Documentation]:
|
25
25
|
# Google Cloud Natural Language API provides natural language understanding
|
@@ -32,8 +32,9 @@ module Google
|
|
32
32
|
# steps:
|
33
33
|
#
|
34
34
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
35
|
-
# 2. [Enable
|
36
|
-
# 3. [
|
35
|
+
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
36
|
+
# 3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/api/language)
|
37
|
+
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
37
38
|
#
|
38
39
|
# ### Preview
|
39
40
|
# #### LanguageServiceClient
|
@@ -89,11 +90,6 @@ module Google
|
|
89
90
|
# @param timeout [Numeric]
|
90
91
|
# The default timeout, in seconds, for calls made through this client.
|
91
92
|
def self.new \
|
92
|
-
service_path: nil,
|
93
|
-
port: nil,
|
94
|
-
channel: nil,
|
95
|
-
chan_creds: nil,
|
96
|
-
updater_proc: nil,
|
97
93
|
credentials: nil,
|
98
94
|
scopes: nil,
|
99
95
|
client_config: nil,
|
@@ -101,11 +97,6 @@ module Google
|
|
101
97
|
lib_name: nil,
|
102
98
|
lib_version: nil
|
103
99
|
kwargs = {
|
104
|
-
service_path: service_path,
|
105
|
-
port: port,
|
106
|
-
channel: channel,
|
107
|
-
chan_creds: chan_creds,
|
108
|
-
updater_proc: updater_proc,
|
109
100
|
credentials: credentials,
|
110
101
|
scopes: scopes,
|
111
102
|
client_config: client_config,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -20,7 +20,7 @@ module Google
|
|
20
20
|
#
|
21
21
|
# | Class | Description |
|
22
22
|
# | ----- | ----------- |
|
23
|
-
# | [LanguageServiceClient][] |
|
23
|
+
# | [LanguageServiceClient][] | Provides text analysis operations such as sentiment analysis and entity recognition. |
|
24
24
|
# | [Data Types][] | Data types for Google::Cloud::Language::V1 |
|
25
25
|
#
|
26
26
|
# [LanguageServiceClient]: https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud-language/latest/google/cloud/language/v1/languageserviceclient
|
@@ -1000,4 +1000,4 @@ module Google
|
|
1000
1000
|
end
|
1001
1001
|
end
|
1002
1002
|
end
|
1003
|
-
end
|
1003
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -17,7 +17,7 @@ module Google
|
|
17
17
|
# rubocop:disable LineLength
|
18
18
|
|
19
19
|
##
|
20
|
-
# # Ruby Client for Google Cloud Natural Language API ([
|
20
|
+
# # Ruby Client for Google Cloud Natural Language API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
21
21
|
#
|
22
22
|
# [Google Cloud Natural Language API][Product Documentation]:
|
23
23
|
# Google Cloud Natural Language API provides natural language understanding
|
@@ -30,8 +30,9 @@ module Google
|
|
30
30
|
# steps:
|
31
31
|
#
|
32
32
|
# 1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)
|
33
|
-
# 2. [Enable
|
34
|
-
# 3. [
|
33
|
+
# 2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)
|
34
|
+
# 3. [Enable the Google Cloud Natural Language API.](https://console.cloud.google.com/apis/api/language)
|
35
|
+
# 4. [Setup Authentication.](https://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/master/guides/authentication)
|
35
36
|
#
|
36
37
|
# ### Installation
|
37
38
|
# ```
|
@@ -64,4 +65,4 @@ module Google
|
|
64
65
|
end
|
65
66
|
end
|
66
67
|
end
|
67
|
-
end
|
68
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2018 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -18,9 +18,6 @@
|
|
18
18
|
# and updates to that file get reflected here through a refresh process.
|
19
19
|
# For the short term, the refresh process will only be runnable by Google
|
20
20
|
# engineers.
|
21
|
-
#
|
22
|
-
# The only allowed edits are to method and file documentation. A 3-way
|
23
|
-
# merge preserves those additions if the generated source changes.
|
24
21
|
|
25
22
|
require "json"
|
26
23
|
require "pathname"
|
@@ -56,6 +53,7 @@ module Google
|
|
56
53
|
"https://www.googleapis.com/auth/cloud-platform"
|
57
54
|
].freeze
|
58
55
|
|
56
|
+
|
59
57
|
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
60
58
|
# Provides the means for authenticating requests made by the client. This parameter can
|
61
59
|
# be many types.
|
@@ -81,11 +79,6 @@ module Google
|
|
81
79
|
# @param timeout [Numeric]
|
82
80
|
# The default timeout, in seconds, for calls made through this client.
|
83
81
|
def initialize \
|
84
|
-
service_path: SERVICE_ADDRESS,
|
85
|
-
port: DEFAULT_SERVICE_PORT,
|
86
|
-
channel: nil,
|
87
|
-
chan_creds: nil,
|
88
|
-
updater_proc: nil,
|
89
82
|
credentials: nil,
|
90
83
|
scopes: ALL_SCOPES,
|
91
84
|
client_config: {},
|
@@ -98,17 +91,6 @@ module Google
|
|
98
91
|
require "google/gax/grpc"
|
99
92
|
require "google/cloud/language/v1/language_service_services_pb"
|
100
93
|
|
101
|
-
if channel || chan_creds || updater_proc
|
102
|
-
warn "The `channel`, `chan_creds`, and `updater_proc` parameters will be removed " \
|
103
|
-
"on 2017/09/08"
|
104
|
-
credentials ||= channel
|
105
|
-
credentials ||= chan_creds
|
106
|
-
credentials ||= updater_proc
|
107
|
-
end
|
108
|
-
if service_path != SERVICE_ADDRESS || port != DEFAULT_SERVICE_PORT
|
109
|
-
warn "`service_path` and `port` parameters are deprecated and will be removed"
|
110
|
-
end
|
111
|
-
|
112
94
|
credentials ||= Google::Cloud::Language::Credentials.default
|
113
95
|
|
114
96
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
@@ -127,9 +109,11 @@ module Google
|
|
127
109
|
updater_proc = credentials.updater_proc
|
128
110
|
end
|
129
111
|
|
112
|
+
package_version = Gem.loaded_specs['google-cloud-language'].version.version
|
113
|
+
|
130
114
|
google_api_client = "gl-ruby/#{RUBY_VERSION}"
|
131
115
|
google_api_client << " #{lib_name}/#{lib_version}" if lib_name
|
132
|
-
google_api_client << " gapic
|
116
|
+
google_api_client << " gapic/#{package_version} gax/#{Google::Gax::VERSION}"
|
133
117
|
google_api_client << " grpc/#{GRPC::VERSION}"
|
134
118
|
google_api_client.freeze
|
135
119
|
|
@@ -148,6 +132,10 @@ module Google
|
|
148
132
|
kwargs: headers
|
149
133
|
)
|
150
134
|
end
|
135
|
+
|
136
|
+
# Allow overriding the service path/port in subclasses.
|
137
|
+
service_path = self.class::SERVICE_ADDRESS
|
138
|
+
port = self.class::DEFAULT_SERVICE_PORT
|
151
139
|
@language_service_stub = Google::Gax::Grpc.create_stub(
|
152
140
|
service_path,
|
153
141
|
port,
|
@@ -7,7 +7,7 @@
|
|
7
7
|
# you may not use this file except in compliance with the License.
|
8
8
|
# You may obtain a copy of the License at
|
9
9
|
#
|
10
|
-
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
11
|
#
|
12
12
|
# Unless required by applicable law or agreed to in writing, software
|
13
13
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
@@ -19,7 +19,7 @@ module Google
|
|
19
19
|
# rubocop:disable LineLength
|
20
20
|
|
21
21
|
##
|
22
|
-
# # Ruby Client for Google Cloud Natural Language API ([
|
22
|
+
# # Ruby Client for Google Cloud Natural Language API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
23
23
|
#
|
24
24
|
# [Google Cloud Natural Language API][Product Documentation]:
|
25
25
|
# Google Cloud Natural Language API provides natural language understanding
|
@@ -17,7 +17,7 @@ module Google
|
|
17
17
|
# rubocop:disable LineLength
|
18
18
|
|
19
19
|
##
|
20
|
-
# # Ruby Client for Google Cloud Natural Language API ([
|
20
|
+
# # Ruby Client for Google Cloud Natural Language API ([Beta](https://github.com/GoogleCloudPlatform/google-cloud-ruby#versioning))
|
21
21
|
#
|
22
22
|
# [Google Cloud Natural Language API][Product Documentation]:
|
23
23
|
# Google Cloud Natural Language API provides natural language understanding
|
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: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Google
|
7
|
+
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.50.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.50.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: simplecov
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,9 +96,7 @@ homepage: https://github.com/googleapis/googleapis
|
|
96
96
|
licenses:
|
97
97
|
- Apache-2.0
|
98
98
|
metadata: {}
|
99
|
-
post_install_message:
|
100
|
-
the previous release, 0.27.1. For more details and instructions to migrate your
|
101
|
-
code, please visit the migration guide: https://cloud.google.com/natural-language/docs/ruby-client-migration.'
|
99
|
+
post_install_message:
|
102
100
|
rdoc_options: []
|
103
101
|
require_paths:
|
104
102
|
- lib
|
@@ -114,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
112
|
version: '0'
|
115
113
|
requirements: []
|
116
114
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.7.
|
115
|
+
rubygems_version: 2.7.6
|
118
116
|
signing_key:
|
119
117
|
specification_version: 4
|
120
118
|
summary: API Client library for Google Cloud Natural Language API
|