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
de7d95d8
Commit
de7d95d8
authored
Oct 31, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PodTargetInstaller] Add spec for using the pods own deployment target
parent
d9b30f5d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+1
-1
pod_target_installer_spec.rb
...t/installer/target_installer/pod_target_installer_spec.rb
+8
-0
No files found.
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
de7d95d8
...
@@ -318,7 +318,7 @@ module Pod
...
@@ -318,7 +318,7 @@ module Pod
def
deployment_target
def
deployment_target
default
=
Podfile
::
TargetDefinition
::
PLATFORM_DEFAULTS
[
target
.
platform
.
name
]
default
=
Podfile
::
TargetDefinition
::
PLATFORM_DEFAULTS
[
target
.
platform
.
name
]
target
.
specs
.
map
do
|
spec
|
target
.
specs
.
map
do
|
spec
|
Pod
::
Version
.
new
(
spec
.
deployment_target
(
target
.
platform
)
||
default
)
Pod
::
Version
.
new
(
spec
.
deployment_target
(
target
.
platform
.
name
)
||
default
)
end
.
max
.
to_s
end
.
max
.
to_s
end
end
...
...
spec/unit/installer/target_installer/pod_target_installer_spec.rb
View file @
de7d95d8
...
@@ -33,6 +33,14 @@ module Pod
...
@@ -33,6 +33,14 @@ module Pod
@spec
.
prefix_header_contents
=
'#import "BlocksKit.h"'
@spec
.
prefix_header_contents
=
'#import "BlocksKit.h"'
end
end
it
'uses the maximum of all spec deployment targets'
do
spec_1
=
Pod
::
Specification
.
new
{
|
s
|
s
.
ios
.
deployment_target
=
'10.10'
}
spec_2
=
Pod
::
Specification
.
new
{
|
s
|
s
.
ios
.
deployment_target
=
'10.9'
}
spec_3
=
Pod
::
Specification
.
new
@pod_target
.
stubs
(
:specs
).
returns
([
spec_1
,
spec_2
,
spec_3
])
@installer
.
send
(
:deployment_target
).
should
==
'10.10'
end
it
'sets the platform and the deployment target for iOS targets'
do
it
'sets the platform and the deployment target for iOS targets'
do
@installer
.
install!
@installer
.
install!
target
=
@project
.
targets
.
first
target
=
@project
.
targets
.
first
...
...
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