exel-s3 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/exel/s3/s3_provider.rb +1 -1
- data/lib/exel/s3/version.rb +1 -1
- data/spec/exel/s3/s3_provider_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3879907f2ecda96df921df309cb7a3d3d60bc924
|
4
|
+
data.tar.gz: a0f2d39d90dce1de2c2786aef502e2e59baea89d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 723fe2ba34d3edd5fc7db06321f75f0aba957aac1d4a8cafb8c25a87b73a73a50c08f98ac918cc64b4a5aeee4e10db3c2c6175211b3013526eedae7687439519
|
7
|
+
data.tar.gz: 1f9fa6cacf3012f7876dcbe135189d7cb828e2a2541efe9c703c638e5a61fe4754e99f226a204e9393270aa582866da8d87434686001141ab46d7de5c4bb0333
|
data/README.md
CHANGED
data/lib/exel/s3/s3_provider.rb
CHANGED
data/lib/exel/s3/version.rb
CHANGED
@@ -5,6 +5,7 @@ module EXEL
|
|
5
5
|
EXEL.configure do |config|
|
6
6
|
config.aws = OpenStruct.new
|
7
7
|
config.s3_bucket = 'bucket'
|
8
|
+
config.s3_region = 's3-region'
|
8
9
|
end
|
9
10
|
end
|
10
11
|
|
@@ -15,6 +16,17 @@ module EXEL
|
|
15
16
|
expect(s3_obj.bucket_name).to eq('bucket')
|
16
17
|
expect(s3_obj.key).to eq(file_name)
|
17
18
|
end
|
19
|
+
|
20
|
+
it 'uses the configured s3 region' do
|
21
|
+
expect(Aws::S3::Resource).to receive(:new).with(hash_including(region: 's3-region')).and_call_original
|
22
|
+
subject.get_object('foo.txt')
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'defaults the s3 region to us-east-1' do
|
26
|
+
allow(EXEL.configuration).to receive(:s3_region).and_return(nil)
|
27
|
+
expect(Aws::S3::Resource).to receive(:new).with(hash_including(region: 'us-east-1')).and_call_original
|
28
|
+
subject.get_object('foo.txt')
|
29
|
+
end
|
18
30
|
end
|
19
31
|
|
20
32
|
describe '#upload' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: exel-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yroo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: exel
|