bfs-gs 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/gs.rb +10 -7
  3. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2d89afa0f45efa9b6fd19cc525754cc52dd0860df44c1ca042371df28c1f75a
4
- data.tar.gz: b5ec4ef496facbc6f062c81017ed0ed35f0a06f7e512b5a657688130bed041a7
3
+ metadata.gz: 0205b7e3e0a0657a5573c76e214761e8cb094370a9ec9f2e438a917cac121ea7
4
+ data.tar.gz: 73482e997b5d16fdbc0e18fbf3c40aa70316d41a0540aafd1e04f7be7cdf4742
5
5
  SHA512:
6
- metadata.gz: 1c7c2c221cb15b740721a1224a73ffb1203fefd0431253f8b07e12cec454aa8d1b8806381bbe5036ee607fdc582f43ab98a862471ac3c37e76dcb7cad79ab9c1
7
- data.tar.gz: a8f78a4813033d7ebe7cb244ae68a3424aadbf251d845f909614325e35931bf85816a4e3aceffdf51e8520e9023aa0fbb1528a46a18801f9335b71ae16864de0
6
+ metadata.gz: 62bfd2c665b53f6ba4cd9e80a57d8014337a771cae1b1bc129e720959163f9c99de6b881e3bbe8e4aa4e9075d4db40bd29fc414387519f66255271b89a16d12e
7
+ data.tar.gz: 5f1c3741bf46866c0917b908f7cc778087a9e97a04003dbade21f9e5e8e5d51f740cbc30b570a6f3112b91b606741b353f75dad1da40af289bc8de979b0668e8
@@ -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
  opts = opts.merge(prefix: prefix) if prefix
39
39
 
@@ -105,12 +105,15 @@ module BFS
105
105
  end
106
106
  end
107
107
 
108
- BFS.register('gs') do |url, opts|
108
+ BFS.register('gs') do |url, opts, block|
109
109
  prefix = BFS.norm_path(opts.key?(:prefix) ? opts[:prefix] : url.path)
110
110
  prefix = nil if prefix.empty?
111
-
112
- BFS::Bucket::GS.new url.host, **opts.slice(:project_id, :credentials, :acl),
113
- prefix: prefix,
114
- timeout: opts.key?(:timeout) ? opts[:timeout].to_i : nil,
115
- retries: opts.key?(:retries) ? opts[:retries].to_i : nil
111
+ opts = opts.slice(:project_id, :credentials, :acl)
112
+ extra = {
113
+ prefix: prefix,
114
+ timeout: opts.key?(:timeout) ? opts[:timeout].to_i : nil,
115
+ retries: opts.key?(:retries) ? opts[:retries].to_i : nil,
116
+ }
117
+
118
+ BFS::Bucket::GS.open url.host, **opts, **extra, &block
116
119
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bfs-gs
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: bfs
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.0
19
+ version: 0.7.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.0
26
+ version: 0.7.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: google-cloud-storage
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -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: GS bucket adapter for bfs