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
a49d2f70
Commit
a49d2f70
authored
Apr 03, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[HeadersStore] mkpath less
parent
742e7dab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
headers_store.rb
lib/cocoapods/sandbox/headers_store.rb
+6
-6
No files found.
lib/cocoapods/sandbox/headers_store.rb
View file @
a49d2f70
...
@@ -54,7 +54,7 @@ module Pod
...
@@ -54,7 +54,7 @@ module Pod
return
@search_paths_cache
[
key
]
if
@search_paths_cache
.
key?
(
key
)
return
@search_paths_cache
[
key
]
if
@search_paths_cache
.
key?
(
key
)
search_paths
=
@search_paths
.
select
do
|
entry
|
search_paths
=
@search_paths
.
select
do
|
entry
|
matches_platform
=
entry
[
:platform
]
==
platform
.
name
matches_platform
=
entry
[
:platform
]
==
platform
.
name
matches_target
=
target_name
.
nil?
||
(
entry
[
:path
].
basename
.
to_s
==
target_name
)
matches_target
=
target_name
.
nil?
||
(
File
.
basename
(
entry
[
:path
])
==
target_name
)
matches_platform
&&
matches_target
matches_platform
&&
matches_target
end
end
headers_dir
=
root
.
relative_path_from
(
sandbox
.
root
).
dirname
headers_dir
=
root
.
relative_path_from
(
sandbox
.
root
).
dirname
...
@@ -98,7 +98,7 @@ module Pod
...
@@ -98,7 +98,7 @@ module Pod
def
add_files
(
namespace
,
relative_header_paths
)
def
add_files
(
namespace
,
relative_header_paths
)
root
.
join
(
namespace
).
mkpath
unless
relative_header_paths
.
empty?
root
.
join
(
namespace
).
mkpath
unless
relative_header_paths
.
empty?
relative_header_paths
.
map
do
|
relative_header_path
|
relative_header_paths
.
map
do
|
relative_header_path
|
add_file
(
namespace
,
relative_header_path
)
add_file
(
namespace
,
relative_header_path
,
:mkdir
=>
false
)
end
end
end
end
...
@@ -116,9 +116,9 @@ module Pod
...
@@ -116,9 +116,9 @@ module Pod
#
#
# @return [Pathname]
# @return [Pathname]
#
#
def
add_file
(
namespace
,
relative_header_path
,
directory_made:
fals
e
)
def
add_file
(
namespace
,
relative_header_path
,
mkdir:
tru
e
)
namespaced_path
=
root
+
namespace
namespaced_path
=
root
+
namespace
namespaced_path
.
mkpath
unless
directory_made
namespaced_path
.
mkpath
if
mkdir
absolute_source
=
(
sandbox
.
root
+
relative_header_path
)
absolute_source
=
(
sandbox
.
root
+
relative_header_path
)
source
=
absolute_source
.
relative_path_from
(
namespaced_path
)
source
=
absolute_source
.
relative_path_from
(
namespaced_path
)
...
@@ -129,7 +129,7 @@ module Pod
...
@@ -129,7 +129,7 @@ module Pod
# Adds an header search path to the sandbox.
# Adds an header search path to the sandbox.
#
#
# @param [Pathname] path
# @param [Pathname] path
# the path t
h
o add.
# the path to add.
#
#
# @param [String] platform
# @param [String] platform
# the platform the search path applies to
# the platform the search path applies to
...
@@ -137,7 +137,7 @@ module Pod
...
@@ -137,7 +137,7 @@ module Pod
# @return [void]
# @return [void]
#
#
def
add_search_path
(
path
,
platform
)
def
add_search_path
(
path
,
platform
)
@search_paths
<<
{
:platform
=>
platform
.
name
,
:path
=>
(
Pathname
.
new
(
@relative_path
)
+
path
)
}
@search_paths
<<
{
:platform
=>
platform
.
name
,
:path
=>
File
.
join
(
@relative_path
,
path
)
}
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