Commit cae642fe authored by Fabio Pelosin's avatar Fabio Pelosin

Revert "[Platform] Always show the deployment target in #to_s."

This reverts commit cfe61a69.

Conflicts:
	lib/cocoapods/command/spec.rb

See #358
parent 32893de1
...@@ -51,9 +51,13 @@ module Pod ...@@ -51,9 +51,13 @@ module Pod
if input.is_a? Platform if input.is_a? Platform
@symbolic_name = input.name @symbolic_name = input.name
@deployment_target = input.deployment_target @deployment_target = input.deployment_target
@declared_deployment_target = input.declared_deployment_target
else else
@symbolic_name = input @symbolic_name = input
target = target[:deployment_target] if target.is_a?(Hash) target = target[:deployment_target] if target.is_a?(Hash)
@declared_deployment_target = target
unless target unless target
case @symbolic_name case @symbolic_name
when :ios when :ios
...@@ -78,6 +82,10 @@ module Pod ...@@ -78,6 +82,10 @@ module Pod
# #
attr_reader :deployment_target attr_reader :deployment_target
# @return [Version] The deployment target declared on initialization.
#
attr_reader :declared_deployment_target
# @param [Platform, Symbol] other The other platform to check. # @param [Platform, Symbol] other The other platform to check.
# #
# @note If a symbol is passed the comparison does not take into account # @note If a symbol is passed the comparison does not take into account
...@@ -113,7 +121,7 @@ module Pod ...@@ -113,7 +121,7 @@ module Pod
when :osx when :osx
s = 'OS X' s = 'OS X'
end end
s << " #{deployment_target}" s << " #{declared_deployment_target}" if declared_deployment_target
s s
end end
......
...@@ -28,7 +28,7 @@ describe Pod::Command::Presenter do ...@@ -28,7 +28,7 @@ describe Pod::Command::Presenter do
output = presenter.describe(@set) output = presenter.describe(@set)
output.should.include? 'Author: Robbie Hanson' output.should.include? 'Author: Robbie Hanson'
output.should.include? 'License: BSD' output.should.include? 'License: BSD'
output.should.include? 'Platform: iOS 3.0 - OS X 10.4' output.should.include? 'Platform: iOS - OS X'
output.should.include? 'Watchers: 318' output.should.include? 'Watchers: 318'
output.should.include? 'Forks: 42' output.should.include? 'Forks: 42'
output.should.include? 'Pushed: more than a year ago' output.should.include? 'Pushed: more than a year ago'
......
...@@ -35,8 +35,8 @@ describe Pod::Platform do ...@@ -35,8 +35,8 @@ describe Pod::Platform do
end end
it "presents an accurate string representation" do it "presents an accurate string representation" do
@platform.to_s.should == "iOS 4.3" @platform.to_s.should == "iOS"
Pod::Platform.new(:osx).to_s.should == 'OS X 10.6' Pod::Platform.new(:osx).to_s.should == 'OS X'
Pod::Platform.new(:ios, '5.0.0').to_s.should == 'iOS 5.0.0' Pod::Platform.new(:ios, '5.0.0').to_s.should == 'iOS 5.0.0'
Pod::Platform.new(:osx, '10.7').to_s.should == 'OS X 10.7' Pod::Platform.new(:osx, '10.7').to_s.should == 'OS X 10.7'
end end
......
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