dshelf 0.2.12 → 0.2.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dshelf.rb +5 -5
  2. metadata +2 -2
data/lib/dshelf.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module DistributedShelf
2
- VERSION = '0.2.12'
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].each do |distributed_path|
40
- @@config[:distributed_path] == Regexp.new('^' + distributed_path + '/')
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] + '/')
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 12
9
- version: 0.2.12
8
+ - 13
9
+ version: 0.2.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - Phil Pirozhkov