blobstore_client 1.3160.0 → 1.3163.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/blobstore_client/s3_blobstore_client.rb +13 -5
- data/lib/blobstore_client/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcc0dc95c543abb0a4bf9a8f88286162db604d51
|
4
|
+
data.tar.gz: a310c24ace25aac2be5221556bfc93c78c9d70c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 280d42e2e5a3dac0cded2c7b8917becdb5f53eb88be7b7f5291d196533437924214b2aec3e2eed0d9e24543ba9f12e91499d226b5f113f0de373f9b0252cc20e
|
7
|
+
data.tar.gz: 191fdb0e46cb7f41ad7790cc0867b50b96cff16af6d446147cf9935e549726a749958896253cd184af7d81913c636bfd4906e29a53165cc26be55ea5cb558d14
|
@@ -37,7 +37,8 @@ module Bosh
|
|
37
37
|
ssl_verify_peer: @options.fetch(:ssl_verify_peer, true),
|
38
38
|
credentials_source: @options.fetch(:credentials_source, 'static'),
|
39
39
|
access_key_id: @options[:access_key_id],
|
40
|
-
secret_access_key: @options[:secret_access_key]
|
40
|
+
secret_access_key: @options[:secret_access_key],
|
41
|
+
signature_version: @options[:signature_version]
|
41
42
|
})
|
42
43
|
|
43
44
|
# using S3 without credentials is a special case:
|
@@ -143,9 +144,16 @@ module Bosh
|
|
143
144
|
@options[:folder] ? @options[:folder] + '/' + object_id : object_id
|
144
145
|
end
|
145
146
|
|
146
|
-
def use_v4_signing?(
|
147
|
-
|
148
|
-
|
147
|
+
def use_v4_signing?(options)
|
148
|
+
case options[:signature_version]
|
149
|
+
when '4'
|
150
|
+
true
|
151
|
+
when '2'
|
152
|
+
false
|
153
|
+
else
|
154
|
+
region = options[:region]
|
155
|
+
(region == 'eu-central-1' || region == 'cn-north-1')
|
156
|
+
end
|
149
157
|
end
|
150
158
|
|
151
159
|
def aws_credentials(credentials_source, access_key_id, secret_access_key)
|
@@ -185,7 +193,7 @@ module Bosh
|
|
185
193
|
aws_options[:region] = BLANK_REGION
|
186
194
|
end
|
187
195
|
|
188
|
-
aws_options[:signature_version] = 's3' unless use_v4_signing?(options
|
196
|
+
aws_options[:signature_version] = 's3' unless use_v4_signing?(options)
|
189
197
|
|
190
198
|
creds = aws_credentials(options[:credentials_source], options[:access_key_id], options[:secret_access_key])
|
191
199
|
aws_options.merge!(creds)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blobstore_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3163.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VMware
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-resources
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.3163.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.3163.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|