adamh-glob_fu 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/VERSION +1 -1
- data/glob_fu.gemspec +1 -1
- data/lib/glob_fu.rb +3 -5
- data/spec/glob_fu_spec.rb +5 -0
- metadata +1 -1
data/README.rdoc
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/glob_fu.gemspec
CHANGED
data/lib/glob_fu.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
module GlobFu
|
2
2
|
class << self
|
3
3
|
def find(*args, &block)
|
4
|
-
options =
|
5
|
-
|
6
|
-
|
7
|
-
{}
|
8
|
-
end
|
4
|
+
options = (Hash === args.last) ? args.pop : {}
|
5
|
+
args = args.first if Array === args.first
|
6
|
+
|
9
7
|
results = do_find(args, options)
|
10
8
|
|
11
9
|
if block
|
data/spec/glob_fu_spec.rb
CHANGED
@@ -48,6 +48,11 @@ describe(GlobFu) do
|
|
48
48
|
f('x', 'y', :root => prefix).should == ["#{prefix}/x", "#{prefix}/y"]
|
49
49
|
end
|
50
50
|
|
51
|
+
it('should allow Array argument') do
|
52
|
+
fs('x', 'y')
|
53
|
+
f(['x', 'y'], :root => prefix).should == ["#{prefix}/x", "#{prefix}/y"]
|
54
|
+
end
|
55
|
+
|
51
56
|
it('should remove duplicates') do
|
52
57
|
fs('x')
|
53
58
|
f('x', 'x', :root => prefix).should == ["#{prefix}/x"]
|