Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
b8534717
Commit
b8534717
authored
Oct 13, 2017
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update default Swift version to 3.2 for validation
parent
1b834cfc
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
CHANGELOG.md
CHANGELOG.md
+5
-0
validator.rb
lib/cocoapods/validator.rb
+2
-2
validator_spec.rb
spec/unit/validator_spec.rb
+4
-4
No files found.
CHANGELOG.md
View file @
b8534717
...
...
@@ -30,6 +30,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### 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
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7121
](
https://github.com/CocoaPods/CocoaPods/issues/7121
)
...
...
lib/cocoapods/validator.rb
View file @
b8534717
...
...
@@ -16,7 +16,7 @@ module Pod
# 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
# Core.
...
...
@@ -407,7 +407,7 @@ module Pod
"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 '
\
'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
...
...
spec/unit/validator_spec.rb
View file @
b8534717
...
...
@@ -886,10 +886,10 @@ module Pod
result
=
validator
.
results
.
first
result
.
type
.
should
==
:warning
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 '
\
'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
it
'does not warn for Swift if version was set by a dot swift version file'
do
...
...
@@ -912,10 +912,10 @@ module Pod
end
describe
'#swift_version'
do
it
'defaults to Swift 3.
0
'
do
it
'defaults to Swift 3.
2
'
do
validator
=
test_swiftpod
validator
.
stubs
(
:dot_swift_version
).
returns
(
nil
)
validator
.
swift_version
.
should
==
'3.
0
'
validator
.
swift_version
.
should
==
'3.
2
'
end
it
'allows the user to set the version'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment