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
0c7f0228
Commit
0c7f0228
authored
Jun 17, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FileReferencesInstaller] Rename #libraries to pod_targets
parent
0d918ae8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
file_references_installer.rb
lib/cocoapods/installer/file_references_installer.rb
+14
-14
file_references_installer_spec.rb
spec/unit/installer/file_references_installer_spec.rb
+1
-1
No files found.
lib/cocoapods/installer/file_references_installer.rb
View file @
0c7f0228
...
@@ -8,9 +8,9 @@ module Pod
...
@@ -8,9 +8,9 @@ module Pod
#
#
attr_reader
:sandbox
attr_reader
:sandbox
# @return [Array<PodTarget>] The
librarie
s of the installation.
# @return [Array<PodTarget>] The
pod target
s of the installation.
#
#
attr_reader
:
librarie
s
attr_reader
:
pod_target
s
# @return [Project] The Pods project.
# @return [Project] The Pods project.
#
#
...
@@ -19,12 +19,12 @@ module Pod
...
@@ -19,12 +19,12 @@ module Pod
# Initialize a new instance
# Initialize a new instance
#
#
# @param [Sandbox] sandbox @see sandbox
# @param [Sandbox] sandbox @see sandbox
# @param [Array<PodTarget>]
libraries @see librarie
s
# @param [Array<PodTarget>]
pod_targets @see pod_target
s
# @param [Project]
libraries @see libraries
# @param [Project]
pods_project @see pod_project
#
#
def
initialize
(
sandbox
,
librarie
s
,
pods_project
)
def
initialize
(
sandbox
,
pod_target
s
,
pods_project
)
@sandbox
=
sandbox
@sandbox
=
sandbox
@
libraries
=
librarie
s
@
pod_targets
=
pod_target
s
@pods_project
=
pods_project
@pods_project
=
pods_project
end
end
...
@@ -113,23 +113,23 @@ module Pod
...
@@ -113,23 +113,23 @@ module Pod
#
#
def
link_headers
def
link_headers
UI
.
message
'- Linking headers'
do
UI
.
message
'- Linking headers'
do
libraries
.
each
do
|
library
|
pod_targets
.
each
do
|
pod_target
|
library
.
file_accessors
.
each
do
|
file_accessor
|
pod_target
.
file_accessors
.
each
do
|
file_accessor
|
framework_exp
=
/.framework\//
framework_exp
=
/.framework\//
headers_sandbox
=
Pathname
.
new
(
file_accessor
.
spec
.
root
.
name
)
headers_sandbox
=
Pathname
.
new
(
file_accessor
.
spec
.
root
.
name
)
library
.
build_headers
.
add_search_path
(
headers_sandbox
,
library
.
platform
)
pod_target
.
build_headers
.
add_search_path
(
headers_sandbox
,
pod_target
.
platform
)
sandbox
.
public_headers
.
add_search_path
(
headers_sandbox
,
library
.
platform
)
sandbox
.
public_headers
.
add_search_path
(
headers_sandbox
,
pod_target
.
platform
)
header_mappings
(
headers_sandbox
,
file_accessor
,
file_accessor
.
headers
).
each
do
|
namespaced_path
,
files
|
header_mappings
(
headers_sandbox
,
file_accessor
,
file_accessor
.
headers
).
each
do
|
namespaced_path
,
files
|
library
.
build_headers
.
add_files
(
namespaced_path
,
files
.
reject
{
|
f
|
f
.
to_path
=~
framework_exp
},
library
.
platform
)
pod_target
.
build_headers
.
add_files
(
namespaced_path
,
files
.
reject
{
|
f
|
f
.
to_path
=~
framework_exp
},
pod_target
.
platform
)
end
end
header_mappings
(
headers_sandbox
,
file_accessor
,
file_accessor
.
public_headers
).
each
do
|
namespaced_path
,
files
|
header_mappings
(
headers_sandbox
,
file_accessor
,
file_accessor
.
public_headers
).
each
do
|
namespaced_path
,
files
|
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
.
reject
{
|
f
|
f
.
to_path
=~
framework_exp
},
library
.
platform
)
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
.
reject
{
|
f
|
f
.
to_path
=~
framework_exp
},
pod_target
.
platform
)
end
end
vendored_frameworks_header_mappings
(
headers_sandbox
,
file_accessor
).
each
do
|
namespaced_path
,
files
|
vendored_frameworks_header_mappings
(
headers_sandbox
,
file_accessor
).
each
do
|
namespaced_path
,
files
|
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
,
library
.
platform
)
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
,
pod_target
.
platform
)
end
end
end
end
end
end
...
@@ -146,7 +146,7 @@ module Pod
...
@@ -146,7 +146,7 @@ module Pod
# specs platform combinations.
# specs platform combinations.
#
#
def
file_accessors
def
file_accessors
@file_accessors
||=
librarie
s
.
map
(
&
:file_accessors
).
flatten
.
compact
@file_accessors
||=
pod_target
s
.
map
(
&
:file_accessors
).
flatten
.
compact
end
end
# Adds file references to the list of the paths returned by the file
# Adds file references to the list of the paths returned by the file
...
...
spec/unit/installer/file_references_installer_spec.rb
View file @
0c7f0228
...
@@ -86,7 +86,7 @@ module Pod
...
@@ -86,7 +86,7 @@ module Pod
roots
.
should
==
[
fixture
(
'banana-lib'
),
fixture
(
'banana-lib'
)]
roots
.
should
==
[
fixture
(
'banana-lib'
),
fixture
(
'banana-lib'
)]
end
end
it
'handles
libraries empty librarie
s without file accessors'
do
it
'handles
pod
s without file accessors'
do
pod_target_1
=
PodTarget
.
new
([
stub
(
'Spec'
)],
[
stub
(
'TargetDefinition'
)],
config
.
sandbox
)
pod_target_1
=
PodTarget
.
new
([
stub
(
'Spec'
)],
[
stub
(
'TargetDefinition'
)],
config
.
sandbox
)
pod_target_1
.
file_accessors
=
[]
pod_target_1
.
file_accessors
=
[]
installer
=
Installer
::
FileReferencesInstaller
.
new
(
config
.
sandbox
,
[
pod_target_1
],
@project
)
installer
=
Installer
::
FileReferencesInstaller
.
new
(
config
.
sandbox
,
[
pod_target_1
],
@project
)
...
...
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