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
b5828a9a
Commit
b5828a9a
authored
Apr 18, 2012
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Pod::Specification] Added support for deployment target in platform
parent
0c5fb77d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
spec.rb
lib/cocoapods/command/spec.rb
+1
-1
platform.rb
lib/cocoapods/platform.rb
+2
-2
specification.rb
lib/cocoapods/specification.rb
+8
-1
No files found.
lib/cocoapods/command/spec.rb
View file @
b5828a9a
...
@@ -187,7 +187,7 @@ Pod::Spec.new do |s|
...
@@ -187,7 +187,7 @@ Pod::Spec.new do |s|
# these, or none if it runs on both platforms.
# these, or none if it runs on both platforms.
#
#
# s.platform = :ios
# s.platform = :ios
# s.platform = :ios,
:deployment_target => "5.0"
# s.platform = :ios,
{ :deployment_target => "5.0" }
# s.platform = :osx
# s.platform = :osx
# A list of resources included with the Pod. These are copied into the
# A list of resources included with the Pod. These are copied into the
...
...
lib/cocoapods/platform.rb
View file @
b5828a9a
...
@@ -30,7 +30,7 @@ module Pod
...
@@ -30,7 +30,7 @@ module Pod
def
to_s
def
to_s
case
@symbolic_name
case
@symbolic_name
when
:ios
when
:ios
'iOS'
'iOS'
+
(
deployment_target
?
"
#{
deployment_target
}
"
:
''
)
when
:osx
when
:osx
'OS X'
'OS X'
else
else
...
@@ -47,7 +47,7 @@ module Pod
...
@@ -47,7 +47,7 @@ module Pod
end
end
def
deployment_target
def
deployment_target
if
(
opt
=
options
[
:deployment_target
])
if
(
opt
ions
&&
opt
=
options
[
:deployment_target
])
Pod
::
Version
.
new
(
opt
)
Pod
::
Version
.
new
(
opt
)
end
end
end
end
...
...
lib/cocoapods/specification.rb
View file @
b5828a9a
...
@@ -114,7 +114,14 @@ module Pod
...
@@ -114,7 +114,14 @@ module Pod
end
end
def
platform
=
(
platform
)
def
platform
=
(
platform
)
@platform
=
Platform
.
new
(
platform
)
if
platform
.
class
==
Array
name
=
platform
[
0
]
options
=
platform
[
1
]
else
name
=
platform
options
=
nil
end
@platform
=
Platform
.
new
(
name
,
options
)
end
end
attr_reader
:platform
attr_reader
:platform
...
...
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