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

Minor fixes to the installation process

parent 7a16b576
...@@ -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
......
...@@ -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,7 +275,7 @@ module Pod ...@@ -275,7 +275,7 @@ 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
......
...@@ -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
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
......
...@@ -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
......
...@@ -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
......
...@@ -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
......
...@@ -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
#-------------------------------------------------------------------------# #-------------------------------------------------------------------------#
......
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