google-cloud-storage 1.47.0 → 1.48.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/google/cloud/storage/project.rb +9 -0
- data/lib/google/cloud/storage/service.rb +13 -1
- data/lib/google/cloud/storage/version.rb +1 -1
- data/lib/google/cloud/storage.rb +11 -4
- data/lib/google-cloud-storage.rb +2 -2
- metadata +24 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ba208497567ec78a35a17309d8f7510a26cbfa304522fef436c32b607c7a295
|
4
|
+
data.tar.gz: 2e9294c55434f76c3723d1408c5b777c7bd195f4405ec08d88b8d33903136b60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f31dd1e06029deba139bd8da0551d44664890b88cb6259428f1d150268693aabc3f9e05892108cf38d2c25d18d8046f200c4fbdc6087594f12e8761dc2e7f90
|
7
|
+
data.tar.gz: f0d6919dbb3d252c069ed2673e3dbef881f94409ee6dd7ee73bd1ec63425f8c1afcd0ef19e87095001a69ebc80c6fe253d2e76712b9f412c2745ccbf3d55bdac
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 1.48.1 (2024-01-26)
|
4
|
+
|
5
|
+
#### Bug Fixes
|
6
|
+
|
7
|
+
* Raise an error on mismatching universe domain ([#24486](https://github.com/googleapis/google-cloud-ruby/issues/24486))
|
8
|
+
|
9
|
+
### 1.48.0 (2024-01-25)
|
10
|
+
|
11
|
+
#### Features
|
12
|
+
|
13
|
+
* Support for universe_domain ([#24449](https://github.com/googleapis/google-cloud-ruby/issues/24449))
|
14
|
+
|
3
15
|
### 1.47.0 (2024-01-09)
|
4
16
|
|
5
17
|
#### Features
|
@@ -62,6 +62,15 @@ module Google
|
|
62
62
|
@service = service
|
63
63
|
end
|
64
64
|
|
65
|
+
##
|
66
|
+
# The universe domain the client is connected to
|
67
|
+
#
|
68
|
+
# @return [String]
|
69
|
+
#
|
70
|
+
def universe_domain
|
71
|
+
service.universe_domain
|
72
|
+
end
|
73
|
+
|
65
74
|
##
|
66
75
|
# The Storage project connected to.
|
67
76
|
#
|
@@ -36,6 +36,11 @@ module Google
|
|
36
36
|
# @private
|
37
37
|
attr_accessor :credentials
|
38
38
|
|
39
|
+
# @private
|
40
|
+
def universe_domain
|
41
|
+
service.universe_domain
|
42
|
+
end
|
43
|
+
|
39
44
|
##
|
40
45
|
# Creates a new Service instance.
|
41
46
|
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
@@ -43,7 +48,7 @@ module Google
|
|
43
48
|
timeout: nil, open_timeout: nil, read_timeout: nil,
|
44
49
|
send_timeout: nil, host: nil, quota_project: nil,
|
45
50
|
max_elapsed_time: nil, base_interval: nil, max_interval: nil,
|
46
|
-
multiplier: nil, upload_chunk_size: nil
|
51
|
+
multiplier: nil, upload_chunk_size: nil, universe_domain: nil
|
47
52
|
@project = project
|
48
53
|
@credentials = credentials
|
49
54
|
@service = API::StorageService.new
|
@@ -68,6 +73,13 @@ module Google
|
|
68
73
|
@service.request_options.upload_chunk_size = upload_chunk_size if upload_chunk_size
|
69
74
|
@service.authorization = @credentials.client if @credentials
|
70
75
|
@service.root_url = host if host
|
76
|
+
@service.universe_domain = universe_domain
|
77
|
+
begin
|
78
|
+
@service.verify_universe_domain!
|
79
|
+
rescue Google::Apis::UniverseDomainError => e
|
80
|
+
# TODO: Create a Google::Cloud::Error subclass for this.
|
81
|
+
raise Google::Cloud::Error, e.message
|
82
|
+
end
|
71
83
|
end
|
72
84
|
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
73
85
|
|
data/lib/google/cloud/storage.rb
CHANGED
@@ -67,6 +67,8 @@ module Google
|
|
67
67
|
# @param [Integer] send_timeout How long, in seconds, before receiving response from server times out. Optional.
|
68
68
|
# @param [String] endpoint Override of the endpoint host name. Optional.
|
69
69
|
# If the param is nil, uses the default endpoint.
|
70
|
+
# @param universe_domain [String] Override of the universe domain. Optional.
|
71
|
+
# If unset or nil, uses the default unvierse domain
|
70
72
|
# @param [Integer] upload_chunk_size The chunk size of storage upload, in bytes.
|
71
73
|
# The default value is 100 MB, i.e. 104_857_600 bytes. To disable chunking and upload
|
72
74
|
# the complete file regardless of size, pass 0 as the chunk size.
|
@@ -92,7 +94,7 @@ module Google
|
|
92
94
|
timeout: nil, open_timeout: nil, read_timeout: nil,
|
93
95
|
send_timeout: nil, endpoint: nil, project: nil, keyfile: nil,
|
94
96
|
max_elapsed_time: nil, base_interval: nil, max_interval: nil,
|
95
|
-
multiplier: nil, upload_chunk_size: nil
|
97
|
+
multiplier: nil, upload_chunk_size: nil, universe_domain: nil
|
96
98
|
scope ||= configure.scope
|
97
99
|
retries ||= configure.retries
|
98
100
|
timeout ||= configure.timeout
|
@@ -106,6 +108,7 @@ module Google
|
|
106
108
|
max_interval ||= configure.max_interval
|
107
109
|
multiplier ||= configure.multiplier
|
108
110
|
upload_chunk_size ||= configure.upload_chunk_size
|
111
|
+
universe_domain ||= configure.universe_domain
|
109
112
|
|
110
113
|
unless credentials.is_a? Google::Auth::Credentials
|
111
114
|
credentials = Storage::Credentials.new credentials, scope: scope
|
@@ -121,7 +124,8 @@ module Google
|
|
121
124
|
read_timeout: read_timeout, send_timeout: send_timeout,
|
122
125
|
host: endpoint, quota_project: configure.quota_project,
|
123
126
|
max_elapsed_time: max_elapsed_time, base_interval: base_interval,
|
124
|
-
max_interval: max_interval, multiplier: multiplier, upload_chunk_size: upload_chunk_size
|
127
|
+
max_interval: max_interval, multiplier: multiplier, upload_chunk_size: upload_chunk_size,
|
128
|
+
universe_domain: universe_domain
|
125
129
|
)
|
126
130
|
)
|
127
131
|
end
|
@@ -145,6 +149,8 @@ module Google
|
|
145
149
|
# @param [Integer] send_timeout How long, in seconds, before receiving response from server times out. Optional.
|
146
150
|
# @param [String] endpoint Override of the endpoint host name. Optional.
|
147
151
|
# If the param is nil, uses the default endpoint.
|
152
|
+
# @param universe_domain [String] Override of the universe domain. Optional.
|
153
|
+
# If unset or nil, uses the default unvierse domain
|
148
154
|
# @param [Integer] upload_chunk_size The chunk size of storage upload, in bytes.
|
149
155
|
# The default value is 100 MB, i.e. 104_857_600 bytes. To disable chunking and upload
|
150
156
|
# the complete file regardless of size, pass 0 as the chunk size.
|
@@ -166,7 +172,7 @@ module Google
|
|
166
172
|
def self.anonymous retries: nil, timeout: nil, open_timeout: nil,
|
167
173
|
read_timeout: nil, send_timeout: nil, endpoint: nil,
|
168
174
|
max_elapsed_time: nil, base_interval: nil, max_interval: nil,
|
169
|
-
multiplier: nil, upload_chunk_size: nil
|
175
|
+
multiplier: nil, upload_chunk_size: nil, universe_domain: nil
|
170
176
|
open_timeout ||= timeout
|
171
177
|
read_timeout ||= timeout
|
172
178
|
send_timeout ||= timeout
|
@@ -175,7 +181,8 @@ module Google
|
|
175
181
|
nil, nil, retries: retries, timeout: timeout, open_timeout: open_timeout,
|
176
182
|
read_timeout: read_timeout, send_timeout: send_timeout, host: endpoint,
|
177
183
|
max_elapsed_time: max_elapsed_time, base_interval: base_interval,
|
178
|
-
max_interval: max_interval, multiplier: multiplier, upload_chunk_size: upload_chunk_size
|
184
|
+
max_interval: max_interval, multiplier: multiplier, upload_chunk_size: upload_chunk_size,
|
185
|
+
universe_domain: universe_domain
|
179
186
|
)
|
180
187
|
)
|
181
188
|
end
|
data/lib/google-cloud-storage.rb
CHANGED
@@ -192,7 +192,7 @@ Google::Cloud.configure.add_config! :storage do |config|
|
|
192
192
|
config.add_field! :read_timeout, nil, match: Integer
|
193
193
|
config.add_field! :send_timeout, nil, match: Integer
|
194
194
|
config.add_field! :upload_chunk_size, nil, match: Integer
|
195
|
-
|
196
|
-
config.add_field! :
|
195
|
+
config.add_field! :endpoint, nil, match: String, allow_nil: true
|
196
|
+
config.add_field! :universe_domain, nil, match: String, allow_nil: true
|
197
197
|
end
|
198
198
|
# rubocop:enable Metrics/BlockLength
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.48.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: 2024-01-
|
12
|
+
date: 2024-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -25,54 +25,62 @@ dependencies:
|
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.6'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: google-apis-core
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0.13'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0.13'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: google-apis-iamcredentials_v1
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
31
45
|
requirements:
|
32
46
|
- - "~>"
|
33
47
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0.
|
48
|
+
version: '0.18'
|
35
49
|
type: :runtime
|
36
50
|
prerelease: false
|
37
51
|
version_requirements: !ruby/object:Gem::Requirement
|
38
52
|
requirements:
|
39
53
|
- - "~>"
|
40
54
|
- !ruby/object:Gem::Version
|
41
|
-
version: '0.
|
55
|
+
version: '0.18'
|
42
56
|
- !ruby/object:Gem::Dependency
|
43
57
|
name: google-apis-storage_v1
|
44
58
|
requirement: !ruby/object:Gem::Requirement
|
45
59
|
requirements:
|
46
60
|
- - "~>"
|
47
61
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.
|
62
|
+
version: '0.33'
|
49
63
|
type: :runtime
|
50
64
|
prerelease: false
|
51
65
|
version_requirements: !ruby/object:Gem::Requirement
|
52
66
|
requirements:
|
53
67
|
- - "~>"
|
54
68
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
69
|
+
version: '0.33'
|
56
70
|
- !ruby/object:Gem::Dependency
|
57
71
|
name: googleauth
|
58
72
|
requirement: !ruby/object:Gem::Requirement
|
59
73
|
requirements:
|
60
|
-
- - "
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: 0.16.2
|
63
|
-
- - "<"
|
74
|
+
- - "~>"
|
64
75
|
- !ruby/object:Gem::Version
|
65
|
-
version:
|
76
|
+
version: '1.9'
|
66
77
|
type: :runtime
|
67
78
|
prerelease: false
|
68
79
|
version_requirements: !ruby/object:Gem::Requirement
|
69
80
|
requirements:
|
70
|
-
- - "
|
71
|
-
- !ruby/object:Gem::Version
|
72
|
-
version: 0.16.2
|
73
|
-
- - "<"
|
81
|
+
- - "~>"
|
74
82
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
83
|
+
version: '1.9'
|
76
84
|
- !ruby/object:Gem::Dependency
|
77
85
|
name: digest-crc
|
78
86
|
requirement: !ruby/object:Gem::Requirement
|