Commit 2cc9f01d authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Analyzer] Allow using CocoaPods with only externally-sourced dependencies in a …

[Analyzer] Allow using CocoaPods with only externally-sourced dependencies in a   `Podfile` without specifying a source or displaying a warning

Closes https://github.com/CocoaPods/CocoaPods/issues/2735.
parent 80e192c6
......@@ -77,6 +77,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Kyle Fuller](https://github.com/kylef)
[#1249](https://github.com/CocoaPods/CocoaPods/issues/1249)
* Allows using CocoaPods with only externally-sourced dependencies in a
`Podfile` without specifying a source or displaying a warning.
[Samuel Giddins](https://github.com/segiddins)
[#2735](https://github.com/CocoaPods/CocoaPods/issues/2735)
## 0.34.4
......
......@@ -367,7 +367,7 @@ module Pod
def sources
@sources ||= begin
sources = podfile.sources
if sources.empty?
if sources.empty? && !podfile.dependencies.reject(&:external_source).empty?
SourcesManager.all.tap do |all|
UI.warn all.reduce("The use of implicit sources has been " \
"deprecated. To continue using all of the sources currently " \
......
......@@ -514,6 +514,13 @@ module Pod
UI.warnings.should.
match %r{source 'https://github.com/CocoaPods/Specs.git'}
end
it 'does not warn when all dependencies have an external source' do
UI.warnings = ''
@podfile.stubs(:dependencies).returns([Dependency.new('SEGModules', :git => 'https://github.com/segiddins/SEGModules.git')])
@analyzer.send(:sources)
UI.warnings.should.be.empty?
end
end
describe 'when there are explicit sources' 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