bfs 0.3.3 → 0.3.4

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: 7ed077904a46a574dd780eaa9ce2ca804ebe4a11eac9b744dff1389bd9a34169
4
- data.tar.gz: 1ae5d64274163768624e28b6d7cd5cba63b2237dffbd88dc8c481a0515c7b353
3
+ metadata.gz: 60793d9538520eb8e44c4ca690b97a509592302bf2b0bb67d38157fe2195d8a9
4
+ data.tar.gz: 7b4e832d8903e62c89dba05e9721e12fe0d25b3c8d17c4f8d88961a87e76bf53
5
5
  SHA512:
6
- metadata.gz: 1d60da76feb312e7bef9c0d796e33e9161830ce59ef9a5f60bb2d3e5a697b7d3a55b6820ebc5defe8601b5c34db2ee19850f6998195ea8088f9e3fb1dafa69a6
7
- data.tar.gz: 151543a8a0f1b48ce925c261a580b06960db41ceab7f3fd83cac8ad9479fa7ffa0d29338eb6b2518cf9110bba52afaf80830451b843e3ad2f337d53271fe75f7
6
+ metadata.gz: aecbb03ec48f8ab329dcfdf3e2969bd66e4c7a3463a77a58a3779e186d6470577656f1ed883f815b7658d22271e491830df3e32f60a92012ee9e63fbd8a9bb7c
7
+ data.tar.gz: '08ee24fcf97cfb1772975eac0f7c9ca62ed7a80461071f5f8f959344489c703623293e8a25fe6d25922eec9d1bd0b7f1c68b1635893ea22a5ce3ed0ba95b9ac1'
@@ -57,7 +57,18 @@ module BFS
57
57
  protected
58
58
 
59
59
  def norm_path(path)
60
- BFS.norm_path(path)
60
+ BFS.norm_path(path) if path
61
+ end
62
+
63
+ def full_path(path)
64
+ path = norm_path(path)
65
+ path = File.join(@prefix, path) if @prefix
66
+ path
67
+ end
68
+
69
+ def trim_prefix(path)
70
+ path.slice!(0, @prefix.size) if @prefix && path.slice(0, @prefix.size) == @prefix
71
+ path
61
72
  end
62
73
  end
63
74
  end
data/lib/bfs/bucket/fs.rb CHANGED
@@ -78,13 +78,6 @@ module BFS
78
78
  rescue Errno::ENOENT
79
79
  raise BFS::FileNotFound, norm_path(src)
80
80
  end
81
-
82
- private
83
-
84
- def trim_prefix(path)
85
- path.slice!(0, @prefix.size) if path.slice(0, @prefix.size) == @prefix
86
- path
87
- end
88
81
  end
89
82
  end
90
83
  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.3
4
+ version: 0.3.4
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-26 00:00:00.000000000 Z
11
+ date: 2018-11-28 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.7
51
+ rubygems_version: 2.7.6
52
52
  signing_key:
53
53
  specification_version: 4
54
54
  summary: Multi-platform cloud bucket adapter