aws-sdk-s3 1.111.0 → 1.112.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/CHANGELOG.md +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/client.rb +3 -1
- data/lib/aws-sdk-s3/file_downloader.rb +1 -1
- data/lib/aws-sdk-s3/file_uploader.rb +5 -0
- data/lib/aws-sdk-s3/presigned_post.rb +29 -17
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7135385809fecd43db1af321e774082d7033ed91c0a0affcc1bcf702157d6642
|
4
|
+
data.tar.gz: 853b902870e3d5d395b970066e66fc19fc2cbb83fcf3b2df0930a94dc5600116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ff3c7f6ecee4e91933275c7e0d10fb7bac8e6473b3e8c206b41c1ad81307f4b65ea794b095287ac807d091c2b0d414e0e00aef411ab9556c954b43c93eb93cc
|
7
|
+
data.tar.gz: d876c94edf3c2c3286a8c704b8a3dde2c8565dd7f8e9878f3ca5cbac4211f6ac3558dc07cbaecd3beda2a9d151843ac0fb16814eb0301b86c44ed27e975470f5
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.112.0 (2022-02-03)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.111.3 (2022-01-24)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Issue - Fix starts_with fields on `PresignedPost` (#2636).
|
13
|
+
|
14
|
+
1.111.2 (2022-01-20)
|
15
|
+
------------------
|
16
|
+
|
17
|
+
* Issue - Minor cleanups.
|
18
|
+
|
19
|
+
1.111.1 (2022-01-06)
|
20
|
+
------------------
|
21
|
+
|
22
|
+
* Issue - Don't fail small files in `upload_file` when `:thread_count` is set. (#2628)
|
23
|
+
|
4
24
|
1.111.0 (2022-01-04)
|
5
25
|
------------------
|
6
26
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.112.0
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -28,6 +28,7 @@ require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
|
28
28
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
29
29
|
require 'aws-sdk-core/plugins/http_checksum.rb'
|
30
30
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
31
|
+
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
31
32
|
require 'aws-sdk-core/plugins/protocols/rest_xml.rb'
|
32
33
|
require 'aws-sdk-s3/plugins/accelerate.rb'
|
33
34
|
require 'aws-sdk-s3/plugins/arn.rb'
|
@@ -93,6 +94,7 @@ module Aws::S3
|
|
93
94
|
add_plugin(Aws::Plugins::TransferEncoding)
|
94
95
|
add_plugin(Aws::Plugins::HttpChecksum)
|
95
96
|
add_plugin(Aws::Plugins::DefaultsMode)
|
97
|
+
add_plugin(Aws::Plugins::RecursionDetection)
|
96
98
|
add_plugin(Aws::Plugins::Protocols::RestXml)
|
97
99
|
add_plugin(Aws::S3::Plugins::Accelerate)
|
98
100
|
add_plugin(Aws::S3::Plugins::ARN)
|
@@ -14216,7 +14218,7 @@ module Aws::S3
|
|
14216
14218
|
params: params,
|
14217
14219
|
config: config)
|
14218
14220
|
context[:gem_name] = 'aws-sdk-s3'
|
14219
|
-
context[:gem_version] = '1.
|
14221
|
+
context[:gem_version] = '1.112.0'
|
14220
14222
|
Seahorse::Client::Request.new(handlers, context)
|
14221
14223
|
end
|
14222
14224
|
|
@@ -134,7 +134,7 @@ module Aws
|
|
134
134
|
def write(resp)
|
135
135
|
range, _ = resp.content_range.split(' ').last.split('/')
|
136
136
|
head, _ = range.split('-').map {|s| s.to_i}
|
137
|
-
|
137
|
+
File.write(@path, resp.body.read, head)
|
138
138
|
end
|
139
139
|
|
140
140
|
def single_request
|
@@ -32,11 +32,16 @@ module Aws
|
|
32
32
|
# @option options [Proc] :progress_callback
|
33
33
|
# A Proc that will be called when each chunk of the upload is sent.
|
34
34
|
# It will be invoked with [bytes_read], [total_sizes]
|
35
|
+
# @option options [Integer] :thread_count
|
36
|
+
# The thread count to use for multipart uploads. Ignored for
|
37
|
+
# objects smaller than the multipart threshold.
|
35
38
|
# @return [void]
|
36
39
|
def upload(source, options = {})
|
37
40
|
if File.size(source) >= multipart_threshold
|
38
41
|
MultipartFileUploader.new(@options).upload(source, options)
|
39
42
|
else
|
43
|
+
# remove multipart parameters not supported by put_object
|
44
|
+
options.delete(:thread_count)
|
40
45
|
put_object(source, options)
|
41
46
|
end
|
42
47
|
end
|
@@ -176,6 +176,7 @@ module Aws
|
|
176
176
|
# ```
|
177
177
|
#
|
178
178
|
class PresignedPost
|
179
|
+
@@allowed_fields = []
|
179
180
|
|
180
181
|
# @param [Credentials] credentials Security credentials for signing
|
181
182
|
# the post policy.
|
@@ -247,7 +248,12 @@ module Aws
|
|
247
248
|
case option_name
|
248
249
|
when :allow_any then allow_any(option_value)
|
249
250
|
when :signature_expiration then @signature_expiration = option_value
|
250
|
-
else
|
251
|
+
else
|
252
|
+
if @@allowed_fields.include?(option_name)
|
253
|
+
send("#{option_name}", option_value)
|
254
|
+
else
|
255
|
+
raise ArgumentError, "Unsupported option: #{option_name}"
|
256
|
+
end
|
251
257
|
end
|
252
258
|
end
|
253
259
|
end
|
@@ -279,17 +285,23 @@ module Aws
|
|
279
285
|
end
|
280
286
|
|
281
287
|
# @api private
|
282
|
-
def self.define_field(field, *args)
|
288
|
+
def self.define_field(field, *args, &block)
|
289
|
+
@@allowed_fields << field
|
283
290
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
284
291
|
field_name = args.last || field.to_s
|
285
292
|
|
286
|
-
|
287
|
-
|
288
|
-
|
293
|
+
if block_given?
|
294
|
+
define_method("#{field}", block)
|
295
|
+
else
|
296
|
+
define_method("#{field}") do |value|
|
297
|
+
with(field_name, value)
|
298
|
+
end
|
289
299
|
|
290
|
-
|
291
|
-
|
292
|
-
|
300
|
+
if options[:starts_with]
|
301
|
+
@@allowed_fields << "#{field}_starts_with".to_sym
|
302
|
+
define_method("#{field}_starts_with") do |value|
|
303
|
+
starts_with(field_name, value)
|
304
|
+
end
|
293
305
|
end
|
294
306
|
end
|
295
307
|
end
|
@@ -307,7 +319,7 @@ module Aws
|
|
307
319
|
# @param [String] key
|
308
320
|
# @see http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html)
|
309
321
|
# @return [self]
|
310
|
-
|
322
|
+
define_field(:key) do |key|
|
311
323
|
@key_set = true
|
312
324
|
with('key', key)
|
313
325
|
end
|
@@ -316,7 +328,7 @@ module Aws
|
|
316
328
|
# @param [String] prefix
|
317
329
|
# @see #key
|
318
330
|
# @return [self]
|
319
|
-
|
331
|
+
define_field(:key_starts_with) do |prefix|
|
320
332
|
@key_set = true
|
321
333
|
starts_with('key', prefix)
|
322
334
|
end
|
@@ -399,21 +411,21 @@ module Aws
|
|
399
411
|
# @param [Time] time
|
400
412
|
# @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
|
401
413
|
# @return [self]
|
402
|
-
|
414
|
+
define_field(:expires) do |time|
|
403
415
|
with('Expires', time.httpdate)
|
404
416
|
end
|
405
417
|
|
406
418
|
# @param [String] prefix
|
407
419
|
# @see #expires
|
408
420
|
# @return [self]
|
409
|
-
|
421
|
+
define_field(:expires_starts_with) do |prefix|
|
410
422
|
starts_with('Expires', prefix)
|
411
423
|
end
|
412
424
|
|
413
425
|
# The minimum and maximum allowable size for the uploaded content.
|
414
426
|
# @param [Range<Integer>] byte_range
|
415
427
|
# @return [self]
|
416
|
-
|
428
|
+
define_field(:content_length_range) do |byte_range|
|
417
429
|
min = byte_range.begin
|
418
430
|
max = byte_range.end
|
419
431
|
max -= 1 if byte_range.exclude_end?
|
@@ -492,7 +504,7 @@ module Aws
|
|
492
504
|
# prefixed with "x-amz-meta-".
|
493
505
|
# @param [Hash<String,String>] hash
|
494
506
|
# @return [self]
|
495
|
-
|
507
|
+
define_field(:metadata) do |hash|
|
496
508
|
hash.each do |key, value|
|
497
509
|
with("x-amz-meta-#{key}", value)
|
498
510
|
end
|
@@ -503,7 +515,7 @@ module Aws
|
|
503
515
|
# @param [Hash<String,String>] hash
|
504
516
|
# @see #metadata
|
505
517
|
# @return [self]
|
506
|
-
|
518
|
+
define_field(:metadata_starts_with) do |hash|
|
507
519
|
hash.each do |key, value|
|
508
520
|
starts_with("x-amz-meta-#{key}", value)
|
509
521
|
end
|
@@ -561,7 +573,7 @@ module Aws
|
|
561
573
|
# @param [String] value
|
562
574
|
# @see #server_side_encryption_customer_algorithm
|
563
575
|
# @return [self]
|
564
|
-
|
576
|
+
define_field(:server_side_encryption_customer_key) do |value|
|
565
577
|
field_name = 'x-amz-server-side-encryption-customer-key'
|
566
578
|
with(field_name, base64(value))
|
567
579
|
with(field_name + '-MD5', base64(OpenSSL::Digest::MD5.digest(value)))
|
@@ -570,7 +582,7 @@ module Aws
|
|
570
582
|
# @param [String] prefix
|
571
583
|
# @see #server_side_encryption_customer_key
|
572
584
|
# @return [self]
|
573
|
-
|
585
|
+
define_field(:server_side_encryption_customer_key_starts_with) do |prefix|
|
574
586
|
field_name = 'x-amz-server-side-encryption-customer-key'
|
575
587
|
starts_with(field_name, prefix)
|
576
588
|
end
|
data/lib/aws-sdk-s3.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.112.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|
@@ -47,7 +47,7 @@ dependencies:
|
|
47
47
|
version: '3'
|
48
48
|
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 3.
|
50
|
+
version: 3.126.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: '3'
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 3.
|
60
|
+
version: 3.126.0
|
61
61
|
description: Official AWS Ruby gem for Amazon Simple Storage Service (Amazon S3).
|
62
62
|
This gem is part of the AWS SDK for Ruby.
|
63
63
|
email:
|