Commit 6f906c42 authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #3659 from DanielTomlinson/feature/cocoapods_version

Add support for cocoapods_version
parents a9a18603 2bd06e31
...@@ -451,6 +451,7 @@ module Pod ...@@ -451,6 +451,7 @@ module Pod
UI.section "Resolving dependencies of #{UI.path podfile.defined_in_file}" do UI.section "Resolving dependencies of #{UI.path podfile.defined_in_file}" do
resolver = Resolver.new(sandbox, podfile, locked_dependencies, sources) resolver = Resolver.new(sandbox, podfile, locked_dependencies, sources)
specs_by_target = resolver.resolve specs_by_target = resolver.resolve
specs_by_target.values.flatten(1).each(&:validate_cocoapods_version)
end end
specs_by_target specs_by_target
end end
......
...@@ -14,6 +14,7 @@ module Pod ...@@ -14,6 +14,7 @@ module Pod
spec_files.sort_by { |p| -p.to_path.split(File::SEPARATOR).size }.each do |file| spec_files.sort_by { |p| -p.to_path.split(File::SEPARATOR).size }.each do |file|
begin begin
spec = Specification.from_file(file) spec = Specification.from_file(file)
spec.validate_cocoapods_version
@specs_by_name[spec.name] = spec @specs_by_name[spec.name] = spec
rescue => e rescue => e
UI.warn "Unable to load a podspec from `#{file.basename}`, skipping:\n\n#{e}" UI.warn "Unable to load a podspec from `#{file.basename}`, skipping:\n\n#{e}"
......
...@@ -301,6 +301,12 @@ module Pod ...@@ -301,6 +301,12 @@ module Pod
UI.warnings.should.match /RestKit \(<= 0.23.2\)/ UI.warnings.should.match /RestKit \(<= 0.23.2\)/
end end
it 'raises when specs have incompatible cocoapods requirements' do
analyzer = Pod::Installer::Analyzer.new(config.sandbox, @podfile, nil)
Specification.any_instance.stubs(:cocoapods_version).returns(Requirement.create '= 0.1.0')
should.raise(Informative) { analyzer.analyze }
end
#--------------------------------------# #--------------------------------------#
it 'computes the state of the Sandbox respect to the resolved dependencies' do it 'computes the state of the Sandbox respect to the resolved dependencies' 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