Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: CocoaPods/CocoaPods
...
head fork: CocoaPods/CocoaPods
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 5 additions and 23 deletions.
  1. +5 −15 lib/cocoapods/platform.rb
  2. +0 −8 spec/unit/platform_spec.rb
View
20 lib/cocoapods/platform.rb
@@ -88,12 +88,6 @@ def name
#
attr_reader :declared_deployment_target
- # @todo Deprecate
- #
- def deployment_target= (version)
- @deployment_target = Pod::Version.create(version)
- end
-
# @param [Platform, Symbol] other The other platform to check.
#
# @note If a symbol is passed the comparison does not take into account
@@ -109,22 +103,18 @@ def ==(other)
end
end
- # A platform supports (from the point of view of a pod) another platform
- # if they represent the same SDK and if the deployment target of the other
- # is lower. If one of the platforms does not specify the deployment target,
- # it is not taken into account.
+ # In the context of operating system SDKs, a platform supports another
+ # one if they have the same name and the other platform has a minor or
+ # equal deployment target.
#
# @note This method returns true if one of the platforms is nil.
#
- # @return Whether the platform supports being used in the environment
- # described by another platform.
- #
- # @todo rename to supported_on?
+ # @return Whether the platform supports another platform.
#
def supports?(other)
return true if @symbolic_name.nil? || other.nil?
other = Platform.new(other)
- (name == other.name) && (deployment_target >= other.deployment_target)
+ (other.name == name) && (other.deployment_target <= deployment_target)
end
# @return [String] A string representation including the deployment target.
View
8 spec/unit/platform_spec.rb
@@ -56,14 +56,6 @@
p.deployment_target.should == Pod::Version.new('4.0.0')
end
- it "allows to specify the deployment target after initialization" do
- p = Pod::Platform.new(:ios, '4.0.0')
- p.deployment_target = '4.0.0'
- p.deployment_target.should == Pod::Version.new('4.0.0')
- p.deployment_target = Pod::Version.new('4.0.0')
- p.deployment_target.should == Pod::Version.new('4.0.0')
- end
-
it "provides a default deployment target on initialization" do
p = Pod::Platform.new(:ios)
p.deployment_target.should == Pod::Version.new('4.3')

No commit comments for this range

Something went wrong with that request. Please try again.