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
3f5f1952
Commit
3f5f1952
authored
Mar 19, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PathList] Wait to resolve symlinks until checking header ACL
parent
94bc8557
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
6 deletions
+26
-6
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+2
-2
path_list.rb
lib/cocoapods/sandbox/path_list.rb
+1
-1
path_list_spec.rb
spec/unit/sandbox/path_list_spec.rb
+23
-3
No files found.
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
3f5f1952
...
@@ -182,8 +182,8 @@ module Pod
...
@@ -182,8 +182,8 @@ module Pod
native_target
=
target
.
native_target_for_spec
(
consumer
.
spec
)
native_target
=
target
.
native_target_for_spec
(
consumer
.
spec
)
headers
=
file_accessor
.
headers
headers
=
file_accessor
.
headers
public_headers
=
file_accessor
.
public_headers
public_headers
=
file_accessor
.
public_headers
.
map
(
&
:realpath
)
private_headers
=
file_accessor
.
private_headers
private_headers
=
file_accessor
.
private_headers
.
map
(
&
:realpath
)
other_source_files
=
file_accessor
.
source_files
.
reject
{
|
sf
|
SOURCE_FILE_EXTENSIONS
.
include?
(
sf
.
extname
)
}
other_source_files
=
file_accessor
.
source_files
.
reject
{
|
sf
|
SOURCE_FILE_EXTENSIONS
.
include?
(
sf
.
extname
)
}
{
{
...
...
lib/cocoapods/sandbox/path_list.rb
View file @
3f5f1952
...
@@ -88,7 +88,7 @@ module Pod
...
@@ -88,7 +88,7 @@ module Pod
# @return [Array<Pathname>]
# @return [Array<Pathname>]
#
#
def
glob
(
patterns
,
options
=
{})
def
glob
(
patterns
,
options
=
{})
relative_glob
(
patterns
,
options
).
map
{
|
p
|
(
root
+
p
).
realpath
}
relative_glob
(
patterns
,
options
).
map
{
|
p
|
root
.
join
(
p
)
}
end
end
# The list of relative paths that are case insensitively matched by a
# The list of relative paths that are case insensitively matched by a
...
...
spec/unit/sandbox/path_list_spec.rb
View file @
3f5f1952
...
@@ -192,6 +192,13 @@ module Pod
...
@@ -192,6 +192,13 @@ module Pod
Resources/sub_dir
Resources/sub_dir
)
)
end
end
it
'can glob for exact matches'
do
paths
=
@path_list
.
relative_glob
(
'libBananalib.a'
).
map
(
&
:to_s
)
paths
.
sort
.
should
==
%w(
libBananalib.a
)
end
end
end
describe
'Reading file system'
do
describe
'Reading file system'
do
...
@@ -291,14 +298,27 @@ module Pod
...
@@ -291,14 +298,27 @@ module Pod
@path_list
.
instance_variable_set
(
:@files
,
nil
)
@path_list
.
instance_variable_set
(
:@files
,
nil
)
File
.
symlink
(
@tmpfile
,
@symlink_file
)
File
.
symlink
(
@tmpfile
,
@symlink_file
)
@path_list
.
files
.
map
(
&
:to_s
).
include?
(
'Classes/symlinked.h'
).
should
==
true
@path_list
.
files
.
map
(
&
:to_s
).
should
.
include?
(
'Classes/symlinked.h'
)
end
it
'includes symlinked file with a different basename'
do
orange_h
=
@path_list
.
root
.
join
(
'Classes'
,
'Orange.h'
)
File
.
symlink
(
'Banana.h'
,
orange_h
)
begin
@path_list
.
glob
(
'Classes/Orange.h'
).
should
==
[
orange_h
,
]
ensure
FileUtils
.
remove_entry
(
orange_h
)
end
end
end
it
'includes symlinked dir'
do
it
'includes symlinked dir'
do
@path_list
.
instance_variable_set
(
:@dirs
,
nil
)
@path_list
.
instance_variable_set
(
:@dirs
,
nil
)
File
.
symlink
(
@tmpdir
,
@symlink_dir
)
File
.
symlink
(
@tmpdir
,
@symlink_dir
)
@path_list
.
dirs
.
map
(
&
:to_s
).
include?
(
'Classes/symlinked'
).
should
==
true
@path_list
.
dirs
.
map
(
&
:to_s
).
should
.
include?
(
'Classes/symlinked'
)
end
end
it
'doesn\'t include file in symlinked dir'
do
it
'doesn\'t include file in symlinked dir'
do
...
@@ -306,7 +326,7 @@ module Pod
...
@@ -306,7 +326,7 @@ module Pod
@path_list
.
instance_variable_set
(
:@dirs
,
nil
)
@path_list
.
instance_variable_set
(
:@dirs
,
nil
)
File
.
symlink
(
@tmpdir
,
@symlink_dir
)
File
.
symlink
(
@tmpdir
,
@symlink_dir
)
@path_list
.
files
.
map
(
&
:to_s
).
include?
(
'Classes/symlinked/someheader.h'
).
should
==
false
@path_list
.
files
.
map
(
&
:to_s
).
should
.
not
.
include?
(
'Classes/symlinked/someheader.h'
)
end
end
end
end
...
...
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