aws-sdk-s3 1.88.1 → 1.88.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-s3.rb +1 -1
- data/lib/aws-sdk-s3/client.rb +1 -1
- data/lib/aws-sdk-s3/customizations/bucket.rb +8 -3
- data/lib/aws-sdk-s3/customizations/object.rb +9 -3
- data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +3 -2
- data/lib/aws-sdk-s3/presigner.rb +1 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e0ae9f5b3f0423324bd6e52d20f902ccf110612a2f1c96d8496700e8cb48e96
|
4
|
+
data.tar.gz: 99213d2888efcdf3085a7760c34f9d9d678b7bb1079b563f5d3697c4c92358cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a17d2fdc60536257cae9473eaaa516cf4f4393bd8bdbe9154370c76cd9fd2da3826a1e7102483ecf4514c4ab878e4a20d372e852c0c8b368bdeb146a84cfffc
|
7
|
+
data.tar.gz: d7f291657ba92d1d8c0eabaaa25296df9018a72531d48c9b365e79b629e5d2766cacafa7f1ab0bd6872f3cad2dfed748ab2efceacd5f885b8f7d61eb1f6114fc
|
data/lib/aws-sdk-s3.rb
CHANGED
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -13566,7 +13566,7 @@ module Aws::S3
|
|
13566
13566
|
params: params,
|
13567
13567
|
config: config)
|
13568
13568
|
context[:gem_name] = 'aws-sdk-s3'
|
13569
|
-
context[:gem_version] = '1.88.
|
13569
|
+
context[:gem_version] = '1.88.2'
|
13570
13570
|
Seahorse::Client::Request.new(handlers, context)
|
13571
13571
|
end
|
13572
13572
|
|
@@ -88,18 +88,23 @@ module Aws
|
|
88
88
|
# You can pass `virtual_host: true` to use the bucket name as the
|
89
89
|
# host name.
|
90
90
|
#
|
91
|
-
# bucket = s3.bucket('my
|
91
|
+
# bucket = s3.bucket('my-bucket.com')
|
92
92
|
# bucket.url(virtual_host: true)
|
93
|
-
# #=> "http://my
|
93
|
+
# #=> "http://my-bucket.com"
|
94
94
|
#
|
95
95
|
# @option options [Boolean] :virtual_host (false) When `true`,
|
96
96
|
# the bucket name will be used as the host name. This is useful
|
97
97
|
# when you have a CNAME configured for this bucket.
|
98
98
|
#
|
99
|
+
# @option options [Boolean] :secure (true) When `false`, http
|
100
|
+
# will be used with virtual_host. This is required when
|
101
|
+
# the bucket name has a dot (.) in it.
|
102
|
+
#
|
99
103
|
# @return [String] the URL for this bucket.
|
100
104
|
def url(options = {})
|
101
105
|
if options[:virtual_host]
|
102
|
-
|
106
|
+
scheme = options.fetch(:secure, true) ? 'https' : 'http'
|
107
|
+
"#{scheme}://#{name}"
|
103
108
|
elsif @arn
|
104
109
|
Plugins::ARN.resolve_url!(
|
105
110
|
client.config.endpoint.dup,
|
@@ -201,16 +201,22 @@ module Aws
|
|
201
201
|
# s3.bucket('bucket-name').object('obj-key').public_url
|
202
202
|
# #=> "https://bucket-name.s3.amazonaws.com/obj-key"
|
203
203
|
#
|
204
|
-
# To use virtual hosted bucket url
|
204
|
+
# To use virtual hosted bucket url.
|
205
|
+
# Uses https unless secure: false is set. If the bucket
|
206
|
+
# name contains dots (.) then you will need to set secure: false.
|
205
207
|
#
|
206
|
-
# s3.bucket('my
|
208
|
+
# s3.bucket('my-bucket.com').object('key')
|
207
209
|
# .public_url(virtual_host: true)
|
208
|
-
# #=> "
|
210
|
+
# #=> "https://my-bucket.com/key"
|
209
211
|
#
|
210
212
|
# @option options [Boolean] :virtual_host (false) When `true`, the bucket
|
211
213
|
# name will be used as the host name. This is useful when you have
|
212
214
|
# a CNAME configured for the bucket.
|
213
215
|
#
|
216
|
+
# @option options [Boolean] :secure (true) When `false`, http
|
217
|
+
# will be used with virtual_host. This is required when
|
218
|
+
# the bucket name has a dot (.) in it.
|
219
|
+
#
|
214
220
|
# @return [String]
|
215
221
|
def public_url(options = {})
|
216
222
|
url = URI.parse(bucket.url(options))
|
@@ -17,7 +17,8 @@ region. Defaults to `legacy` mode using global endpoint.
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def add_handlers(handlers, config)
|
20
|
-
|
20
|
+
# only modify non-custom endpoints
|
21
|
+
if config.regional_endpoint && config.region == 'us-east-1'
|
21
22
|
handlers.add(Handler)
|
22
23
|
end
|
23
24
|
end
|
@@ -29,7 +30,7 @@ region. Defaults to `legacy` mode using global endpoint.
|
|
29
30
|
# keep legacy global endpoint pattern by default
|
30
31
|
if context.config.s3_us_east_1_regional_endpoint == 'legacy'
|
31
32
|
host = context.http_request.endpoint.host
|
32
|
-
# if it's an ARN
|
33
|
+
# if it's an ARN then don't touch the endpoint at all
|
33
34
|
unless context.metadata[:s3_arn]
|
34
35
|
legacy_host = IADRegionalEndpoint.legacy_host(host)
|
35
36
|
context.http_request.endpoint.host = legacy_host
|
data/lib/aws-sdk-s3/presigner.rb
CHANGED
@@ -58,8 +58,7 @@ module Aws
|
|
58
58
|
# is returned instead of the default HTTPS URL.
|
59
59
|
#
|
60
60
|
# @option params [Boolean] :virtual_host (false) When `true`, the
|
61
|
-
# bucket name will be used as the hostname.
|
62
|
-
# the returned URL to be 'http' and not 'https'.
|
61
|
+
# bucket name will be used as the hostname.
|
63
62
|
#
|
64
63
|
# @option params [Boolean] :use_accelerate_endpoint (false) When `true`,
|
65
64
|
# Presigner will attempt to use accelerated endpoint.
|
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.88.
|
4
|
+
version: 1.88.2
|
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: 2021-02-
|
11
|
+
date: 2021-02-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-kms
|