google-cloud-storage 1.44.0 → 1.46.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +8 -26
- data/CHANGELOG.md +12 -0
- data/lib/google/cloud/storage/bucket.rb +46 -6
- data/lib/google/cloud/storage/file/list.rb +7 -3
- data/lib/google/cloud/storage/project.rb +35 -0
- data/lib/google/cloud/storage/service.rb +16 -1
- data/lib/google/cloud/storage/version.rb +1 -1
- data/lib/google/cloud/storage.rb +12 -4
- data/lib/google-cloud-storage.rb +14 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9180138623d24136aba3789a2999158c8e1936ccc483be54e96d7ad5ce0270cd
|
4
|
+
data.tar.gz: db71d2a866acb5b3c63a55d26393ef4d4b05dbdbdc529f51b4e8343d0674ec3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33f397b67897fb16738284a45998c6df621cf7cc7a26cf57582c092ec0ff40b3fa38c2cc7a74489ff46debcad240cb82a1e4293302dd0eb6214e261aa7972e4d
|
7
|
+
data.tar.gz: d52e0f8e792f8dc9359d24c58cba4c1dbc7714114078be630c40ce8d652bef3e4b336785c3b7f440b6df41f61f2699fa69d3073113e1c985a504d69a24debf2c
|
data/AUTHENTICATION.md
CHANGED
@@ -112,15 +112,6 @@ those that produce
|
|
112
112
|
post objects. For these methods, authentication using a service account JSON key file
|
113
113
|
is required.
|
114
114
|
|
115
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
116
|
-
[dev-console]: https://console.cloud.google.com/project
|
117
|
-
|
118
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
119
|
-
|
120
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
121
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
122
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
123
|
-
|
124
115
|
## Creating a Service Account
|
125
116
|
|
126
117
|
Google Cloud requires a **Project ID** and **Service Account Credentials** to
|
@@ -130,31 +121,22 @@ connect to most services with google-cloud-storage.
|
|
130
121
|
If you are not running this client on Google Compute Engine, you need a Google
|
131
122
|
Developers service account.
|
132
123
|
|
133
|
-
1. Visit the [Google
|
124
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
134
125
|
1. Create a new project or click on an existing project.
|
135
|
-
1. Activate the
|
126
|
+
1. Activate the menu in the upper left and select **APIs & Services**. From
|
136
127
|
here, you will enable the APIs that your application requires.
|
137
128
|
|
138
|
-
![Enable the APIs that your application requires][enable-apis]
|
139
|
-
|
140
129
|
*Note: You may need to enable billing in order to use these services.*
|
141
130
|
|
142
131
|
1. Select **Credentials** from the side navigation.
|
143
132
|
|
144
|
-
|
145
|
-
|
146
|
-
![Create a new service account][create-new-service-account]
|
147
|
-
|
148
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
149
|
-
|
150
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
151
|
-
guided through downloading a new JSON key file.
|
152
|
-
|
153
|
-
If you want to re-use an existing service account, you can easily generate a
|
154
|
-
new key file. Just select the account you wish to re-use, and click "Generate
|
155
|
-
new JSON key":
|
133
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
134
|
+
"Service account" to be guided through downloading a new JSON key file.
|
156
135
|
|
157
|
-
|
136
|
+
If you want to re-use an existing service account, you can easily generate
|
137
|
+
a new key file. Just select the account you wish to re-use click the pencil
|
138
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
139
|
+
and then select **Add Key**.
|
158
140
|
|
159
141
|
The key file you download will be used by this library to authenticate API
|
160
142
|
requests and should be stored in a secure location.
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
### 1.46.0 (2024-01-08)
|
4
|
+
|
5
|
+
#### Features
|
6
|
+
|
7
|
+
* support match_glob for Object.list
|
8
|
+
|
9
|
+
### 1.45.0 (2023-11-06)
|
10
|
+
|
11
|
+
#### Features
|
12
|
+
|
13
|
+
* added autoclass v2.1 features ([#23483](https://github.com/googleapis/google-cloud-ruby/issues/23483))
|
14
|
+
|
3
15
|
### 1.44.0 (2022-11-02)
|
4
16
|
|
5
17
|
#### Features
|
@@ -434,6 +434,24 @@ module Google
|
|
434
434
|
@gapi.autoclass&.toggle_time
|
435
435
|
end
|
436
436
|
|
437
|
+
##
|
438
|
+
# Terminal Storage class of the autoclass
|
439
|
+
#
|
440
|
+
# @return [String]
|
441
|
+
#
|
442
|
+
def autoclass_terminal_storage_class
|
443
|
+
@gapi.autoclass&.terminal_storage_class
|
444
|
+
end
|
445
|
+
|
446
|
+
##
|
447
|
+
# Update time at which the autoclass terminal storage class was last modified
|
448
|
+
#
|
449
|
+
# @return [DateTime]
|
450
|
+
#
|
451
|
+
def autoclass_terminal_storage_class_update_time
|
452
|
+
@gapi.autoclass&.terminal_storage_class_update_time
|
453
|
+
end
|
454
|
+
|
437
455
|
##
|
438
456
|
# Updates bucket's autoclass configuration. This defines the default class for objects in the
|
439
457
|
# bucket and down/up-grades the storage class of objects based on the access patterns.
|
@@ -442,9 +460,6 @@ module Google
|
|
442
460
|
# For more information, see [Storage
|
443
461
|
# Classes](https://cloud.google.com/storage/docs/using-autoclass).
|
444
462
|
#
|
445
|
-
# Note: Only patch requests that disable autoclass are currently supported.
|
446
|
-
# To enable autoclass, you must set it at bucket creation time.
|
447
|
-
#
|
448
463
|
# @param [Boolean] toggle for autoclass configuration of the bucket.
|
449
464
|
#
|
450
465
|
def autoclass_enabled= toggle
|
@@ -453,6 +468,25 @@ module Google
|
|
453
468
|
patch_gapi! :autoclass
|
454
469
|
end
|
455
470
|
|
471
|
+
##
|
472
|
+
# Update method to update all attributes of autoclass of a bucket
|
473
|
+
# It accepts params as a Hash of attributes in the following format:
|
474
|
+
#
|
475
|
+
# { enabled: true, terminal_storage_class: "ARCHIVE" }
|
476
|
+
#
|
477
|
+
# terminal_storage_class field is optional. It defaults to `NEARLINE`.
|
478
|
+
# Valid terminal_storage_class values are `NEARLINE` and `ARCHIVE`.
|
479
|
+
#
|
480
|
+
# @param [Hash(String => String)] autoclass_attributes
|
481
|
+
#
|
482
|
+
def update_autoclass autoclass_attributes
|
483
|
+
@gapi.autoclass ||= API::Bucket::Autoclass.new
|
484
|
+
autoclass_attributes.each do |k, v|
|
485
|
+
@gapi.autoclass.send "#{k}=", v
|
486
|
+
end
|
487
|
+
patch_gapi! :autoclass
|
488
|
+
end
|
489
|
+
|
456
490
|
##
|
457
491
|
# Whether [Object
|
458
492
|
# Versioning](https://cloud.google.com/storage/docs/object-versioning)
|
@@ -1265,6 +1299,9 @@ module Google
|
|
1265
1299
|
# `prefixes` are omitted.
|
1266
1300
|
# @param [String] token A previously-returned page token representing
|
1267
1301
|
# part of the larger set of results to view.
|
1302
|
+
# @param [String] match_glob A glob pattern used to filter results returned in items (e.g. `foo*bar`).
|
1303
|
+
# The string value must be UTF-8 encoded. See:
|
1304
|
+
# https://cloud.google.com/storage/docs/json_api/v1/objects/list#list-object-glob
|
1268
1305
|
# @param [Integer] max Maximum number of items plus prefixes to return.
|
1269
1306
|
# As duplicate prefixes are omitted, fewer total results may be
|
1270
1307
|
# returned than requested. The default value of this parameter is
|
@@ -1300,14 +1337,17 @@ module Google
|
|
1300
1337
|
# end
|
1301
1338
|
#
|
1302
1339
|
def files prefix: nil, delimiter: nil, token: nil, max: nil,
|
1303
|
-
versions: nil
|
1340
|
+
versions: nil, match_glob: nil
|
1304
1341
|
ensure_service!
|
1305
1342
|
gapi = service.list_files name, prefix: prefix, delimiter: delimiter,
|
1306
1343
|
token: token, max: max,
|
1307
1344
|
versions: versions,
|
1308
|
-
user_project: user_project
|
1345
|
+
user_project: user_project,
|
1346
|
+
match_glob: match_glob
|
1309
1347
|
File::List.from_gapi gapi, service, name, prefix, delimiter, max,
|
1310
|
-
versions,
|
1348
|
+
versions,
|
1349
|
+
user_project: user_project,
|
1350
|
+
match_glob: match_glob
|
1311
1351
|
end
|
1312
1352
|
alias find_files files
|
1313
1353
|
|
@@ -83,10 +83,12 @@ module Google
|
|
83
83
|
token: @token,
|
84
84
|
max: @max,
|
85
85
|
versions: @versions,
|
86
|
-
user_project: @user_project
|
86
|
+
user_project: @user_project,
|
87
|
+
match_glob: @match_glob
|
87
88
|
File::List.from_gapi gapi, @service, @bucket, @prefix,
|
88
89
|
@delimiter, @max, @versions,
|
89
|
-
user_project: @user_project
|
90
|
+
user_project: @user_project,
|
91
|
+
match_glob: @match_glob
|
90
92
|
end
|
91
93
|
|
92
94
|
##
|
@@ -163,7 +165,8 @@ module Google
|
|
163
165
|
# Google::Apis::StorageV1::Objects object.
|
164
166
|
def self.from_gapi gapi_list, service, bucket = nil, prefix = nil,
|
165
167
|
delimiter = nil, max = nil, versions = nil,
|
166
|
-
user_project: nil
|
168
|
+
user_project: nil,
|
169
|
+
match_glob: nil
|
167
170
|
files = new(Array(gapi_list.items).map do |gapi_object|
|
168
171
|
File.from_gapi gapi_object, service, user_project: user_project
|
169
172
|
end)
|
@@ -176,6 +179,7 @@ module Google
|
|
176
179
|
files.instance_variable_set :@max, max
|
177
180
|
files.instance_variable_set :@versions, versions
|
178
181
|
files.instance_variable_set :@user_project, user_project
|
182
|
+
files.instance_variable_set :@match_glob, match_glob
|
179
183
|
files
|
180
184
|
end
|
181
185
|
|
@@ -94,6 +94,41 @@ module Google
|
|
94
94
|
service.project_service_account.email_address
|
95
95
|
end
|
96
96
|
|
97
|
+
##
|
98
|
+
# Add custom Google extension headers to the requests that use the signed URLs.
|
99
|
+
#
|
100
|
+
# @param [Hash] headers Google extension headers (custom HTTP headers that
|
101
|
+
# begin with `x-goog-`) to be included in requests that use the signed URLs.
|
102
|
+
# Provide headers as a key/value array, where the key is
|
103
|
+
# the header name, and the value is an array of header values.
|
104
|
+
# For headers with multiple values, provide values as a simple
|
105
|
+
# array, or a comma-separated string. For a reference of allowed
|
106
|
+
# headers, see [Reference Headers](https://cloud.google.com/storage/docs/xml-api/reference-headers).
|
107
|
+
#
|
108
|
+
# @return [Google::Cloud::Storage::Project] Returns the Project for method chaining
|
109
|
+
#
|
110
|
+
def add_custom_headers headers
|
111
|
+
@service.add_custom_headers headers
|
112
|
+
self
|
113
|
+
end
|
114
|
+
|
115
|
+
##
|
116
|
+
# Add custom Google extension header to the requests that use the signed URLs.
|
117
|
+
#
|
118
|
+
# @param [String] header_name Name of Google extension header (custom HTTP header that
|
119
|
+
# begin with `x-goog-`) to be included in requests that use the signed URLs.
|
120
|
+
# For a reference of allowed headers, see
|
121
|
+
# [Reference Headers](https://cloud.google.com/storage/docs/xml-api/reference-headers).
|
122
|
+
# @param [Object] header_value Valid value of the Google extension header being added.
|
123
|
+
# For headers with multiple values, provide values as a simple array, or a comma-separated string.
|
124
|
+
#
|
125
|
+
# @return [Google::Cloud::Storage::Project] Returns the Project for method chaining
|
126
|
+
#
|
127
|
+
def add_custom_header header_name, header_value
|
128
|
+
@service.add_custom_header header_name, header_value
|
129
|
+
self
|
130
|
+
end
|
131
|
+
|
97
132
|
##
|
98
133
|
# Retrieves a list of buckets for the given project.
|
99
134
|
#
|
@@ -43,7 +43,7 @@ module Google
|
|
43
43
|
timeout: nil, open_timeout: nil, read_timeout: nil,
|
44
44
|
send_timeout: nil, host: nil, quota_project: nil,
|
45
45
|
max_elapsed_time: nil, base_interval: nil, max_interval: nil,
|
46
|
-
multiplier: nil
|
46
|
+
multiplier: nil, upload_chunk_size: nil
|
47
47
|
@project = project
|
48
48
|
@credentials = credentials
|
49
49
|
@service = API::StorageService.new
|
@@ -65,6 +65,7 @@ module Google
|
|
65
65
|
@service.request_options.max_interval = max_interval if max_interval
|
66
66
|
@service.request_options.multiplier = multiplier if multiplier
|
67
67
|
@service.request_options.add_invocation_id_header = true
|
68
|
+
@service.request_options.upload_chunk_size = upload_chunk_size if upload_chunk_size
|
68
69
|
@service.authorization = @credentials.client if @credentials
|
69
70
|
@service.root_url = host if host
|
70
71
|
end
|
@@ -348,6 +349,7 @@ module Google
|
|
348
349
|
# Retrieves a list of files matching the criteria.
|
349
350
|
def list_files bucket_name, delimiter: nil, max: nil, token: nil,
|
350
351
|
prefix: nil, versions: nil, user_project: nil,
|
352
|
+
match_glob: nil,
|
351
353
|
options: {}
|
352
354
|
execute do
|
353
355
|
service.list_objects \
|
@@ -355,6 +357,7 @@ module Google
|
|
355
357
|
page_token: token, prefix: prefix,
|
356
358
|
versions: versions,
|
357
359
|
user_project: user_project(user_project),
|
360
|
+
match_glob: match_glob,
|
358
361
|
options: options
|
359
362
|
end
|
360
363
|
end
|
@@ -794,6 +797,18 @@ module Google
|
|
794
797
|
"#{self.class}(#{@project})"
|
795
798
|
end
|
796
799
|
|
800
|
+
##
|
801
|
+
# Add custom Google extension headers to the requests that use the signed URLs.
|
802
|
+
def add_custom_headers headers
|
803
|
+
@service.request_options.header.merge! headers
|
804
|
+
end
|
805
|
+
|
806
|
+
##
|
807
|
+
# Add custom Google extension header to the requests that use the signed URLs.
|
808
|
+
def add_custom_header header_name, header_value
|
809
|
+
@service.request_options.header[header_name] = header_value
|
810
|
+
end
|
811
|
+
|
797
812
|
protected
|
798
813
|
|
799
814
|
def user_project user_project
|
data/lib/google/cloud/storage.rb
CHANGED
@@ -67,6 +67,9 @@ 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 [Integer] upload_chunk_size The chunk size of storage upload, in bytes.
|
71
|
+
# The default value is 100 MB, i.e. 104_857_600 bytes. To disable chunking and upload
|
72
|
+
# the complete file regardless of size, pass 0 as the chunk size.
|
70
73
|
# @param [String] project Alias for the `project_id` argument. Deprecated.
|
71
74
|
# @param [String] keyfile Alias for the `credentials` argument.
|
72
75
|
# Deprecated.
|
@@ -89,7 +92,7 @@ module Google
|
|
89
92
|
timeout: nil, open_timeout: nil, read_timeout: nil,
|
90
93
|
send_timeout: nil, endpoint: nil, project: nil, keyfile: nil,
|
91
94
|
max_elapsed_time: nil, base_interval: nil, max_interval: nil,
|
92
|
-
multiplier: nil
|
95
|
+
multiplier: nil, upload_chunk_size: nil
|
93
96
|
scope ||= configure.scope
|
94
97
|
retries ||= configure.retries
|
95
98
|
timeout ||= configure.timeout
|
@@ -102,6 +105,7 @@ module Google
|
|
102
105
|
base_interval ||= configure.base_interval
|
103
106
|
max_interval ||= configure.max_interval
|
104
107
|
multiplier ||= configure.multiplier
|
108
|
+
upload_chunk_size ||= configure.upload_chunk_size
|
105
109
|
|
106
110
|
unless credentials.is_a? Google::Auth::Credentials
|
107
111
|
credentials = Storage::Credentials.new credentials, scope: scope
|
@@ -117,7 +121,7 @@ module Google
|
|
117
121
|
read_timeout: read_timeout, send_timeout: send_timeout,
|
118
122
|
host: endpoint, quota_project: configure.quota_project,
|
119
123
|
max_elapsed_time: max_elapsed_time, base_interval: base_interval,
|
120
|
-
max_interval: max_interval, multiplier: multiplier
|
124
|
+
max_interval: max_interval, multiplier: multiplier, upload_chunk_size: upload_chunk_size
|
121
125
|
)
|
122
126
|
)
|
123
127
|
end
|
@@ -141,6 +145,9 @@ module Google
|
|
141
145
|
# @param [Integer] send_timeout How long, in seconds, before receiving response from server times out. Optional.
|
142
146
|
# @param [String] endpoint Override of the endpoint host name. Optional.
|
143
147
|
# If the param is nil, uses the default endpoint.
|
148
|
+
# @param [Integer] upload_chunk_size The chunk size of storage upload, in bytes.
|
149
|
+
# The default value is 100 MB, i.e. 104_857_600 bytes. To disable chunking and upload
|
150
|
+
# the complete file regardless of size, pass 0 as the chunk size.
|
144
151
|
#
|
145
152
|
# @return [Google::Cloud::Storage::Project]
|
146
153
|
#
|
@@ -159,7 +166,7 @@ module Google
|
|
159
166
|
def self.anonymous retries: nil, timeout: nil, open_timeout: nil,
|
160
167
|
read_timeout: nil, send_timeout: nil, endpoint: nil,
|
161
168
|
max_elapsed_time: nil, base_interval: nil, max_interval: nil,
|
162
|
-
multiplier: nil
|
169
|
+
multiplier: nil, upload_chunk_size: nil
|
163
170
|
open_timeout ||= timeout
|
164
171
|
read_timeout ||= timeout
|
165
172
|
send_timeout ||= timeout
|
@@ -168,7 +175,7 @@ module Google
|
|
168
175
|
nil, nil, retries: retries, timeout: timeout, open_timeout: open_timeout,
|
169
176
|
read_timeout: read_timeout, send_timeout: send_timeout, host: endpoint,
|
170
177
|
max_elapsed_time: max_elapsed_time, base_interval: base_interval,
|
171
|
-
max_interval: max_interval, multiplier: multiplier
|
178
|
+
max_interval: max_interval, multiplier: multiplier, upload_chunk_size: upload_chunk_size
|
172
179
|
)
|
173
180
|
)
|
174
181
|
end
|
@@ -202,6 +209,7 @@ module Google
|
|
202
209
|
# * `open_timeout` - (Integer) How long, in seconds, before failed connections time out.
|
203
210
|
# * `read_timeout` - (Integer) How long, in seconds, before requests time out.
|
204
211
|
# * `send_timeout` - (Integer) How long, in seconds, before receiving response from server times out.
|
212
|
+
# * `upload_chunk_size` - (Integer) The chunk size of storage upload, in bytes.
|
205
213
|
#
|
206
214
|
# @return [Google::Cloud::Config] The configuration object the
|
207
215
|
# Google::Cloud::Storage library uses.
|
data/lib/google-cloud-storage.rb
CHANGED
@@ -55,6 +55,9 @@ module Google
|
|
55
55
|
# @param [Integer] open_timeout How long, in seconds, before failed connections time out. Optional.
|
56
56
|
# @param [Integer] read_timeout How long, in seconds, before requests time out. Optional.
|
57
57
|
# @param [Integer] send_timeout How long, in seconds, before receiving response from server times out. Optional.
|
58
|
+
# @param [Integer] upload_chunk_size The chunk size of storage upload, in bytes.
|
59
|
+
# The default value is 100 MB, i.e. 104_857_600 bytes. To disable chunking and upload
|
60
|
+
# the complete file regardless of size, pass 0 as the chunk size.
|
58
61
|
#
|
59
62
|
# @return [Google::Cloud::Storage::Project]
|
60
63
|
#
|
@@ -74,7 +77,7 @@ module Google
|
|
74
77
|
# readonly_storage = gcloud.storage scope: readonly_scope
|
75
78
|
#
|
76
79
|
def storage scope: nil, retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil,
|
77
|
-
max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil
|
80
|
+
max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil, upload_chunk_size: nil
|
78
81
|
Google::Cloud.storage @project, @keyfile, scope: scope,
|
79
82
|
retries: (retries || @retries),
|
80
83
|
timeout: (timeout || @timeout),
|
@@ -84,7 +87,8 @@ module Google
|
|
84
87
|
max_elapsed_time: max_elapsed_time,
|
85
88
|
base_interval: base_interval,
|
86
89
|
max_interval: max_interval,
|
87
|
-
multiplier: multiplier
|
90
|
+
multiplier: multiplier,
|
91
|
+
upload_chunk_size: upload_chunk_size
|
88
92
|
end
|
89
93
|
|
90
94
|
##
|
@@ -120,6 +124,9 @@ module Google
|
|
120
124
|
# @param [Integer] open_timeout How long, in seconds, before failed connections time out. Optional.
|
121
125
|
# @param [Integer] read_timeout How long, in seconds, before requests time out. Optional.
|
122
126
|
# @param [Integer] send_timeout How long, in seconds, before receiving response from server times out. Optional.
|
127
|
+
# @param [Integer] upload_chunk_size The chunk size of storage upload, in bytes.
|
128
|
+
# The default value is 100 MB, i.e. 104_857_600 bytes. To disable chunking and upload
|
129
|
+
# the complete file regardless of size, pass 0 as the chunk size.
|
123
130
|
#
|
124
131
|
# @return [Google::Cloud::Storage::Project]
|
125
132
|
#
|
@@ -134,7 +141,8 @@ module Google
|
|
134
141
|
#
|
135
142
|
def self.storage project_id = nil, credentials = nil, scope: nil,
|
136
143
|
retries: nil, timeout: nil, open_timeout: nil, read_timeout: nil, send_timeout: nil,
|
137
|
-
max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil
|
144
|
+
max_elapsed_time: nil, base_interval: nil, max_interval: nil, multiplier: nil,
|
145
|
+
upload_chunk_size: nil
|
138
146
|
require "google/cloud/storage"
|
139
147
|
Google::Cloud::Storage.new project_id: project_id,
|
140
148
|
credentials: credentials,
|
@@ -147,7 +155,8 @@ module Google
|
|
147
155
|
max_elapsed_time: max_elapsed_time,
|
148
156
|
base_interval: base_interval,
|
149
157
|
max_interval: max_interval,
|
150
|
-
multiplier: multiplier
|
158
|
+
multiplier: multiplier,
|
159
|
+
upload_chunk_size: upload_chunk_size
|
151
160
|
end
|
152
161
|
end
|
153
162
|
end
|
@@ -182,6 +191,7 @@ Google::Cloud.configure.add_config! :storage do |config|
|
|
182
191
|
config.add_field! :open_timeout, nil, match: Integer
|
183
192
|
config.add_field! :read_timeout, nil, match: Integer
|
184
193
|
config.add_field! :send_timeout, nil, match: Integer
|
194
|
+
config.add_field! :upload_chunk_size, nil, match: Integer
|
185
195
|
# TODO: Remove once discovery document is updated.
|
186
196
|
config.add_field! :endpoint, "https://storage.googleapis.com/", match: String
|
187
197
|
end
|
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.46.0
|
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:
|
12
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: google-cloud-core
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.
|
48
|
+
version: 0.29.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.29.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: googleauth
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -325,14 +325,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
325
325
|
requirements:
|
326
326
|
- - ">="
|
327
327
|
- !ruby/object:Gem::Version
|
328
|
-
version: '2.
|
328
|
+
version: '2.7'
|
329
329
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
330
330
|
requirements:
|
331
331
|
- - ">="
|
332
332
|
- !ruby/object:Gem::Version
|
333
333
|
version: '0'
|
334
334
|
requirements: []
|
335
|
-
rubygems_version: 3.3
|
335
|
+
rubygems_version: 3.5.3
|
336
336
|
signing_key:
|
337
337
|
specification_version: 4
|
338
338
|
summary: API Client library for Google Cloud Storage
|