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 @@ ...@@ -9,6 +9,9 @@
[#489](https://github.com/CocoaPods/CocoaPods/issues/489) [#489](https://github.com/CocoaPods/CocoaPods/issues/489)
- CocoaPods now uses a recent version of Octokit. - CocoaPods now uses a recent version of Octokit.
[#490](https://github.com/CocoaPods/CocoaPods/issues/490) [#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 ## 0.14.0.rc2
......
...@@ -95,10 +95,13 @@ module Pod ...@@ -95,10 +95,13 @@ module Pod
end end
# @return [String] A string representation of the pod which indicates if # @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 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 end
# @return [String] The name of the Pod. # @return [String] The name of the Pod.
......
...@@ -458,8 +458,7 @@ module Pod ...@@ -458,8 +458,7 @@ module Pod
end end
def to_s def to_s
display_name = preferred_dependency.nil? ? name : "#{name}/#{preferred_dependency}" "#{name} (#{version})"
"#{display_name} (#{version})"
end end
def inspect 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