bfs 0.3.5 → 0.3.6

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: dcc80017cab3be7698bac043867df6a4ac38e7b4a614790fcb4c34e7a656c922
4
- data.tar.gz: f621419b7b074c3b096d146dc9c9f258377c0d482186167cabebe2bcba8c160c
3
+ metadata.gz: 56981d0590fb3f90c1dfa56dd3c98f7ae762855dbad9dc6f6d687fda4e08ab37
4
+ data.tar.gz: 45c5c0f59d5a5d24dadf62d551047e9e4a9f75e7d94c609a9daf11f75503512c
5
5
  SHA512:
6
- metadata.gz: c03571fce05152b2560767d1d35dc61464632eb555ad6c60386132e2dc5984d2ee6f33dfe258231374d44312fb6b523875263ea309a566bce8fe6f99f97eefe2
7
- data.tar.gz: 354e6ede4a9d1dad592c88dd5211d824766104e71ccfcfaa1d4fd79ca95c2c9b28c5544c866e9e199cccb0acaac30df7d365fb3c06260c09de90bd2f25f10b59
6
+ metadata.gz: 7fee255b2c6024ee0152de273e93d24cb949345dc73c889e37977873729428208680e31e5c1aa38512828dc186305c7c1ca419af0759d91fe3f76442f4aafe67
7
+ data.tar.gz: 35b8b19811e74576b6881dd0c349768035044e55821b6d626f89537a6a49e87ac3a5d37a5e660dfad34404a8a8923eb76a78c427f29d32a999edf878f6ede9f9
data/lib/bfs.rb CHANGED
@@ -3,9 +3,11 @@ require 'uri'
3
3
  module BFS
4
4
  FileInfo = Struct.new(:path, :size, :mtime, :content_type, :metadata)
5
5
 
6
- def self.register(scheme, &resolver)
6
+ def self.register(*schemes, &resolver)
7
7
  @registry ||= {}
8
- @registry[scheme] = resolver
8
+ schemes.each do |scheme|
9
+ @registry[scheme] = resolver
10
+ end
9
11
  end
10
12
 
11
13
  def self.resolve(url)
@@ -54,6 +54,9 @@ module BFS
54
54
  rm(src)
55
55
  end
56
56
 
57
+ # Closes the underlying connection
58
+ def close; end
59
+
57
60
  protected
58
61
 
59
62
  def norm_path(path)
@@ -48,7 +48,7 @@ module BFS
48
48
  def open(path, opts={}, &block)
49
49
  path = norm_path(path)
50
50
  full = @root.join(path)
51
- full.open('r', opts, &block)
51
+ full.open('rb', opts, &block)
52
52
  rescue Errno::ENOENT
53
53
  raise BFS::FileNotFound, path
54
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bfs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitrij Denissenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-30 00:00:00.000000000 Z
11
+ date: 2018-12-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Minimalist abstraction for bucket storage
14
14
  email: dimitrij@blacksquaremedia.com
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  version: '0'
49
49
  requirements: []
50
50
  rubyforge_project:
51
- rubygems_version: 2.7.6
51
+ rubygems_version: 2.7.7
52
52
  signing_key:
53
53
  specification_version: 4
54
54
  summary: Multi-platform cloud bucket adapter