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