Commit b5828a9a authored by Fabio Pelosin's avatar Fabio Pelosin

[Pod::Specification] Added support for deployment target in platform

parent 0c5fb77d
......@@ -187,7 +187,7 @@ Pod::Spec.new do |s|
# these, or none if it runs on both platforms.
#
# s.platform = :ios
# s.platform = :ios, :deployment_target => "5.0"
# s.platform = :ios, { :deployment_target => "5.0" }
# s.platform = :osx
# A list of resources included with the Pod. These are copied into the
......
......@@ -30,7 +30,7 @@ module Pod
def to_s
case @symbolic_name
when :ios
'iOS'
'iOS' + (deployment_target ? " #{deployment_target}" : '')
when :osx
'OS X'
else
......@@ -47,7 +47,7 @@ module Pod
end
def deployment_target
if (opt = options[:deployment_target])
if (options && opt = options[:deployment_target])
Pod::Version.new(opt)
end
end
......
......@@ -114,7 +114,14 @@ module Pod
end
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
attr_reader :platform
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment