serverless_redirector 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c64dac3aefe5c9647aaf7ab969af38b2ce3b7a10
4
- data.tar.gz: 2f3fffa8a113a5291712efa8cc733106f3fc6204
3
+ metadata.gz: e27b96243c603289eb46266122207a19c29554d6
4
+ data.tar.gz: 61edd08f58d9b112c1d0a27ce73c93bd88c96408
5
5
  SHA512:
6
- metadata.gz: be4b8fbc4f28a21b8909d4479f2f91d55cc45fbe22dd9a9a343b1eab0ab6a05443d17a27c742328c25bd5dc3e988c54da0321fc070e92a0ac1f32923d83edd29
7
- data.tar.gz: b65a9da86edc6fbe884dcb3893d2b0e48bd849807bd5f3c99c35a96fc86296607da2074c813bbecc998b8c5c5f5f01c28b67ad89c9373b822c5cf7d5ac877e9b
6
+ metadata.gz: 96605f200de8607cf5c019dc9e69b8f782e639a95bae3139ea2bdd591b54f8293936b8257cb596b7f2a0e8dd6619a2a4a8511074f55e93cd2ffe2cd96565b6a3
7
+ data.tar.gz: 556e2fa1603bc3b7c13194fb94f294df9288d2658a1a67a267311f5aa47e77540e16884d810cd718465491c6e474f487dc9744353ad19a768258b139988bd9c0
@@ -98,7 +98,10 @@ module ServerlessRedirector
98
98
 
99
99
  def bucket
100
100
  @bucket ||= begin
101
- resource = Aws::S3::Resource.new
101
+ client = Aws::S3::Client.new
102
+ region = client.get_bucket_location(bucket: bucket_name).location_constraint
103
+ regional_client = Aws::S3::Client.new(region: region)
104
+ resource = Aws::S3::Resource.new(client: regional_client)
102
105
  resource.bucket bucket_name
103
106
  end
104
107
  end
@@ -1,3 +1,3 @@
1
1
  module ServerlessRedirector
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serverless_redirector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darcy Laycock
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-16 00:00:00.000000000 Z
11
+ date: 2017-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler