bfs-s3 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bfs/bucket/s3.rb +5 -4
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1e2a56db1b3250b2054d01e38788642c887f4c747c17570b49e0c5efed3e28e2
4
- data.tar.gz: 43462a7a5cb5b7d1eb86a45422f1f4ed2d2dab5409309a39be859d02027c4a39
3
+ metadata.gz: e49f967d04b05a36711b1c2b858347af451e6c6aa9690739c524b21249137aee
4
+ data.tar.gz: dfe6415867f0e4af1a8b2106123972aa12f3531729b65bf0806081076cd1b903
5
5
  SHA512:
6
- metadata.gz: 72798b2b002302d858556669318977a4b74ea32a7c76fd703e1cb368e0b3f426150d6eb760f7fe77f59e34c36db7d3ce36d45b4a72198c7dd8a1b21b4fa32277
7
- data.tar.gz: f9a7376141e5aaab374ac62887245a7458e04de47d9208222559b6b041a28e965cc18d7dd81ee3128f39b748515511ab40ae4b5e48ed6c1aa1d5a1d5503342bf
6
+ metadata.gz: f29025c22ba7bb6bb72c0a7c517da339de233964ced69e6aae02dba86f2a69a54d80a6eb7d3915808b303159c6a864fe498703583932de1368314458ef414b4e
7
+ data.tar.gz: 4fd3e4ebac13f4f7f21698f8e193e977319c906902d1510e6879fdae74eecc51c41cfe3f7b1d24994511d1a8beaa2484fadde2d145a5e332c80508d3749412f2
@@ -33,7 +33,7 @@ module BFS
33
33
 
34
34
  # Lists the contents of a bucket using a glob pattern
35
35
  def ls(pattern = '**/*', **opts)
36
- prefix = pattern[%r{^[^\*\?\{\}\[\]]+/}]
36
+ prefix = pattern[%r{^[^*?\{\}\[\]]+/}]
37
37
  prefix = File.join(*[@prefix, prefix].compact) if @prefix
38
38
 
39
39
  opts = opts.merge(bucket: name, prefix: @prefix)
@@ -126,7 +126,7 @@ module BFS
126
126
  key: path,
127
127
  )
128
128
  @client.delete_object(**opts)
129
- rescue Aws::S3::Errors::NoSuchKey, Aws::S3::Errors::NoSuchBucket, Aws::S3::Errors::NotFound
129
+ rescue Aws::S3::Errors::NoSuchKey, Aws::S3::Errors::NoSuchBucket, Aws::S3::Errors::NotFound # rubocop:disable Lint/SuppressedException
130
130
  end
131
131
 
132
132
  # Copies a file.
@@ -158,9 +158,10 @@ module BFS
158
158
  end
159
159
  end
160
160
 
161
- BFS.register('s3') do |url, opts|
161
+ BFS.register('s3') do |url, opts, block|
162
162
  prefix = BFS.norm_path(opts[:prefix] || url.path)
163
163
  opts[:prefix] = prefix.empty? ? nil : prefix
164
+ opts = opts.slice(:prefix, :region, :sse, :access_key_id, :secret_access_key, :acl, :storage_class, :encoding)
164
165
 
165
- BFS::Bucket::S3.new url.host, **opts.slice(:prefix, :region, :sse, :access_key_id, :secret_access_key, :acl, :storage_class, :encoding)
166
+ BFS::Bucket::S3.open url.host, **opts, &block
166
167
  end
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.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitrij Denissenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-28 00:00:00.000000000 Z
11
+ date: 2020-07-02 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.7.0
33
+ version: 0.7.1
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.7.0
40
+ version: 0.7.1
41
41
  description: https://github.com/bsm/bfs.rb
42
42
  email: dimitrij@blacksquaremedia.com
43
43
  executables: []
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 3.1.2
70
+ rubygems_version: 3.1.4
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: S3 bucket adapter for bfs