Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
848f0e5e
Commit
848f0e5e
authored
Apr 02, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PathList] Expand excluded folders
parent
4c521752
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
path_list.rb
lib/cocoapods/sandbox/path_list.rb
+4
-1
path_list_spec.rb
spec/unit/sandbox/path_list_spec.rb
+5
-0
No files found.
lib/cocoapods/sandbox/path_list.rb
View file @
848f0e5e
...
@@ -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
...
...
spec/unit/sandbox/path_list_spec.rb
View file @
848f0e5e
...
@@ -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[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment