Commit 2221f4f3 authored by Danielle Tomlinson's avatar Danielle Tomlinson Committed by GitHub

Merge pull request #6042 from CocoaPods/dani_swift_version_default

[Validator] Use Swift 3.0 by default
parents 850cd02c 1a227186
......@@ -12,6 +12,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Ingmar Stein](https://github.com/IngmarStein)
[#6029](https://github.com/CocoaPods/CocoaPods/pull/6029)
* Use Swift 3.0 by default during validation.
[Danielle Tomlinson](https://github.com/dantoml)
[#6042](https://github.com/CocoaPods/CocoaPods/pull/6042)
##### Bug Fixes
* None.
......
......@@ -144,10 +144,10 @@ module Pod
end
if dot_swift_version.nil?
reasons.to_sentence + ".\n[!] The validator for Swift projects uses " \
'Swift 2.3 by default, if you are using a different version of ' \
'Swift 3.0 by default, if you are using a different version of ' \
'swift you can use a `.swift-version` file to set the version for ' \
"your Pod. For example to use Swift 3.0, run: \n" \
' `echo "3.0" > .swift-version`'
"your Pod. For example to use Swift 2.3, run: \n" \
' `echo "2.3" > .swift-version`'
else
reasons.to_sentence
end
......@@ -248,7 +248,7 @@ module Pod
# @return [String] the SWIFT_VERSION to use for validation.
#
def swift_version
@swift_version ||= dot_swift_version || '2.3'
@swift_version ||= dot_swift_version || '3.0'
end
# Set the SWIFT_VERSION that should be used to validate the pod.
......
......@@ -821,17 +821,17 @@ module Pod
validator.stubs(:results).returns([result])
validator.failure_reason.should == "1 error.\n[!] The validator for " \
'Swift projects uses Swift 2.3 by default, if you are using a ' \
'Swift projects uses Swift 3.0 by default, if you are using a ' \
'different version of swift you can use a `.swift-version` file ' \
'to set the version for your Pod. For example to use Swift 3.0, ' \
"run: \n `echo \"3.0\" > .swift-version`"
'to set the version for your Pod. For example to use Swift 2.3, ' \
"run: \n `echo \"2.3\" > .swift-version`"
end
describe '#swift_version' do
it 'defaults to Swift 2.3' do
it 'defaults to Swift 3.0' do
validator = test_swiftpod
validator.stubs(:dot_swift_version).returns(nil)
validator.swift_version.should == '2.3'
validator.swift_version.should == '3.0'
end
it 'allows the user to set the version' 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