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
7009a803
Commit
7009a803
authored
Feb 12, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes to the installation process
parent
7a16b576
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
45 deletions
+43
-45
target_installer_data.rb
lib/cocoapods/hooks/target_installer_data.rb
+2
-12
installer.rb
lib/cocoapods/installer.rb
+21
-21
file_references_installer.rb
lib/cocoapods/installer/file_references_installer.rb
+1
-1
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+9
-7
user_project_integrator.rb
lib/cocoapods/installer/user_project_integrator.rb
+4
-3
file_accessor.rb
lib/cocoapods/sandbox/file_accessor.rb
+2
-1
file_references_installer_spec.rb
spec/unit/installer/file_references_installer_spec.rb
+4
-0
No files found.
lib/cocoapods/hooks/target_installer_data.rb
View file @
7009a803
...
@@ -19,18 +19,9 @@ module Pod
...
@@ -19,18 +19,9 @@ module Pod
# updated if they need a reference to the prefix header.
# updated if they need a reference to the prefix header.
#
#
def
prefix_header_filename
def
prefix_header_filename
UI
.
warn
"The usage of the TargetInstaller#prefix_header_filename is deprecated."
library
.
prefix_header_path
.
relative_path_from
(
sandbox
.
root
)
library
.
prefix_header_path
.
relative_path_from
(
sandbox
.
root
)
end
end
# @return [PBXNativeTarget] the target generated by the installation
# process.
#
# @note Generated by the {#add_target} step.
#
def
target
end
# @return [Project] the Pods project of the sandbox.
# @return [Project] the Pods project of the sandbox.
#
#
def
project
def
project
...
@@ -43,13 +34,12 @@ module Pod
...
@@ -43,13 +34,12 @@ module Pod
library
.
target_definition
library
.
target_definition
end
end
# @return [PBXNativeTarget] the target generated by the installation
#
@return [TargetDefinition] the target definition of the library
.
#
process
.
#
#
def
target
def
target
library
.
target
library
.
target
end
end
end
end
end
end
end
end
...
...
lib/cocoapods/installer.rb
View file @
7009a803
...
@@ -173,19 +173,19 @@ module Pod
...
@@ -173,19 +173,19 @@ module Pod
def
detect_pods_to_install
def
detect_pods_to_install
names
=
[]
names
=
[]
# TODO
analyzer
.
specifications
.
each
do
|
spec
|
# specs_by_root_name.each do |root_name, specs|
root_name
=
spec
.
root
.
name
# if update_mode
# if specs.any? { |spec| spec.version.head? } #|| resolver.pods_from_external_sources.include?(root_name)
if
update_mode
# @names_of_pods_to_install << root_name
if
spec
.
version
.
head?
#|| TODO resolver.pods_from_external_sources.include?(root_name)
# end
names
<<
root_name
#
end
end
end
# unless pod_installation_exists?(root_name)
# @names_of_pods_to_install << root_name
unless
sandbox
.
pod_dir
(
root_name
).
exist?
# end
names
<<
root_name
#
end
end
# TODO user root name.
end
names
+=
analyzer
.
sandbox_state
.
added
+
analyzer
.
sandbox_state
.
changed
names
+=
analyzer
.
sandbox_state
.
added
+
analyzer
.
sandbox_state
.
changed
names
=
names
.
map
{
|
name
|
Specification
.
root_name
(
name
)
}
names
=
names
.
map
{
|
name
|
Specification
.
root_name
(
name
)
}
...
@@ -275,16 +275,16 @@ module Pod
...
@@ -275,16 +275,16 @@ module Pod
#
#
def
install_pod_sources
def
install_pod_sources
@installed_specs
=
[]
@installed_specs
=
[]
root_specs
=
analyzer
.
specifications
.
map
{
|
spec
|
spec
.
root
}
root_specs
=
analyzer
.
specifications
.
map
{
|
spec
|
spec
.
root
}.
uniq
root_specs
.
each
do
|
spec
|
root_specs
.
each
do
|
spec
|
if
names_of_pods_to_install
.
include?
(
spec
.
name
)
if
names_of_pods_to_install
.
include?
(
spec
.
name
)
UI
.
section
(
"Installing
#{
spec
}
"
.
green
,
"-> "
.
green
)
do
UI
.
section
(
"Installing
#{
spec
}
"
.
green
,
"-> "
.
green
)
do
install_source_of_pod
(
spec
.
name
)
install_source_of_pod
(
spec
.
name
)
end
else
UI
.
section
(
"Using
#{
spec
}
"
,
"-> "
.
green
)
end
end
else
UI
.
section
(
"Using
#{
spec
}
"
,
"-> "
.
green
)
end
end
end
end
end
# Install the Pods. If the resolver indicated that a Pod should be
# Install the Pods. If the resolver indicated that a Pod should be
...
...
lib/cocoapods/installer/file_references_installer.rb
View file @
7009a803
...
@@ -103,7 +103,7 @@ module Pod
...
@@ -103,7 +103,7 @@ module Pod
# platform in a single installation.
# platform in a single installation.
#
#
def
file_accessors
def
file_accessors
@file_accessors
||=
libraries
.
map
(
&
:file_accessors
).
flatten
@file_accessors
||=
libraries
.
map
(
&
:file_accessors
).
flatten
.
compact
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
...
lib/cocoapods/installer/target_installer.rb
View file @
7009a803
...
@@ -123,6 +123,8 @@ module Pod
...
@@ -123,6 +123,8 @@ module Pod
# Creates the link to the headers of the Pod in the sandbox.
# Creates the link to the headers of the Pod in the sandbox.
#
#
# TODO: clean up
#
# @return [void]
# @return [void]
#
#
def
link_headers
def
link_headers
...
@@ -133,14 +135,14 @@ module Pod
...
@@ -133,14 +135,14 @@ module Pod
sandbox
.
build_headers
.
add_search_path
(
headers_sandbox
)
sandbox
.
build_headers
.
add_search_path
(
headers_sandbox
)
sandbox
.
public_headers
.
add_search_path
(
headers_sandbox
)
sandbox
.
public_headers
.
add_search_path
(
headers_sandbox
)
consumer
=
file_accessor
.
spec_consumer
consumer
=
file_accessor
.
spec_consumer
header_mappings
(
headers_sandbox
,
consumer
,
file_accessor
.
headers
,
file_accessor
.
path_list
.
root
).
each
do
|
namespaced_path
,
files
|
header_mappings
(
headers_sandbox
,
consumer
,
file_accessor
.
headers
,
file_accessor
.
path_list
.
root
).
each
do
|
namespaced_path
,
files
|
sandbox
.
build_headers
.
add_files
(
namespaced_path
,
files
)
sandbox
.
build_headers
.
add_files
(
namespaced_path
,
files
)
end
end
header_mappings
(
headers_sandbox
,
consumer
,
file_accessor
.
public_headers
,
file_accessor
.
path_list
.
root
).
each
do
|
namespaced_path
,
files
|
header_mappings
(
headers_sandbox
,
consumer
,
file_accessor
.
public_headers
,
file_accessor
.
path_list
.
root
).
each
do
|
namespaced_path
,
files
|
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
)
sandbox
.
public_headers
.
add_files
(
namespaced_path
,
files
)
end
end
end
end
end
end
end
end
...
...
lib/cocoapods/installer/user_project_integrator.rb
View file @
7009a803
...
@@ -300,9 +300,10 @@ module Pod
...
@@ -300,9 +300,10 @@ module Pod
configs_by_overridden_key
=
{}
configs_by_overridden_key
=
{}
target
.
build_configurations
.
each
do
|
config
|
target
.
build_configurations
.
each
do
|
config
|
xcconfig
.
attributes
.
keys
.
each
do
|
key
|
xcconfig
.
attributes
.
keys
.
each
do
|
key
|
configs_by_overridden_key
[
key
]
||=
[]
target_value
=
config
.
build_settings
[
key
]
target_value
=
config
.
build_settings
[
key
]
if
target_value
&&
!
target_value
.
include?
(
'$(inherited)'
)
if
target_value
&&
!
target_value
.
include?
(
'$(inherited)'
)
configs_by_overridden_key
[
key
]
||=
[]
configs_by_overridden_key
[
key
]
<<
config
.
name
configs_by_overridden_key
[
key
]
<<
config
.
name
end
end
end
end
...
@@ -310,10 +311,10 @@ module Pod
...
@@ -310,10 +311,10 @@ module Pod
configs_by_overridden_key
.
each
do
|
key
,
config_names
|
configs_by_overridden_key
.
each
do
|
key
,
config_names
|
name
=
"
#{
target
.
name
}
[
#{
config_names
.
join
(
' - '
)
}
]"
name
=
"
#{
target
.
name
}
[
#{
config_names
.
join
(
' - '
)
}
]"
actions
=
[
actions
=
[
"Use the `$(inherited)
'
flag, or"
,
"Use the `$(inherited)
`
flag, or"
,
"Remove the build settings from the target."
"Remove the build settings from the target."
]
]
UI
.
warn
(
"The target `
#{
name
}
' overrides the `
#{
key
}
'
build "
\
UI
.
warn
(
"The target `
#{
name
}
` overrides the `
#{
key
}
`
build "
\
"setting defined in `
#{
library
.
xcconfig_relative_path
}
'."
,
"setting defined in `
#{
library
.
xcconfig_relative_path
}
'."
,
actions
)
actions
)
end
end
...
...
lib/cocoapods/sandbox/file_accessor.rb
View file @
7009a803
...
@@ -191,7 +191,8 @@ module Pod
...
@@ -191,7 +191,8 @@ module Pod
end
end
unless
file_lists
.
empty?
unless
file_lists
.
empty?
UI
.
warn
"[
#{
spec_consumer
.
spec
.
name
}
] The usage of Rake FileList is deprecated. Use `exclude_files`."
# TODO Restore warning in 0.17 proper
# UI.warn "[#{spec_consumer.spec.name}] The usage of Rake FileList is deprecated. Use `exclude_files`."
end
end
result
.
flatten
.
compact
.
uniq
result
.
flatten
.
compact
.
uniq
...
...
spec/unit/installer/file_references_installer_spec.rb
View file @
7009a803
...
@@ -47,6 +47,10 @@ module Pod
...
@@ -47,6 +47,10 @@ module Pod
installer
.
send
(
:file_accessors
).
count
.
should
==
1
installer
.
send
(
:file_accessors
).
count
.
should
==
1
end
end
xit
"handles libraries without pods and hence without file accessors"
do
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