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
aa3d7be4
Commit
aa3d7be4
authored
Jun 27, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Specification] Return lowest supported deployment target if needed.
Closes #357
parent
c7c61af5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
specification.rb
lib/cocoapods/specification.rb
+21
-1
specification_spec.rb
spec/unit/specification_spec.rb
+1
-1
No files found.
lib/cocoapods/specification.rb
View file @
aa3d7be4
...
@@ -474,7 +474,27 @@ module Pod
...
@@ -474,7 +474,27 @@ module Pod
end
end
def
deployment_target
(
platform
)
def
deployment_target
(
platform
)
@deployment_target
[
platform
]
||
(
@parent
?
@parent
.
deployment_target
(
platform
)
:
nil
)
@deployment_target
[
platform
]
||
(
@parent
?
@parent
.
deployment_target
(
platform
)
:
lowest_supported_deployment_target
(
platform
)
)
end
# Returns the lowest supported deployment target for a given platform.
# The value should be pegged to the lowest deployment target supported
# by a default xcode installation.
#
# @param platform [Symbol] The platform for witch the deployment target
# shoud be returned.
#
# @return [String] The deployment target.
#
def
lowest_supported_deployment_target
(
platform
)
case
platform
when
:ios
'3.0'
when
:osx
'10.4'
else
nil
end
end
end
end
end
Spec
=
Specification
Spec
=
Specification
...
...
spec/unit/specification_spec.rb
View file @
aa3d7be4
...
@@ -552,7 +552,7 @@ describe "A Pod::Specification, concerning its attributes that support different
...
@@ -552,7 +552,7 @@ describe "A Pod::Specification, concerning its attributes that support different
it
"returns the list of the supported platfroms and deployment targets"
do
it
"returns the list of the supported platfroms and deployment targets"
do
@spec
.
available_platforms
.
count
.
should
==
2
@spec
.
available_platforms
.
count
.
should
==
2
@spec
.
available_platforms
.
should
.
include?
Pod
::
Platform
.
new
(
:osx
)
@spec
.
available_platforms
.
should
.
include?
Pod
::
Platform
.
new
(
:osx
,
'10.4'
)
@spec
.
available_platforms
.
should
.
include?
Pod
::
Platform
.
new
(
:ios
,
'4.0'
)
@spec
.
available_platforms
.
should
.
include?
Pod
::
Platform
.
new
(
:ios
,
'4.0'
)
end
end
...
...
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