Commit 99d831e8 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Analyzer] Only update source repos that are being used

parent f9a55aac
...@@ -169,7 +169,7 @@ module Pod ...@@ -169,7 +169,7 @@ module Pod
def update_repositories_if_needed def update_repositories_if_needed
unless config.skip_repo_update? unless config.skip_repo_update?
UI.section 'Updating spec repositories' do UI.section 'Updating spec repositories' do
SourcesManager.update sources.each { |source| SourcesManager.update(source.name) }
end end
end end
end end
......
...@@ -62,7 +62,14 @@ module Pod ...@@ -62,7 +62,14 @@ module Pod
it 'updates the repositories by default' do it 'updates the repositories by default' do
config.skip_repo_update = false config.skip_repo_update = false
SourcesManager.expects(:update).once SourcesManager.expects(:update).twice
@analyzer.analyze
end
it 'does not update unused sources' do
config.skip_repo_update = false
@analyzer.stubs(:sources).returns(SourcesManager.master)
SourcesManager.expects(:update).once.with('master')
@analyzer.analyze @analyzer.analyze
end end
......
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