Commit 7009a803 authored by Fabio Pelosin's avatar Fabio Pelosin

Minor fixes to the installation process

parent 7a16b576
......@@ -19,18 +19,9 @@ module Pod
# updated if they need a reference to the prefix header.
#
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)
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.
#
def project
......@@ -43,13 +34,12 @@ module Pod
library.target_definition
end
# @return [TargetDefinition] the target definition of the library.
# @return [PBXNativeTarget] the target generated by the installation
# process.
#
def target
library.target
end
end
end
end
......
......@@ -173,19 +173,19 @@ module Pod
def detect_pods_to_install
names = []
# TODO
# specs_by_root_name.each do |root_name, specs|
# if update_mode
# if specs.any? { |spec| spec.version.head? } #|| resolver.pods_from_external_sources.include?(root_name)
# @names_of_pods_to_install << root_name
# end
# end
# unless pod_installation_exists?(root_name)
# @names_of_pods_to_install << root_name
# end
# end
# TODO user root name.
analyzer.specifications.each do |spec|
root_name = spec.root.name
if update_mode
if spec.version.head? #|| TODO resolver.pods_from_external_sources.include?(root_name)
names << root_name
end
end
unless sandbox.pod_dir(root_name).exist?
names << root_name
end
end
names += analyzer.sandbox_state.added + analyzer.sandbox_state.changed
names = names.map { |name| Specification.root_name(name) }
......@@ -275,7 +275,7 @@ module Pod
#
def install_pod_sources
@installed_specs = []
root_specs = analyzer.specifications.map { |spec| spec.root }
root_specs = analyzer.specifications.map { |spec| spec.root }.uniq
root_specs.each do |spec|
if names_of_pods_to_install.include?(spec.name)
UI.section("Installing #{spec}".green, "-> ".green) do
......
......@@ -103,7 +103,7 @@ module Pod
# platform in a single installation.
#
def file_accessors
@file_accessors ||= libraries.map(&:file_accessors).flatten
@file_accessors ||= libraries.map(&:file_accessors).flatten.compact
end
#-----------------------------------------------------------------------#
......
......@@ -123,6 +123,8 @@ module Pod
# Creates the link to the headers of the Pod in the sandbox.
#
# TODO: clean up
#
# @return [void]
#
def link_headers
......
......@@ -300,9 +300,10 @@ module Pod
configs_by_overridden_key = {}
target.build_configurations.each do |config|
xcconfig.attributes.keys.each do |key|
configs_by_overridden_key[key] ||= []
target_value = config.build_settings[key]
if target_value && !target_value.include?('$(inherited)')
configs_by_overridden_key[key] ||= []
configs_by_overridden_key[key] << config.name
end
end
......@@ -310,10 +311,10 @@ module Pod
configs_by_overridden_key.each do |key, config_names|
name = "#{target.name} [#{config_names.join(' - ')}]"
actions = [
"Use the `$(inherited)' flag, or",
"Use the `$(inherited)` flag, or",
"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}'.",
actions)
end
......
......@@ -191,7 +191,8 @@ module Pod
end
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
result.flatten.compact.uniq
......
......@@ -47,6 +47,10 @@ module Pod
installer.send(:file_accessors).count.should == 1
end
xit "handles libraries without pods and hence without file accessors" do
end
end
#-------------------------------------------------------------------------#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment