google-cloud-vision-v1 0.1.5 → 0.2.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/lib/google/cloud/vision/v1/image_annotator/client.rb +16 -11
- data/lib/google/cloud/vision/v1/image_annotator/operations.rb +14 -10
- data/lib/google/cloud/vision/v1/product_search/client.rb +16 -11
- data/lib/google/cloud/vision/v1/product_search/operations.rb +14 -10
- data/lib/google/cloud/vision/v1/version.rb +1 -1
- metadata +32 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c04c7b847c530b0a56307c46e8772f6627f5832ea80372e597838b0c1570dcd0
|
4
|
+
data.tar.gz: '09421acdf79ee73cdefca95f5cbc41fea92702b426af9b42724411a1dfc78ce5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0845ca9a8bd9efb6df159b8231be5da8115d71b6e63c007be059e9c59d7dc799c1359256c3b67763b8e0eac982c2a934759843884888c3c5d2950f9b3e5b4a47'
|
7
|
+
data.tar.gz: a8e5a2a357e39a8209ba4098535f16e65269b7ecf592eed7cf778998116fc40ff4eaaf39526bda1df67d4f84d1431629080c3d58b661a22fc8949c5daefaa5c0
|
@@ -164,7 +164,8 @@ module Google
|
|
164
164
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
165
165
|
credentials = Credentials.new credentials, scope: @config.scope
|
166
166
|
end
|
167
|
-
@quota_project_id =
|
167
|
+
@quota_project_id = @config.quota_project
|
168
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
168
169
|
|
169
170
|
@operations_client = Operations.new do |config|
|
170
171
|
config.credentials = credentials
|
@@ -581,24 +582,28 @@ module Google
|
|
581
582
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
582
583
|
# trigger a retry.
|
583
584
|
# @return [::Hash]
|
585
|
+
# @!attribute [rw] quota_project
|
586
|
+
# A separate project against which to charge quota.
|
587
|
+
# @return [::String]
|
584
588
|
#
|
585
589
|
class Configuration
|
586
590
|
extend ::Gapic::Config
|
587
591
|
|
588
|
-
config_attr :endpoint,
|
589
|
-
config_attr :credentials,
|
592
|
+
config_attr :endpoint, "vision.googleapis.com", ::String
|
593
|
+
config_attr :credentials, nil do |value|
|
590
594
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
591
595
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
592
596
|
allowed.any? { |klass| klass === value }
|
593
597
|
end
|
594
|
-
config_attr :scope,
|
595
|
-
config_attr :lib_name,
|
596
|
-
config_attr :lib_version,
|
597
|
-
config_attr(:channel_args,
|
598
|
-
config_attr :interceptors,
|
599
|
-
config_attr :timeout,
|
600
|
-
config_attr :metadata,
|
601
|
-
config_attr :retry_policy,
|
598
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
599
|
+
config_attr :lib_name, nil, ::String, nil
|
600
|
+
config_attr :lib_version, nil, ::String, nil
|
601
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
602
|
+
config_attr :interceptors, nil, ::Array, nil
|
603
|
+
config_attr :timeout, nil, ::Numeric, nil
|
604
|
+
config_attr :metadata, nil, ::Hash, nil
|
605
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
606
|
+
config_attr :quota_project, nil, ::String, nil
|
602
607
|
|
603
608
|
# @private
|
604
609
|
def initialize parent_config = nil
|
@@ -464,24 +464,28 @@ module Google
|
|
464
464
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
465
465
|
# trigger a retry.
|
466
466
|
# @return [::Hash]
|
467
|
+
# @!attribute [rw] quota_project
|
468
|
+
# A separate project against which to charge quota.
|
469
|
+
# @return [::String]
|
467
470
|
#
|
468
471
|
class Configuration
|
469
472
|
extend ::Gapic::Config
|
470
473
|
|
471
|
-
config_attr :endpoint,
|
472
|
-
config_attr :credentials,
|
474
|
+
config_attr :endpoint, "vision.googleapis.com", ::String
|
475
|
+
config_attr :credentials, nil do |value|
|
473
476
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
474
477
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
475
478
|
allowed.any? { |klass| klass === value }
|
476
479
|
end
|
477
|
-
config_attr :scope,
|
478
|
-
config_attr :lib_name,
|
479
|
-
config_attr :lib_version,
|
480
|
-
config_attr(:channel_args,
|
481
|
-
config_attr :interceptors,
|
482
|
-
config_attr :timeout,
|
483
|
-
config_attr :metadata,
|
484
|
-
config_attr :retry_policy,
|
480
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
481
|
+
config_attr :lib_name, nil, ::String, nil
|
482
|
+
config_attr :lib_version, nil, ::String, nil
|
483
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
484
|
+
config_attr :interceptors, nil, ::Array, nil
|
485
|
+
config_attr :timeout, nil, ::Numeric, nil
|
486
|
+
config_attr :metadata, nil, ::Hash, nil
|
487
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
488
|
+
config_attr :quota_project, nil, ::String, nil
|
485
489
|
|
486
490
|
# @private
|
487
491
|
def initialize parent_config = nil
|
@@ -295,7 +295,8 @@ module Google
|
|
295
295
|
if credentials.is_a?(String) || credentials.is_a?(Hash)
|
296
296
|
credentials = Credentials.new credentials, scope: @config.scope
|
297
297
|
end
|
298
|
-
@quota_project_id =
|
298
|
+
@quota_project_id = @config.quota_project
|
299
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
299
300
|
|
300
301
|
@operations_client = Operations.new do |config|
|
301
302
|
config.credentials = credentials
|
@@ -1915,24 +1916,28 @@ module Google
|
|
1915
1916
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1916
1917
|
# trigger a retry.
|
1917
1918
|
# @return [::Hash]
|
1919
|
+
# @!attribute [rw] quota_project
|
1920
|
+
# A separate project against which to charge quota.
|
1921
|
+
# @return [::String]
|
1918
1922
|
#
|
1919
1923
|
class Configuration
|
1920
1924
|
extend ::Gapic::Config
|
1921
1925
|
|
1922
|
-
config_attr :endpoint,
|
1923
|
-
config_attr :credentials,
|
1926
|
+
config_attr :endpoint, "vision.googleapis.com", ::String
|
1927
|
+
config_attr :credentials, nil do |value|
|
1924
1928
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1925
1929
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
1926
1930
|
allowed.any? { |klass| klass === value }
|
1927
1931
|
end
|
1928
|
-
config_attr :scope,
|
1929
|
-
config_attr :lib_name,
|
1930
|
-
config_attr :lib_version,
|
1931
|
-
config_attr(:channel_args,
|
1932
|
-
config_attr :interceptors,
|
1933
|
-
config_attr :timeout,
|
1934
|
-
config_attr :metadata,
|
1935
|
-
config_attr :retry_policy,
|
1932
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1933
|
+
config_attr :lib_name, nil, ::String, nil
|
1934
|
+
config_attr :lib_version, nil, ::String, nil
|
1935
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
1936
|
+
config_attr :interceptors, nil, ::Array, nil
|
1937
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1938
|
+
config_attr :metadata, nil, ::Hash, nil
|
1939
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1940
|
+
config_attr :quota_project, nil, ::String, nil
|
1936
1941
|
|
1937
1942
|
# @private
|
1938
1943
|
def initialize parent_config = nil
|
@@ -464,24 +464,28 @@ module Google
|
|
464
464
|
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
465
465
|
# trigger a retry.
|
466
466
|
# @return [::Hash]
|
467
|
+
# @!attribute [rw] quota_project
|
468
|
+
# A separate project against which to charge quota.
|
469
|
+
# @return [::String]
|
467
470
|
#
|
468
471
|
class Configuration
|
469
472
|
extend ::Gapic::Config
|
470
473
|
|
471
|
-
config_attr :endpoint,
|
472
|
-
config_attr :credentials,
|
474
|
+
config_attr :endpoint, "vision.googleapis.com", ::String
|
475
|
+
config_attr :credentials, nil do |value|
|
473
476
|
allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
474
477
|
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
475
478
|
allowed.any? { |klass| klass === value }
|
476
479
|
end
|
477
|
-
config_attr :scope,
|
478
|
-
config_attr :lib_name,
|
479
|
-
config_attr :lib_version,
|
480
|
-
config_attr(:channel_args,
|
481
|
-
config_attr :interceptors,
|
482
|
-
config_attr :timeout,
|
483
|
-
config_attr :metadata,
|
484
|
-
config_attr :retry_policy,
|
480
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
481
|
+
config_attr :lib_name, nil, ::String, nil
|
482
|
+
config_attr :lib_version, nil, ::String, nil
|
483
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
|
484
|
+
config_attr :interceptors, nil, ::Array, nil
|
485
|
+
config_attr :timeout, nil, ::Numeric, nil
|
486
|
+
config_attr :metadata, nil, ::Hash, nil
|
487
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
488
|
+
config_attr :quota_project, nil, ::String, nil
|
485
489
|
|
486
490
|
# @private
|
487
491
|
def initialize parent_config = nil
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-vision-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.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: 2020-05-
|
11
|
+
date: 2020-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -58,14 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '5.
|
61
|
+
version: '5.14'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '5.
|
68
|
+
version: '5.14'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-focus
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.1'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: minitest-rg
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.2'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|