Permalink
Browse files

[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.
  • Loading branch information...
1 parent a720933 commit fd00c1d5470ee933868a3c4c1aa80216cffa1a06 @fabiopelosin fabiopelosin committed Sep 3, 2012
Showing with 9 additions and 4 deletions.
  1. +3 −0 CHANGELOG.md
  2. +5 −2 lib/cocoapods/local_pod.rb
  3. +1 −2 lib/cocoapods/specification.rb
View
@@ -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 @@ def root
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 @@ def dependency_by_top_level_spec_name(name)
end
def to_s
- display_name = preferred_dependency.nil? ? name : "#{name}/#{preferred_dependency}"
- "#{display_name} (#{version})"
+ "#{name} (#{version})"
end
def inspect

0 comments on commit fd00c1d

Please sign in to comment.