Commit d32d3f7a authored by Fabio Pelosin's avatar Fabio Pelosin

[Command::Outdated] Fix for pods with external sources.

Closes #954
parent 6108f1b6
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
targets. This is useful for libraries which conditionally expose interfaces. targets. This is useful for libraries which conditionally expose interfaces.
[#903](https://github.com/CocoaPods/CocoaPods/issues/903) [#903](https://github.com/CocoaPods/CocoaPods/issues/903)
###### Bug fixes
* Fix issue related to `pod outdated` external sources.
[#954](https://github.com/CocoaPods/CocoaPods/issues/954)
## 0.18.0 ## 0.18.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.2...0.18.0) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.2...0.18.0)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.2...0.18.0) [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.2...0.18.0)
......
...@@ -19,6 +19,7 @@ module Pod ...@@ -19,6 +19,7 @@ module Pod
# @todo the command report new dependencies added to the Podfile as # @todo the command report new dependencies added to the Podfile as
# updates. # updates.
#
# @todo fix. # @todo fix.
# #
def run def run
...@@ -30,6 +31,7 @@ module Pod ...@@ -30,6 +31,7 @@ module Pod
updates = [] updates = []
pods.each do |pod_name| pods.each do |pod_name|
set = SourcesManager.search(Dependency.new(pod_name)) set = SourcesManager.search(Dependency.new(pod_name))
next unless set
source_version = set.versions.first source_version = set.versions.first
lockfile_version = lockfile.version(pod_name) lockfile_version = lockfile.version(pod_name)
if source_version > lockfile_version if source_version > lockfile_version
...@@ -42,7 +44,7 @@ module Pod ...@@ -42,7 +44,7 @@ module Pod
else else
UI.section "The following updates are available:" do UI.section "The following updates are available:" do
updates.each do |(name, from_version, to_version)| updates.each do |(name, from_version, to_version)|
UI.message "- #{name} #{from_version} -> #{to_version}" UI.puts "- #{name} #{from_version} -> #{to_version}"
end end
end end
end end
......
...@@ -38,11 +38,7 @@ module Pod ...@@ -38,11 +38,7 @@ module Pod
# @raise If no source including the set can be found. # @raise If no source including the set can be found.
# #
def search(dependency) def search(dependency)
set = aggregate.search(dependency) aggregate.search(dependency)
unless set
raise Informative, "Unable to find a pod named `#{dependency.name}`"
end
set
end end
# Search all the sources with the given search term. # Search all the sources with the given search term.
......
...@@ -32,10 +32,9 @@ module Pod ...@@ -32,10 +32,9 @@ module Pod
set.name.should == 'BananaLib' set.name.should == 'BananaLib'
end end
it "raises if it not able to find a pod for the given dependency" do it "returns nil if it is not able to find a pod for the given dependency" do
should.raise Informative do
set = SourcesManager.search(Dependency.new('Windows-Lib')) set = SourcesManager.search(Dependency.new('Windows-Lib'))
end.message.should.match /Unable to find.*Windows-Lib/ set.should.be.nil
end end
it "searches sets by name" do it "searches sets by name" do
......
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