borrower 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/borrower/manifest.rb +1 -1
- data/lib/borrower/version.rb +1 -1
- data/spec/borrower/manifest_spec.rb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07b9ba5e76513f8aa625e8d26b1cd54494091926
|
4
|
+
data.tar.gz: eb61b4d7720433d08145d461f1577e47cc42a50a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d758f0502f1d8f14fa11d2850272c1fab5d939dc60dc2ed380dfedf1d2d0d494111371136b09353e339f22e3f03409d447817ae7be05fd9b3660f549616e5eb0
|
7
|
+
data.tar.gz: 14029f4058b6a313cdd60fe3e2348cbe1184d71e138b5b440fe82cc3f0a2d3fe638363524d8198f3c9fb8ac539ed3815fef6b6bd3f29377988eb78a1e73e5661
|
data/lib/borrower/manifest.rb
CHANGED
@@ -60,7 +60,7 @@ module Borrower
|
|
60
60
|
matches = []
|
61
61
|
directories.each do |dir|
|
62
62
|
Dir[File.join( dir, '**/*' )].each do |possibility|
|
63
|
-
matches << possibility if possibility.match( file )
|
63
|
+
matches << possibility if possibility.match( Regexp.escape(file) )
|
64
64
|
end
|
65
65
|
end
|
66
66
|
path = matches.sort { |a,b| a.length <=> b.length }.first
|
data/lib/borrower/version.rb
CHANGED
@@ -6,6 +6,7 @@ describe Borrower::Manifest do
|
|
6
6
|
given_files [ "baz.txt",
|
7
7
|
"files/baz.txt",
|
8
8
|
"files/bar/baz.txt",
|
9
|
+
"files/_$bar.txt",
|
9
10
|
"files/woo.txt",
|
10
11
|
"files/foo.txt" ]
|
11
12
|
end
|
@@ -49,6 +50,7 @@ describe Borrower::Manifest do
|
|
49
50
|
Borrower.find("baz.txt").should == File.join( TMP, "baz.txt" )
|
50
51
|
Borrower.find("files/baz.txt").should == File.join( TMP, "files/baz.txt" )
|
51
52
|
Borrower.find("files/bar/baz.txt").should == File.join( TMP, "files/bar/baz.txt")
|
53
|
+
Borrower.find("files/_$bar.txt").should == File.join( TMP, "files/_$bar.txt")
|
52
54
|
Borrower.find("woo.txt").should == File.join( TMP, "files/woo.txt" )
|
53
55
|
Borrower.find("foo.txt").should == File.join( TMP, "files/foo.txt" )
|
54
56
|
end
|