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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d81ce2def979a8926d57ea35998eba4c3fcdf298c1feb74812bae55f44c13fc0
4
- data.tar.gz: 1e77680af535c48d5c6e4e47722410ed747ce2be6a7e89552cd6531396a3b754
3
+ metadata.gz: c04c7b847c530b0a56307c46e8772f6627f5832ea80372e597838b0c1570dcd0
4
+ data.tar.gz: '09421acdf79ee73cdefca95f5cbc41fea92702b426af9b42724411a1dfc78ce5'
5
5
  SHA512:
6
- metadata.gz: 8686b163bf82bb0eb713c2b1f4338011f5dc83d254d79a6ca9454376e5adc0456cf454420abc4416da006ff4dca0d835d446f9ebd0bfed8659ac56fd0f496ffb
7
- data.tar.gz: 7f599b5344bf45a276fe664f0b1ffc553024c8c7e2d75e63d9578947a6ba6e5fde9f891666e78e13878a27fa7b0f55e5947dd46073d442748cd30cf464762ec4
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 = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
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, "vision.googleapis.com", String
589
- config_attr :credentials, nil do |value|
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, nil, ::String, ::Array, nil
595
- config_attr :lib_name, nil, ::String, nil
596
- config_attr :lib_version, nil, ::String, nil
597
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
598
- config_attr :interceptors, nil, ::Array, nil
599
- config_attr :timeout, nil, ::Numeric, nil
600
- config_attr :metadata, nil, ::Hash, nil
601
- config_attr :retry_policy, nil, ::Hash, Proc, nil
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, "vision.googleapis.com", String
472
- config_attr :credentials, nil do |value|
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, nil, ::String, ::Array, nil
478
- config_attr :lib_name, nil, ::String, nil
479
- config_attr :lib_version, nil, ::String, nil
480
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
481
- config_attr :interceptors, nil, ::Array, nil
482
- config_attr :timeout, nil, ::Numeric, nil
483
- config_attr :metadata, nil, ::Hash, nil
484
- config_attr :retry_policy, nil, ::Hash, Proc, nil
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 = credentials.respond_to?(:quota_project_id) ? credentials.quota_project_id : nil
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, "vision.googleapis.com", String
1923
- config_attr :credentials, nil do |value|
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, nil, ::String, ::Array, nil
1929
- config_attr :lib_name, nil, ::String, nil
1930
- config_attr :lib_version, nil, ::String, nil
1931
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
1932
- config_attr :interceptors, nil, ::Array, nil
1933
- config_attr :timeout, nil, ::Numeric, nil
1934
- config_attr :metadata, nil, ::Hash, nil
1935
- config_attr :retry_policy, nil, ::Hash, Proc, nil
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, "vision.googleapis.com", String
472
- config_attr :credentials, nil do |value|
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, nil, ::String, ::Array, nil
478
- config_attr :lib_name, nil, ::String, nil
479
- config_attr :lib_version, nil, ::String, nil
480
- config_attr(:channel_args, { "grpc.service_config_disable_resolution"=>1 }, ::Hash, nil)
481
- config_attr :interceptors, nil, ::Array, nil
482
- config_attr :timeout, nil, ::Numeric, nil
483
- config_attr :metadata, nil, ::Hash, nil
484
- config_attr :retry_policy, nil, ::Hash, Proc, nil
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
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Vision
23
23
  module V1
24
- VERSION = "0.1.5"
24
+ VERSION = "0.2.0"
25
25
  end
26
26
  end
27
27
  end
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.1.5
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-05 00:00:00.000000000 Z
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.10'
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.10'
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