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
223bd86b
Unverified
Commit
223bd86b
authored
Oct 02, 2016
by
Danielle Tomlinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Validator] Add writer to swift_version
parent
7eb9ef04
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
validator.rb
lib/cocoapods/validator.rb
+4
-0
validator_spec.rb
spec/unit/validator_spec.rb
+7
-0
No files found.
lib/cocoapods/validator.rb
View file @
223bd86b
...
@@ -251,6 +251,10 @@ module Pod
...
@@ -251,6 +251,10 @@ module Pod
@swift_version
||=
dot_swift_version
||
'2.3'
@swift_version
||=
dot_swift_version
||
'2.3'
end
end
# Set the SWIFT_VERSION that should be used to validate the pod.
#
attr_writer
:swift_version
# @return [String] the SWIFT_VERSION in the .swift-version file or nil.
# @return [String] the SWIFT_VERSION in the .swift-version file or nil.
#
#
def
dot_swift_version
def
dot_swift_version
...
...
spec/unit/validator_spec.rb
View file @
223bd86b
...
@@ -834,6 +834,13 @@ module Pod
...
@@ -834,6 +834,13 @@ module Pod
validator
.
swift_version
.
should
==
'2.3'
validator
.
swift_version
.
should
==
'2.3'
end
end
it
'allows the user to set the version'
do
validator
=
test_swiftpod
validator
.
stubs
(
:dot_swift_version
).
returns
(
'3.0'
)
validator
.
swift_version
=
'4.0'
validator
.
swift_version
.
should
==
'4.0'
end
it
'checks for dot_swift_version'
do
it
'checks for dot_swift_version'
do
validator
=
test_swiftpod
validator
=
test_swiftpod
validator
.
expects
(
:dot_swift_version
)
validator
.
expects
(
:dot_swift_version
)
...
...
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