google-cloud-spanner 2.12.0 → 2.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45b1fdcea254d6fe805af8a568265615a8d470d383e7792ed7ded88fa02cb8d4
4
- data.tar.gz: e2feec2a70104ff1b423f0d53f9e629308da1c24aec121c99df4a9bd70d5a655
3
+ metadata.gz: 542daf50ed73132fb41ef599e01527b0f90ea9c345c0a67325eb9fd6fc2a3d0b
4
+ data.tar.gz: 1768835bfc4a7f9c0ed168d9b56c09247e3bab6da4b53cad6e896378520cca7c
5
5
  SHA512:
6
- metadata.gz: dbc3e72ccce69115b812ec39e437f968ae5617b5bfcf960bfe8dcfb1e6fd2284fac69db82a2eb855baf129fe3dc8aeb89b69386210fcf767b3325ce05a34f035
7
- data.tar.gz: dadb3ceb9d28b211f54004bac584290c3b5ef3c8b8a20c65a8618362f65b7e9fa940204df49f109ff6a443ba836b934a6cbfa698c314f4a4c66c6478058a033c
6
+ metadata.gz: 69cd1d9cdca59e2878b96476245b2395912afc68c9a94cae437e050dd7abe3b11a6d5bd8677822e7846c7cb3644a0cfc303d5d86e79b73b4a36fa8b9f823581b
7
+ data.tar.gz: b135eb58d7ca1f2673f6504e8e6fca8eb8e8ebb9ca85fd94bfa19ff75e6af1127ab9da6cbf6798a060d1ee2faab05cc91a75355b0e45e060308901311ebd354d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Release History
2
2
 
3
+ ### 2.12.1 / 2022-02-16
4
+
5
+ #### Bug Fixes
6
+
7
+ * pass quota_project_id from credentials
8
+
3
9
  ### 2.12.0 / 2022-01-11
4
10
 
5
11
  No significant changes.
@@ -117,8 +117,11 @@ module Google
117
117
  project_id = project_id.to_s # Always cast to a string
118
118
  raise ArgumentError, "project_id is missing" if project_id.empty?
119
119
 
120
+ configure.quota_project ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
121
+
120
122
  Admin::Database::V1::DatabaseAdmin::Client.new do |config|
121
123
  config.credentials = channel endpoint, credentials
124
+ config.quota_project = configure.quota_project
122
125
  config.timeout = timeout if timeout
123
126
  config.endpoint = endpoint if endpoint
124
127
  config.lib_name = lib_name_with_prefix lib_name, lib_version
@@ -117,8 +117,11 @@ module Google
117
117
  project_id = project_id.to_s # Always cast to a string
118
118
  raise ArgumentError, "project_id is missing" if project_id.empty?
119
119
 
120
+ configure.quota_project ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
121
+
120
122
  Admin::Instance::V1::InstanceAdmin::Client.new do |config|
121
123
  config.credentials = channel endpoint, credentials
124
+ config.quota_project = configure.quota_project
122
125
  config.timeout = timeout if timeout
123
126
  config.endpoint = endpoint if endpoint
124
127
  config.lib_name = lib_name_with_prefix lib_name, lib_version
@@ -34,13 +34,15 @@ module Google
34
34
  attr_accessor :host
35
35
  attr_accessor :lib_name
36
36
  attr_accessor :lib_version
37
+ attr_accessor :quota_project
37
38
 
38
39
  ##
39
40
  # Creates a new Service instance.
40
- def initialize project, credentials,
41
+ def initialize project, credentials, quota_project: nil,
41
42
  host: nil, timeout: nil, lib_name: nil, lib_version: nil
42
43
  @project = project
43
44
  @credentials = credentials
45
+ @quota_project = quota_project || (credentials.quota_project_id if credentials.respond_to? :quota_project_id)
44
46
  @host = host
45
47
  @timeout = timeout
46
48
  @lib_name = lib_name
@@ -68,6 +70,7 @@ module Google
68
70
  @service ||= \
69
71
  V1::Spanner::Client.new do |config|
70
72
  config.credentials = channel
73
+ config.quota_project = @quota_project
71
74
  config.timeout = timeout if timeout
72
75
  config.endpoint = host if host
73
76
  config.lib_name = lib_name_with_prefix
@@ -82,6 +85,7 @@ module Google
82
85
  @instances ||= \
83
86
  Admin::Instance::V1::InstanceAdmin::Client.new do |config|
84
87
  config.credentials = channel
88
+ config.quota_project = @quota_project
85
89
  config.timeout = timeout if timeout
86
90
  config.endpoint = host if host
87
91
  config.lib_name = lib_name_with_prefix
@@ -96,6 +100,7 @@ module Google
96
100
  @databases ||= \
97
101
  Admin::Database::V1::DatabaseAdmin::Client.new do |config|
98
102
  config.credentials = channel
103
+ config.quota_project = @quota_project
99
104
  config.timeout = timeout if timeout
100
105
  config.endpoint = host if host
101
106
  config.lib_name = lib_name_with_prefix
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Spanner
19
- VERSION = "2.12.0".freeze
19
+ VERSION = "2.12.1".freeze
20
20
  end
21
21
  end
22
22
  end
@@ -120,7 +120,7 @@ module Google
120
120
 
121
121
  Spanner::Project.new(
122
122
  Spanner::Service.new(
123
- project_id, credentials,
123
+ project_id, credentials, quota_project: configure.quota_project,
124
124
  host: endpoint, timeout: timeout, lib_name: lib_name,
125
125
  lib_version: lib_version
126
126
  ),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-spanner
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.0
4
+ version: 2.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-01-11 00:00:00.000000000 Z
12
+ date: 2022-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-cloud-core
@@ -333,7 +333,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
333
333
  - !ruby/object:Gem::Version
334
334
  version: '0'
335
335
  requirements: []
336
- rubygems_version: 3.3.4
336
+ rubygems_version: 3.3.5
337
337
  signing_key:
338
338
  specification_version: 4
339
339
  summary: API Client library for Google Cloud Spanner API