Commit ba32500f authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7136 from dnkoutso/bump_default_swift_version

Update default Swift version to 3.2 for validation
parents 1b834cfc b8534717
...@@ -30,6 +30,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -30,6 +30,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
* Set the default Swift version to 3.2 during validation
[Victor Hugo Barros](https://github.com/heyzooi)
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7136](https://github.com/CocoaPods/CocoaPods/pull/7136)
* Better warning message for which Swift version was used during validation * Better warning message for which Swift version was used during validation
[Dimitris Koutsogiorgas](https://github.com/dnkoutso) [Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7121](https://github.com/CocoaPods/CocoaPods/issues/7121) [#7121](https://github.com/CocoaPods/CocoaPods/issues/7121)
......
...@@ -16,7 +16,7 @@ module Pod ...@@ -16,7 +16,7 @@ module Pod
# The default version of Swift to use when linting pods # The default version of Swift to use when linting pods
# #
DEFAULT_SWIFT_VERSION = '3.0'.freeze DEFAULT_SWIFT_VERSION = '3.2'.freeze
# @return [Specification::Linter] the linter instance from CocoaPods # @return [Specification::Linter] the linter instance from CocoaPods
# Core. # Core.
...@@ -407,7 +407,7 @@ module Pod ...@@ -407,7 +407,7 @@ module Pod
"Swift #{DEFAULT_SWIFT_VERSION} by default because no Swift version was specified. " \ "Swift #{DEFAULT_SWIFT_VERSION} by default because no Swift version was specified. " \
'If you want to use a different version of Swift during validation, then either use the `--swift-version` parameter ' \ 'If you want to use a different version of Swift during validation, then either use the `--swift-version` parameter ' \
'or use a `.swift-version` file to set the version of Swift to use for ' \ 'or use a `.swift-version` file to set the version of Swift to use for ' \
'your Pod. For example to use Swift 2.3, run: `echo "2.3" > .swift-version`.') 'your Pod. For example to use Swift 4.0, run: `echo "4.0" > .swift-version`.')
end end
end end
......
...@@ -886,10 +886,10 @@ module Pod ...@@ -886,10 +886,10 @@ module Pod
result = validator.results.first result = validator.results.first
result.type.should == :warning result.type.should == :warning
result.message.should == 'The validator used ' \ result.message.should == 'The validator used ' \
'Swift 3.0 by default because no Swift version was specified. ' \ 'Swift 3.2 by default because no Swift version was specified. ' \
'If you want to use a different version of Swift during validation, then either use the `--swift-version` parameter ' \ 'If you want to use a different version of Swift during validation, then either use the `--swift-version` parameter ' \
'or use a `.swift-version` file to set the version of Swift to use for ' \ 'or use a `.swift-version` file to set the version of Swift to use for ' \
'your Pod. For example to use Swift 2.3, run: `echo "2.3" > .swift-version`.' 'your Pod. For example to use Swift 4.0, run: `echo "4.0" > .swift-version`.'
end end
it 'does not warn for Swift if version was set by a dot swift version file' do it 'does not warn for Swift if version was set by a dot swift version file' do
...@@ -912,10 +912,10 @@ module Pod ...@@ -912,10 +912,10 @@ module Pod
end end
describe '#swift_version' do describe '#swift_version' do
it 'defaults to Swift 3.0' do it 'defaults to Swift 3.2' do
validator = test_swiftpod validator = test_swiftpod
validator.stubs(:dot_swift_version).returns(nil) validator.stubs(:dot_swift_version).returns(nil)
validator.swift_version.should == '3.0' validator.swift_version.should == '3.2'
end end
it 'allows the user to set the version' do 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