dshelf 0.2.12 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dshelf.rb +5 -5
- metadata +2 -2
data/lib/dshelf.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module DistributedShelf
|
2
|
-
VERSION = '0.2.
|
2
|
+
VERSION = '0.2.13'
|
3
3
|
|
4
4
|
@@config = {}
|
5
5
|
|
@@ -14,10 +14,10 @@ module DistributedShelf
|
|
14
14
|
return false unless @@config[:distributed_path]
|
15
15
|
if @@config[:distributed_path].respond_to? :each then
|
16
16
|
@@config[:distributed_path].each do |distributed_path|
|
17
|
-
return true unless File.expand_path(file).match(distributed_path).nil?
|
17
|
+
return true unless (File.expand_path(file) + '/').match(distributed_path).nil?
|
18
18
|
end
|
19
19
|
else
|
20
|
-
return !File.expand_path(file).match(@@config[:distributed_path]).nil?
|
20
|
+
return !File.expand_path(file + '/').match(@@config[:distributed_path]).nil?
|
21
21
|
end
|
22
22
|
false
|
23
23
|
end
|
@@ -36,8 +36,8 @@ module DistributedShelf
|
|
36
36
|
def self.config= conf
|
37
37
|
@@config = conf
|
38
38
|
if @@config[:distributed_path].respond_to? :each then
|
39
|
-
@@config[:distributed_path].
|
40
|
-
|
39
|
+
@@config[:distributed_path].map! do |distributed_path|
|
40
|
+
Regexp.new('^' + distributed_path + '/')
|
41
41
|
end
|
42
42
|
else
|
43
43
|
@@config[:distributed_path] == Regexp.new('^' + @@config[:distributed_path] + '/')
|