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
2f1c364d
Unverified
Commit
2f1c364d
authored
Sep 27, 2016
by
Danielle Tomlinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update swift message
parent
8278abe0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
validator.rb
lib/cocoapods/validator.rb
+5
-2
validator_spec.rb
spec/unit/validator_spec.rb
+6
-4
No files found.
lib/cocoapods/validator.rb
View file @
2f1c364d
...
@@ -143,8 +143,11 @@ module Pod
...
@@ -143,8 +143,11 @@ module Pod
'`--private` to ignore them if linting the specification for a private pod'
'`--private` to ignore them if linting the specification for a private pod'
end
end
if
dot_swift_version
.
nil?
if
dot_swift_version
.
nil?
reasons
.
to_sentence
+
".
\n
[!] If you are trying to validate a Swift 3.0 Pod, "
\
reasons
.
to_sentence
+
".
\n
[!] The validator for Swift projects uses "
\
'you need to have a `.swift-version` file. e.g `echo "3.0" > .swift-version`'
'Swift 2.3 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`'
else
else
reasons
.
to_sentence
reasons
.
to_sentence
end
end
...
...
spec/unit/validator_spec.rb
View file @
2f1c364d
...
@@ -817,12 +817,14 @@ module Pod
...
@@ -817,12 +817,14 @@ module Pod
validator
=
test_swiftpod
validator
=
test_swiftpod
validator
.
stubs
(
:validated?
).
returns
(
false
)
validator
.
stubs
(
:validated?
).
returns
(
false
)
result
=
Validator
::
Result
.
new
(
:error
,
'attribute'
,
'message'
)
result
=
Validator
::
Result
.
new
(
:error
,
'attribute'
,
'message'
)
validator
.
stubs
(
:results
).
returns
([
result
])
validator
.
stubs
(
:results
).
returns
([
result
])
validator
.
failure_reason
.
should
==
"1 error.
\n
[!] If you are trying"
\
validator
.
failure_reason
.
should
==
"1 error.
\n
[!] The validator for "
\
' to validate a Swift 3.0 Pod, you need to have a `.swift-version` '
\
'Swift projects uses Swift 2.3 by default, if you are using a '
\
'file. e.g `echo "3.0" > .swift-version`'
'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`"
end
end
describe
'#swift_version'
do
describe
'#swift_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