Commit e2d59610 authored by Fabio Pelosin's avatar Fabio Pelosin

[Installer] Fix incorrect name for Pods with preferred subspecs.

See #485
parent 80797fcf
......@@ -48,17 +48,11 @@ module Pod
#
def install_dependencies!
pods.sort_by { |pod| pod.top_specification.name.downcase }.each do |pod|
name = pod.top_specification.name
should_install = @resolver.should_install?(name) || !pod.exists?
should_install = @resolver.should_install?(pod.top_specification.name) || !pod.exists?
unless config.silent?
marker = config.verbose ? "\n-> ".green : ''
if subspec_name = pod.top_specification.preferred_dependency
name = "#{pod.top_specification.name}/#{subspec_name} (#{pod.top_specification.version})"
else
name = pod.to_s
end
puts marker << ( should_install ? "Installing #{name}".green : "Using #{name}" )
puts marker << ( should_install ? "Installing #{pod}".green : "Using #{pod}" )
end
if should_install
......
......@@ -458,7 +458,8 @@ module Pod
end
def to_s
"#{name} (#{version})"
display_name = preferred_dependency.nil? ? name : "#{name}/#{preferred_dependency}"
"#{display_name} (#{version})"
end
def inspect
......
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