bfs-s3 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bfs/bucket/s3.rb +5 -0
- data/spec/bfs/bucket/s3_spec.rb +2 -2
- 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: eaa1ea1fe4992c8906df21de648b99f938a9c214be07566dbc6163c15b94cbf2
|
4
|
+
data.tar.gz: e8703b5f3a586124995f81de0fbca1cd1d19abbe5c2f37623f19d1b40d67667c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74a9b4b41efc8d9123e620fcf350539f8662b4d0bd58cff6cf441744c264a879e03f1b2fde6993c85f0c11363d52509a70a5e2ed5075ca5a48297bdb8e32cff1
|
7
|
+
data.tar.gz: 01f28fc9cd26b31dd239511e22e9fef436df1fd8fed467780cb50d6f2870f1bd9740f05ebcaca396c9766b73d084762ad9015eea9022ab04eb4fe2a38380f0ce
|
data/lib/bfs/bucket/s3.rb
CHANGED
@@ -144,6 +144,11 @@ module BFS
|
|
144
144
|
config[:credentials] = opts[:credentials] if opts[:credentials]
|
145
145
|
config[:credentials] ||= Aws::Credentials.new(opts[:access_key_id].to_s, opts[:secret_access_key].to_s) if opts[:access_key_id]
|
146
146
|
config[:credentials] ||= Aws::SharedCredentials.new(profile_name: opts[:profile_name]) if opts[:profile_name]
|
147
|
+
config[:credentials] = Aws::AssumeRoleCredentials.new(
|
148
|
+
client: Aws::STS::Client.new(credentials: config[:credentials]),
|
149
|
+
role_arn: opts[:assume_role],
|
150
|
+
role_session_name: "#{opts[:assume_role]}_#{SecureRandom.urlsafe_base64(12)}",
|
151
|
+
) if opts[:assume_role]
|
147
152
|
|
148
153
|
Aws::S3::Client.new(config)
|
149
154
|
end
|
data/spec/bfs/bucket/s3_spec.rb
CHANGED
@@ -9,8 +9,8 @@ RSpec.describe BFS::Bucket::S3, s3: true do
|
|
9
9
|
|
10
10
|
let(:prefix) { "x/#{SecureRandom.uuid}/" }
|
11
11
|
|
12
|
-
after
|
13
|
-
bucket = described_class.new bucket_name, prefix:
|
12
|
+
after do
|
13
|
+
bucket = described_class.new bucket_name, prefix: prefix
|
14
14
|
bucket.ls.each {|name| bucket.rm(name) }
|
15
15
|
end
|
16
16
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bfs-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dimitrij Denissenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.8.
|
33
|
+
version: 0.8.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.8.
|
40
|
+
version: 0.8.2
|
41
41
|
description: https://github.com/bsm/bfs.rb
|
42
42
|
email: dimitrij@blacksquaremedia.com
|
43
43
|
executables: []
|