Cleanup

parent 611432dd
GIT GIT
remote: https://github.com/CocoaPods/CLAide.git remote: https://github.com/CocoaPods/CLAide.git
revision: 61071679fc965083b6d43fdc1aa042afbaf172d1 revision: 8106d0d779ae1c9f571404a9f38950905ad5c803
branch: master branch: master
specs: specs:
claide (1.0.0) claide (1.0.0)
GIT GIT
remote: https://github.com/CocoaPods/Core.git remote: https://github.com/CocoaPods/Core.git
revision: fc8c258d0bce73e091f09de260a1a65bed3482a1 revision: fef34047643147b09955f8aeb1277a47d01ff1c1
branch: master branch: master
specs: specs:
cocoapods-core (1.1.0.rc.2) cocoapods-core (1.1.0.rc.2)
...@@ -24,7 +24,7 @@ GIT ...@@ -24,7 +24,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Xcodeproj.git remote: https://github.com/CocoaPods/Xcodeproj.git
revision: c8b7277072c3c2432ac99ef9b45cd1a6d181409e revision: 4020ac913be863bdc4925fbb132aa94af71850f4
branch: master branch: master
specs: specs:
xcodeproj (1.3.1) xcodeproj (1.3.1)
......
...@@ -428,7 +428,7 @@ module Pod ...@@ -428,7 +428,7 @@ module Pod
end end
error_messages = targets_by_spec.map do |spec, targets| error_messages = targets_by_spec.map do |spec, targets|
swift_targets = targets.reject { |target| target.blank? } swift_targets = targets.reject { |target| target.swift_version.blank? }
next if swift_targets.empty? || swift_targets.uniq(&:swift_version).count == 1 next if swift_targets.empty? || swift_targets.uniq(&:swift_version).count == 1
target_errors = swift_targets.map(&error_message_for_target).join(', ') target_errors = swift_targets.map(&error_message_for_target).join(', ')
"- #{spec.name} required by #{target_errors}" "- #{spec.name} required by #{target_errors}"
......
...@@ -674,9 +674,10 @@ module Pod ...@@ -674,9 +674,10 @@ module Pod
podfile.target_definitions['SampleProject'].stubs(:swift_version).returns('3.0') podfile.target_definitions['SampleProject'].stubs(:swift_version).returns('3.0')
podfile.target_definitions['TestRunner'].stubs(:swift_version).returns('2.3') podfile.target_definitions['TestRunner'].stubs(:swift_version).returns('2.3')
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile) analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile)
should.raise Informative do should.raise Informative do
analyzer.analyze analyzer.analyze
end.message.should.match /The following pods are integrated into Swift targets that do not have the same Swift version:/ end.message.should.match /The following pods are integrated into targets that do not have the same Swift version:/
end end
it 'does not raise when targets integrate the same pod but only one of the targets is a swift target' do it 'does not raise when targets integrate the same pod but only one of the targets is a swift target' do
...@@ -695,22 +696,6 @@ module Pod ...@@ -695,22 +696,6 @@ module Pod
lambda { analyzer.analyze }.should.not.raise lambda { analyzer.analyze }.should.not.raise
end end
it 'does not raise when swift targets with different swift versions integrate a non-swift pod' do
podfile = Podfile.new do
source SpecHelper.test_repo_url
project 'SampleProject/SampleProject'
platform :ios, '8.0'
pod 'JSONKit'
target 'SampleProject'
target 'TestRunner'
end
podfile.target_definitions['SampleProject'].stubs(:swift_version).returns('3.0')
# when the swift version is set at the project level, but unset in one target, swift_version is empty
podfile.target_definitions['TestRunner'].stubs(:swift_version).returns('')
analyzer = Pod::Installer::Analyzer.new(config.sandbox, podfile)
lambda { analyzer.analyze }.should.not.raise
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