Commit fd00c1d5 authored by Fabio Pelosin's avatar Fabio Pelosin

[Specification] Don't include the name of the preferred dependency in to_s.

This caused a Bug that lead to Pods with preferred dependencies to be always
installed.

Closes CocoaPods/Specs#464.
parent a720933b
......@@ -9,6 +9,9 @@
[#489](https://github.com/CocoaPods/CocoaPods/issues/489)
- CocoaPods now uses a recent version of Octokit.
[#490](https://github.com/CocoaPods/CocoaPods/issues/490)
- Fixed a bug that caused Pods with preferred dependencies to be always
installed.
[Specs#464](https://github.com/CocoaPods/CocoaPods/issues/464)
## 0.14.0.rc2
......
......@@ -95,10 +95,13 @@ module Pod
end
# @return [String] A string representation of the pod which indicates if
# the pods comes from a local source.
# the pods comes from a local source or has a preferred
# dependency.
#
def to_s
top_specification.to_s
s = top_specification.to_s
s << " defaulting to #{top_specification.preferred_dependency} subspec" if top_specification.preferred_dependency
s
end
# @return [String] The name of the Pod.
......
......@@ -458,8 +458,7 @@ module Pod
end
def to_s
display_name = preferred_dependency.nil? ? name : "#{name}/#{preferred_dependency}"
"#{display_name} (#{version})"
"#{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