Commit 848f0e5e authored by Fabio Pelosin's avatar Fabio Pelosin

[PathList] Expand excluded folders

parent 4c521752
...@@ -112,7 +112,10 @@ module Pod ...@@ -112,7 +112,10 @@ module Pod
end.flatten end.flatten
list = list.map { |path| Pathname.new(path) } list = list.map { |path| Pathname.new(path) }
list -= relative_glob(exclude_patterns) if exclude_patterns if exclude_patterns
exclude_options = { :dir_pattern => '**/*', :include_dirs => include_dirs }
list -= relative_glob(exclude_patterns, exclude_options)
end
list list
end end
......
...@@ -106,6 +106,11 @@ module Pod ...@@ -106,6 +106,11 @@ module Pod
] ]
end end
it "allows to specify folders in the exclude patterns" do
paths = @path_list.relative_glob('Classes/*', { :exclude_patterns => 'Classes' }).map(&:to_s)
paths.sort.should.be.empty
end
it "can optionally include the directories in the results" do it "can optionally include the directories in the results" do
paths = @path_list.relative_glob('Resources/*', { :include_dirs => true }).map(&:to_s) paths = @path_list.relative_glob('Resources/*', { :include_dirs => true }).map(&:to_s)
paths.sort.should == %w[ paths.sort.should == %w[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment