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| ...@@ -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
......
...@@ -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 (options && opt = options[:deployment_target])
Pod::Version.new(opt) Pod::Version.new(opt)
end end
end end
......
...@@ -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
......
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