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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 91e105f0932ff1ef23c5b5214e05a714ac6ce564d3a93e55225f524d495fd4e2
4
- data.tar.gz: f2152ef353747b86e661f69c1d1100e6f14f2d38b0498e9cea9d1f1877ec8612
3
+ metadata.gz: eaa1ea1fe4992c8906df21de648b99f938a9c214be07566dbc6163c15b94cbf2
4
+ data.tar.gz: e8703b5f3a586124995f81de0fbca1cd1d19abbe5c2f37623f19d1b40d67667c
5
5
  SHA512:
6
- metadata.gz: 45573ff60184d0c190061a0e241c10b80233db9f0ec184317500eaea59a735f1d48ef6cbce5ea53608250305e98132e2c964b95b074e9446d32a041a8dbed095
7
- data.tar.gz: f3bf20f0dcc3a5db9c770d59ef9d30e9fd305b863e6d9e698b18ac79155d30c0c9f01bf939e46bdfec3a16de611ef0816fe059655d4a31161ca4b40aa9a8efbf
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
@@ -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 :all do # rubocop:disable RSpec/BeforeAfterAll
13
- bucket = described_class.new bucket_name, prefix: 'x/'
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.1
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-02-04 00:00:00.000000000 Z
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.1
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.1
40
+ version: 0.8.2
41
41
  description: https://github.com/bsm/bfs.rb
42
42
  email: dimitrij@blacksquaremedia.com
43
43
  executables: []