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
337ef587
Commit
337ef587
authored
Jun 21, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[LocalPod] Sandbox header files.
parent
1f5c7f4a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
14 deletions
+38
-14
local_pod.rb
lib/cocoapods/local_pod.rb
+6
-1
sandbox.rb
lib/cocoapods/sandbox.rb
+10
-0
specification.rb
lib/cocoapods/specification.rb
+22
-13
No files found.
lib/cocoapods/local_pod.rb
View file @
337ef587
...
@@ -312,6 +312,7 @@ module Pod
...
@@ -312,6 +312,7 @@ module Pod
# @return [void] Copies the pods headers to the sandbox.
# @return [void] Copies the pods headers to the sandbox.
#
#
def
link_headers
def
link_headers
@sandbox
.
add_header_search_path
(
headers_sandbox
)
header_mappings
.
each
do
|
namespaced_path
,
files
|
header_mappings
.
each
do
|
namespaced_path
,
files
|
@sandbox
.
add_header_files
(
namespaced_path
,
files
)
@sandbox
.
add_header_files
(
namespaced_path
,
files
)
end
end
...
@@ -367,13 +368,17 @@ module Pod
...
@@ -367,13 +368,17 @@ module Pod
paths
=
paths
-
headers_excluded_from_search_paths
paths
=
paths
-
headers_excluded_from_search_paths
paths
.
each
do
|
from
|
paths
.
each
do
|
from
|
from_relative
=
from
.
relative_path_from
(
root
)
from_relative
=
from
.
relative_path_from
(
root
)
to
=
spec
.
header_dir
+
spec
.
copy_header_mapping
(
from_relative
)
to
=
headers_sandbox
+
(
spec
.
header_dir
)
+
spec
.
copy_header_mapping
(
from_relative
)
(
mappings
[
to
.
dirname
]
||=
[])
<<
from
(
mappings
[
to
.
dirname
]
||=
[])
<<
from
end
end
end
end
mappings
mappings
end
end
def
headers_sandbox
@headers_sandbox
||=
Pathname
.
new
(
top_specification
.
name
)
end
# @return [<Pathname>] The relative path of the headers that should not be
# @return [<Pathname>] The relative path of the headers that should not be
# included in the linker search paths.
# included in the linker search paths.
#
#
...
...
lib/cocoapods/sandbox.rb
View file @
337ef587
...
@@ -42,6 +42,16 @@ module Pod
...
@@ -42,6 +42,16 @@ module Pod
@header_search_paths
.
uniq
.
map
{
|
path
|
"${PODS_ROOT}/
#{
path
}
"
}
@header_search_paths
.
uniq
.
map
{
|
path
|
"${PODS_ROOT}/
#{
path
}
"
}
end
end
# Adds an header search path to the sandbox.
#
# @param path [Pathname] The path tho add.
#
# @return [void]
#
def
add_header_search_path
(
path
)
@header_search_paths
<<
Pathname
.
new
(
HEADERS_DIR
)
+
path
end
def
prepare_for_install
def
prepare_for_install
headers_root
.
rmtree
if
headers_root
.
exist?
headers_root
.
rmtree
if
headers_root
.
exist?
end
end
...
...
lib/cocoapods/specification.rb
View file @
337ef587
...
@@ -192,9 +192,6 @@ module Pod
...
@@ -192,9 +192,6 @@ module Pod
top_attr_accessor
:license
,
lambda
{
|
l
|
(
l
.
kind_of?
String
)
?
{
:
type
=>
l
}
:
l
}
top_attr_accessor
:license
,
lambda
{
|
l
|
(
l
.
kind_of?
String
)
?
{
:
type
=>
l
}
:
l
}
top_attr_accessor
:version
,
lambda
{
|
v
|
Version
.
new
(
v
)
}
top_attr_accessor
:version
,
lambda
{
|
v
|
Version
.
new
(
v
)
}
top_attr_accessor
:authors
,
lambda
{
|
a
|
parse_authors
(
a
)
}
top_attr_accessor
:authors
,
lambda
{
|
a
|
parse_authors
(
a
)
}
top_attr_accessor
:header_mappings_dir
,
lambda
{
|
file
|
Pathname
.
new
(
file
)
}
# If not provided the headers files are flattened
top_attr_accessor
:prefix_header_file
,
lambda
{
|
file
|
Pathname
.
new
(
file
)
}
top_attr_accessor
:prefix_header_contents
top_attr_reader
:description
,
lambda
{
|
instance
,
ivar
|
ivar
||
instance
.
summary
}
top_attr_reader
:description
,
lambda
{
|
instance
,
ivar
|
ivar
||
instance
.
summary
}
top_attr_writer
:description
top_attr_writer
:description
...
@@ -212,6 +209,13 @@ module Pod
...
@@ -212,6 +209,13 @@ module Pod
### Attributes **with** multiple platform support
### Attributes **with** multiple platform support
# @todo allow for subspecs
#
top_attr_accessor
:header_mappings_dir
,
lambda
{
|
file
|
Pathname
.
new
(
file
)
}
# If not provided the headers files are flattened
top_attr_accessor
:prefix_header_file
,
lambda
{
|
file
|
Pathname
.
new
(
file
)
}
top_attr_accessor
:prefix_header_contents
pltf_chained_attr_accessor
:source_files
,
lambda
{
|
value
,
current
|
pattern_list
(
value
)
}
pltf_chained_attr_accessor
:source_files
,
lambda
{
|
value
,
current
|
pattern_list
(
value
)
}
pltf_chained_attr_accessor
:resources
,
lambda
{
|
value
,
current
|
pattern_list
(
value
)
}
pltf_chained_attr_accessor
:resources
,
lambda
{
|
value
,
current
|
pattern_list
(
value
)
}
pltf_chained_attr_accessor
:preserve_paths
,
lambda
{
|
value
,
current
|
pattern_list
(
value
)
}
# Paths that should not be cleaned
pltf_chained_attr_accessor
:preserve_paths
,
lambda
{
|
value
,
current
|
pattern_list
(
value
)
}
# Paths that should not be cleaned
...
@@ -224,16 +228,27 @@ module Pod
...
@@ -224,16 +228,27 @@ module Pod
alias_method
:framework
=
,
:frameworks
=
alias_method
:framework
=
,
:frameworks
=
alias_method
:library
=
,
:libraries
=
alias_method
:library
=
,
:libraries
=
# @
return The directory to namespace the headers.
# @
!method header_dir=
#
#
# It defaults to the name of the top level specification.
# @abstract The directory where to name space the headers files of
# the specification.
#
#
platform_attr_writer
:header_dir
,
lambda
{
|
dir
,
_
|
Pathname
.
new
(
dir
)
}
# @param [String] The headers directory.
#
platform_attr_writer
:header_dir
,
lambda
{
|
dir
,
_
|
Pathname
.
new
(
dir
)
}
# @abstract (see #header_dir=)
#
# @return [Pathname] The headers directory.
#
# @note If no value is provided it returns an empty {Pathname}.
#
def
header_dir
def
header_dir
@header_dir
[
active_platform
]
||
pod_destroot_name
@header_dir
[
active_platform
]
||
(
@parent
.
header_dir
if
@parent
)
||
Pathname
.
new
(
''
)
end
end
# @!method xcconfig=
#
platform_attr_writer
:xcconfig
,
lambda
{
|
value
,
current
|
current
.
tap
{
|
c
|
c
.
merge!
(
value
)
}
}
platform_attr_writer
:xcconfig
,
lambda
{
|
value
,
current
|
current
.
tap
{
|
c
|
c
.
merge!
(
value
)
}
}
def
xcconfig
def
xcconfig
...
@@ -357,12 +372,6 @@ module Pod
...
@@ -357,12 +372,6 @@ module Pod
end
end
end
end
def
pod_destroot_name
if
root
=
pod_destroot
root
.
basename
end
end
def
self
.
pattern_list
(
patterns
)
def
self
.
pattern_list
(
patterns
)
if
patterns
.
is_a?
(
Array
)
&&
(
!
defined?
(
Rake
)
||
!
patterns
.
is_a?
(
Rake
::
FileList
))
if
patterns
.
is_a?
(
Array
)
&&
(
!
defined?
(
Rake
)
||
!
patterns
.
is_a?
(
Rake
::
FileList
))
patterns
patterns
...
...
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