Commit fbad005f authored by Eloy Duran's avatar Eloy Duran

Merge branch 'develop' of github.com:CocoaPods/CocoaPods into develop

parents 9a80da4b 35b74956
GIT GIT
remote: git://github.com/CocoaPods/Xcodeproj.git remote: git://github.com/CocoaPods/Xcodeproj.git
revision: f0d455bcd839e8fdada2e117681ac93b296659b1 revision: 8588320c17db695f3ee87f11ab0953cc2e3a0f0d
branch: develop branch: develop
specs: specs:
xcodeproj (0.2.0.rc2) xcodeproj (0.2.0.rc3)
PATH PATH
remote: . remote: .
specs: specs:
cocoapods (0.6.0.rc2) cocoapods (0.6.0.rc5)
colored (~> 1.2) colored (~> 1.2)
escape (~> 0.0.4) escape (~> 0.0.4)
faraday (~> 0.8.1) faraday (~> 0.8.1)
...@@ -16,7 +16,7 @@ PATH ...@@ -16,7 +16,7 @@ PATH
octokit (~> 1.7.0) octokit (~> 1.7.0)
open4 (~> 1.3.0) open4 (~> 1.3.0)
rake (~> 0.9.0) rake (~> 0.9.0)
xcodeproj (~> 0.2.0.rc1) xcodeproj (~> 0.2.0.rc3)
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
......
...@@ -93,14 +93,14 @@ namespace :gem do ...@@ -93,14 +93,14 @@ namespace :gem do
puts "You are about to release `#{gem_version}', is that correct? [y/n]" puts "You are about to release `#{gem_version}', is that correct? [y/n]"
exit if $stdin.gets.strip.downcase != 'y' exit if $stdin.gets.strip.downcase != 'y'
diff_lines = `git diff --numstat`.strip.split("\n") diff_lines = `git diff --name-only`.strip.split("\n")
if diff_lines.size == 0 || !diff_lines.first.include?('lib/cocoapods.rb') if diff_lines.size == 0
$stderr.puts "[!] Change the version number yourself in lib/cocoapods.rb" $stderr.puts "[!] Change the version number yourself in lib/cocoapods.rb"
exit 1 exit 1
end end
if diff_lines.size > 1 || !diff_lines.first.include?('lib/cocoapods.rb') if diff_lines != ['Gemfile.lock', 'lib/cocoapods.rb']
$stderr.puts "[!] Only change the version number in a release commit!" $stderr.puts "[!] Only change the version number in a release commit!"
exit 1 exit 1
end end
...@@ -125,26 +125,28 @@ namespace :gem do ...@@ -125,26 +125,28 @@ namespace :gem do
tmp = File.expand_path('../tmp', __FILE__) tmp = File.expand_path('../tmp', __FILE__)
tmp_gems = File.join(tmp, 'gems') tmp_gems = File.join(tmp, 'gems')
Rake::Task['gem:build'].invoke
puts "* Testing gem installation (tmp/gems)" puts "* Testing gem installation (tmp/gems)"
silent_sh "rm -rf '#{tmp}'" silent_sh "rm -rf '#{tmp}'"
silent_sh "gem install --install-dir='#{tmp_gems}' #{gem_filename}" silent_sh "gem install --install-dir='#{tmp_gems}' #{gem_filename}"
puts "* Building examples from gem (tmp/gems)" # puts "* Building examples from gem (tmp/gems)"
ENV['GEM_HOME'] = ENV['GEM_PATH'] = tmp_gems # ENV['GEM_HOME'] = ENV['GEM_PATH'] = tmp_gems
ENV['PATH'] = "#{tmp_gems}/bin:#{ENV['PATH']}" # ENV['PATH'] = "#{tmp_gems}/bin:#{ENV['PATH']}"
ENV['FROM_GEM'] = '1' # ENV['FROM_GEM'] = '1'
silent_sh "rake examples:build" # silent_sh "rake examples:build"
# Then release # Then release
sh "git commit lib/cocoapods.rb -m 'Release #{gem_version}'" sh "git commit Gemfile.lock lib/cocoapods.rb -m 'Release #{gem_version}'"
sh "git tag -a #{gem_version} -m 'Release #{gem_version}'" sh "git tag -a #{gem_version} -m 'Release #{gem_version}'"
sh "git push origin master" sh "git push origin master"
sh "git push origin --tags" sh "git push origin --tags"
sh "gem push #{gem_filename}" sh "gem push #{gem_filename}"
# Update the last version in CocoaPods-version.yml # Update the last version in CocoaPods-version.yml
puts "* Updating last known version in Specs repo"
specs_branch = '0.6' specs_branch = '0.6'
Dir.chdir('../Specs') do Dir.chdir('../Specs') do
puts Dir.pwd puts Dir.pwd
sh "git checkout #{specs_branch}" sh "git checkout #{specs_branch}"
...@@ -265,13 +267,12 @@ namespace :examples do ...@@ -265,13 +267,12 @@ namespace :examples do
puts puts
Dir.chdir(example.to_s) do Dir.chdir(example.to_s) do
sh "rm -rf Pods DerivedData" sh "rm -rf Pods DerivedData"
sh "#{'../../bin/' unless ENV['FROM_GEM']}pod install --verbose" sh "#{'../../bin/' unless ENV['FROM_GEM']}pod install --verbose --no-update"
command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'" command = "xcodebuild -workspace '#{example.basename}.xcworkspace' -scheme '#{example.basename}'"
if (example + 'Podfile').read.include?('platform :ios') if (example + 'Podfile').read.include?('platform :ios')
# Specifically build against the simulator SDK so we don't have to deal with code signing. # Specifically build against the simulator SDK so we don't have to deal with code signing.
root = File.exist?("/Applications/Xcode.app") ? "/Applications/Xcode.app/Contents" : ""
command << " -sdk " command << " -sdk "
command << Dir.glob("#{root}/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk").last command << Dir.glob("#{`xcode-select -print-path`.chomp}/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator*.sdk").last
end end
sh command sh command
end end
......
...@@ -33,7 +33,7 @@ Gem::Specification.new do |s| ...@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency 'json', '~> 1.7.3' s.add_runtime_dependency 'json', '~> 1.7.3'
s.add_runtime_dependency 'open4', '~> 1.3.0' s.add_runtime_dependency 'open4', '~> 1.3.0'
s.add_runtime_dependency 'rake', '~> 0.9.0' s.add_runtime_dependency 'rake', '~> 0.9.0'
s.add_runtime_dependency 'xcodeproj', '~> 0.2.0.rc1' s.add_runtime_dependency 'xcodeproj', '~> 0.2.0.rc3'
s.add_development_dependency 'bacon', '~> 1.1' s.add_development_dependency 'bacon', '~> 1.1'
......
PODS: PODS:
- AFNetworking (0.7.0): - AFNetworking (0.7.0):
- JSONKit - JSONKit
- FormatterKit (0.7.0) - FormatterKit (1.0.0):
- FormatterKit/ArrayFormatter (= 1.0.0)
- FormatterKit/LocationFormatter (= 1.0.0)
- FormatterKit/OrdinalNumberFormatter (= 1.0.0)
- FormatterKit/TimeIntervalFormatter (= 1.0.0)
- FormatterKit/URLRequestFormatter (= 1.0.0)
- FormatterKit/UnitOfInformationFormatter (= 1.0.0)
- FormatterKit/ArrayFormatter (1.0.0)
- FormatterKit/LocationFormatter (1.0.0)
- FormatterKit/OrdinalNumberFormatter (1.0.0)
- FormatterKit/TimeIntervalFormatter (1.0.0)
- FormatterKit/URLRequestFormatter (1.0.0)
- FormatterKit/UnitOfInformationFormatter (1.0.0)
- JSONKit (1.5pre) - JSONKit (1.5pre)
DEPENDENCIES: DEPENDENCIES:
......
PODS: PODS:
- AFNetworking (0.7.0): - AFNetworking (0.7.0):
- JSONKit - JSONKit
- FormatterKit (0.7.0) - FormatterKit (1.0.0):
- FormatterKit/ArrayFormatter (= 1.0.0)
- FormatterKit/LocationFormatter (= 1.0.0)
- FormatterKit/OrdinalNumberFormatter (= 1.0.0)
- FormatterKit/TimeIntervalFormatter (= 1.0.0)
- FormatterKit/URLRequestFormatter (= 1.0.0)
- FormatterKit/UnitOfInformationFormatter (= 1.0.0)
- FormatterKit/ArrayFormatter (1.0.0)
- FormatterKit/LocationFormatter (1.0.0)
- FormatterKit/OrdinalNumberFormatter (1.0.0)
- FormatterKit/TimeIntervalFormatter (1.0.0)
- FormatterKit/URLRequestFormatter (1.0.0)
- FormatterKit/UnitOfInformationFormatter (1.0.0)
- JSONKit (1.5pre) - JSONKit (1.5pre)
DEPENDENCIES: DEPENDENCIES:
......
module Pod module Pod
VERSION = '0.6.0.rc2' VERSION = '0.6.0.rc5'
class PlainInformative < StandardError class PlainInformative < StandardError
end end
......
...@@ -65,7 +65,9 @@ module Pod ...@@ -65,7 +65,9 @@ module Pod
def self.run(*argv) def self.run(*argv)
sub_command = parse(*argv) sub_command = parse(*argv)
unless ENV['SKIP_SETUP']
Setup.new(ARGV.new).run_if_needed Setup.new(ARGV.new).run_if_needed
end
sub_command.run sub_command.run
rescue Interrupt rescue Interrupt
......
...@@ -31,7 +31,7 @@ module Pod ...@@ -31,7 +31,7 @@ module Pod
end end
def read_only_url def read_only_url
'git://github.com/CocoaPods/Specs.git' 'https://github.com/CocoaPods/Specs.git'
end end
def read_write_url def read_write_url
......
...@@ -11,15 +11,16 @@ module Pod ...@@ -11,15 +11,16 @@ module Pod
Creates a PodSpec, in the current working dir, called `NAME.podspec'. Creates a PodSpec, in the current working dir, called `NAME.podspec'.
If a GitHub url is passed the spec is prepopulated. If a GitHub url is passed the spec is prepopulated.
$ pod spec lint [ NAME.podspec | REPO ] $ pod spec lint [ NAME.podspec | DIRECTORY ]
Validates `NAME.podspec'. In case `NAME.podspec' is omitted, it defaults Validates `NAME.podspec'. If a directory is provided it performs a quick
to `*.podspec' in the current working dir. If the name of a repo is validation on all the podspec files found, including subfolders. In case
provided it validates all its specs.} the argument is omitted, it defaults to the current working dir.
}
end end
def self.options def self.options
[ ["--quick", "Lint skips checks that would require to donwload and build the spec"], [ ["--quick", "Lint skips checks that would require to download and build the spec"],
["--only-errors", "Lint validates even if warnings are present"], ["--only-errors", "Lint validates even if warnings are present"],
["--no-clean", "Lint leaves the build directory intact for inspection"] ].concat(super) ["--no-clean", "Lint leaves the build directory intact for inspection"] ].concat(super)
end end
...@@ -74,10 +75,10 @@ module Pod ...@@ -74,10 +75,10 @@ module Pod
invalid_count = lint_podspecs invalid_count = lint_podspecs
count = specs_to_lint.count count = specs_to_lint.count
if invalid_count == 0 if invalid_count == 0
lint_passed_message = count == 1 ? "#{podspecs_to_lint.first.basename} passed validation" : "All the #{count} specs passed validation" lint_passed_message = count == 1 ? "#{podspecs_to_lint.first.basename} passed validation." : "All the specs passed validation."
puts lint_passed_message.green << "\n\n" unless config.silent? puts lint_passed_message.green << "\n\n" unless config.silent?
else else
raise Informative, count == 1 ? "The spec did not pass validation" : "#{invalid_count} out of #{count} specs failed validation" raise Informative, count == 1 ? "The spec did not pass validation." : "#{invalid_count} out of #{count} specs failed validation."
end end
end end
...@@ -87,12 +88,12 @@ module Pod ...@@ -87,12 +88,12 @@ module Pod
invalid_count = 0 invalid_count = 0
specs_to_lint.each do |spec| specs_to_lint.each do |spec|
# Show immediatly which pod is being processed. # Show immediatly which pod is being processed.
print " -> #{spec}\r" unless config.silent? || is_repo? print " -> #{spec}\r" unless config.silent? || @multiple_files
$stdout.flush $stdout.flush
linter = Linter.new(spec) linter = Linter.new(spec)
linter.lenient = @only_errors linter.lenient = @only_errors
linter.quick = @quick || is_repo? linter.quick = @quick || @multiple_files
linter.no_clean = @no_clean linter.no_clean = @no_clean
invalid_count += 1 unless linter.lint invalid_count += 1 unless linter.lint
...@@ -104,7 +105,7 @@ module Pod ...@@ -104,7 +105,7 @@ module Pod
puts unless config.silent? || should_skip?(linter) puts unless config.silent? || should_skip?(linter)
end end
puts "Analyzed #{specs_to_lint.count} specs in #{podspecs_to_lint.count} podspecs files.\n\n" if is_repo? && !config.silent? puts "Analyzed #{specs_to_lint.count} specs in #{podspecs_to_lint.count} podspecs files.\n\n" if @multiple_files && !config.silent?
invalid_count invalid_count
end end
...@@ -119,7 +120,7 @@ module Pod ...@@ -119,7 +120,7 @@ module Pod
end end
def should_skip?(linter) def should_skip?(linter)
is_repo? && linter.errors.empty? && linter.warnings.empty? && linter.notes.empty? @multiple_files && linter.errors.empty? && linter.warnings.empty? && linter.notes.empty?
end end
def print_messages(spec, type, messages) def print_messages(spec, type, messages)
...@@ -129,14 +130,14 @@ module Pod ...@@ -129,14 +130,14 @@ module Pod
def podspecs_to_lint def podspecs_to_lint
@podspecs_to_lint ||= begin @podspecs_to_lint ||= begin
if (is_repo?) path = Pathname.new(@repo_or_podspec || '.')
files = (config.repos_dir + @repo_or_podspec).glob('**/*.podspec') if path.directory?
elsif @repo_or_podspec files = path.glob('**/*.podspec')
files = [Pathname.new(@repo_or_podspec)] raise Informative, "No specs found in the current directory." if files.empty?
raise Informative, "Unable to find a spec named #{@repo_or_podspec}" unless files[0].exist? && @repo_or_podspec.include?('.podspec') @multiple_files = true
else else
files = Pathname.pwd.glob('*.podspec') files = [path]
raise Informative, "No specs found in the current directory" if files.empty? raise Informative, "Unable to find a spec named `#{@repo_or_podspec}'." unless files[0].exist? && @repo_or_podspec.include?('.podspec')
end end
files files
end end
...@@ -152,10 +153,6 @@ module Pod ...@@ -152,10 +153,6 @@ module Pod
end end
end end
def is_repo?
@is_repo ||= @repo_or_podspec && (config.repos_dir + @repo_or_podspec).exist? && !@repo_or_podspec.include?('/')
end
# Linter class # Linter class
# #
class Linter class Linter
...@@ -311,7 +308,7 @@ module Pod ...@@ -311,7 +308,7 @@ module Pod
# Some values are multiplaform # Some values are multiplaform
patterns = patterns.is_a?(Hash) ? patterns.values.flatten(1) : patterns patterns = patterns.is_a?(Hash) ? patterns.values.flatten(1) : patterns
patterns.each do |pattern| patterns.each do |pattern|
# Skip Filelist that would otherwise be resolved from the working directory resulting # Skip FileList that would otherwise be resolved from the working directory resulting
# in a potentially very expensi operation # in a potentially very expensi operation
next if pattern.is_a?(FileList) next if pattern.is_a?(FileList)
invalid = pattern.is_a?(Array) ? pattern.any? { |path| path.start_with?('/') } : pattern.start_with?('/') invalid = pattern.is_a?(Array) ? pattern.any? { |path| path.start_with?('/') } : pattern.start_with?('/')
...@@ -338,7 +335,7 @@ module Pod ...@@ -338,7 +335,7 @@ module Pod
messages << "The description should end with a dot" if @spec.description !~ /.*\./ && @spec.description != @spec.summary messages << "The description should end with a dot" if @spec.description !~ /.*\./ && @spec.description != @spec.summary
messages << "Git sources should specify either a tag or a commit" if source[:git] && !source[:commit] && !source[:tag] messages << "Git sources should specify either a tag or a commit" if source[:git] && !source[:commit] && !source[:tag]
messages << "Github repositories should end in `.git'" if github_source? && source[:git] !~ /.*\.git/ messages << "Github repositories should end in `.git'" if github_source? && source[:git] !~ /.*\.git/
# messages << "Github repositories should use `https' link" if github_source? && source[:git] !~ /https:\/\/github.com/ messages << "Github repositories should use `https' link" if github_source? && source[:git] !~ /https:\/\/github.com/
messages << "Comments must be deleted" if text =~ /^\w*#\n\w*#/ # allow a single line comment as it is generally used in subspecs messages << "Comments must be deleted" if text =~ /^\w*#\n\w*#/ # allow a single line comment as it is generally used in subspecs
messages messages
end end
......
...@@ -71,7 +71,9 @@ module Pod ...@@ -71,7 +71,9 @@ module Pod
end end
def already_installed? def already_installed?
Pathname.new(File.expand_path("~/Library/Developer/Shared/Documentation/DocSets/org.cocoapods.#{name.gsub(/ /,'-')}.docset")).exist? index = spec_appledoc_options.index('--company-id')
company_id = index ? spec_appledoc_options[index + 1] : docs_id
Pathname.new(File.expand_path("~/Library/Developer/Shared/Documentation/DocSets/#{company_id}.#{name.gsub(/ /,'-')}.docset")).exist?
end end
def generate(install = false) def generate(install = false)
......
...@@ -450,10 +450,7 @@ module Pod ...@@ -450,10 +450,7 @@ module Pod
if pattern.directory? && options[:glob] if pattern.directory? && options[:glob]
pattern += options[:glob] pattern += options[:glob]
end end
pattern.glob
pattern.glob.map do |file|
file
end
end.flatten end.flatten
end end
end end
......
...@@ -33,12 +33,6 @@ module Pod ...@@ -33,12 +33,6 @@ module Pod
# Platform.new(:ios) # Platform.new(:ios)
# Platform.new(:ios, '4.3') # Platform.new(:ios, '4.3')
# #
# @overload initialize(name, opts)
# @deprecated Remove after adding a warning to {Podfile} class.
# @param [Symbol] name The name of platform.
# @param [Hash] opts The options to create a platform with.
# @option opts [String, Version] :deployment_target The deployment target.
#
# @overload initialize(platform) # @overload initialize(platform)
# @param [Platform] platform Another {Platform}. # @param [Platform] platform Another {Platform}.
# #
...@@ -51,23 +45,9 @@ module Pod ...@@ -51,23 +45,9 @@ 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
case @symbolic_name
when :ios
target = '4.3'
when :osx
target = '10.6'
else
target = ''
end
end
@deployment_target = Version.create(target) @deployment_target = Version.create(target)
end end
end end
...@@ -82,10 +62,6 @@ module Pod ...@@ -82,10 +62,6 @@ 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
...@@ -109,7 +85,11 @@ module Pod ...@@ -109,7 +85,11 @@ module Pod
# #
def supports?(other) def supports?(other)
other = Platform.new(other) other = Platform.new(other)
if other.deployment_target && deployment_target
(other.name == name) && (other.deployment_target <= deployment_target) (other.name == name) && (other.deployment_target <= deployment_target)
else
other.name == name
end
end end
# @return [String] A string representation including the deployment target. # @return [String] A string representation including the deployment target.
...@@ -121,7 +101,7 @@ module Pod ...@@ -121,7 +101,7 @@ module Pod
when :osx when :osx
s = 'OS X' s = 'OS X'
end end
s << " #{declared_deployment_target}" if declared_deployment_target s << " #{deployment_target}" if deployment_target
s s
end end
...@@ -134,7 +114,7 @@ module Pod ...@@ -134,7 +114,7 @@ module Pod
# @return Whether the platform requires legacy architectures for iOS. # @return Whether the platform requires legacy architectures for iOS.
# #
def requires_legacy_ios_archs? def requires_legacy_ios_archs?
(name == :ios) && (deployment_target < Version.new("4.3")) (name == :ios) && deployment_target && (deployment_target < Version.new("4.3"))
end end
end end
end end
...@@ -173,19 +173,35 @@ module Pod ...@@ -173,19 +173,35 @@ module Pod
end end
# Specifies the platform for which a static library should be build. # Specifies the platform for which a static library should be build.
#
# This can be either `:osx` for Mac OS X applications, or `:ios` for iOS # This can be either `:osx` for Mac OS X applications, or `:ios` for iOS
# applications. # applications.
# #
# For iOS applications, you can set the deployment target by passing a :deployment_target # @param [Symbol] name The name of platform.
# option, e.g: # @param [String, Version] target The optional deployment.
# If not provided a default value according to the platform name will
# be assigned.
#
# @example
# #
# platform :ios, :deployment_target => "4.0" # platform :ios, "4.0"
# platform :ios
# #
# If the deployment target requires it (< 4.3), armv6 will be added to ARCHS. # @note If the deployment target requires it (< 4.3), armv6 will be added
# to ARCHS.
# #
def platform(platform, options={}) def platform(name, target = nil)
@target_definition.platform = Platform.new(platform, options) # Support for deprecated options parameter
target = target[:deployment_target] if target.is_a?(Hash)
unless target
case name
when :ios
target = '4.3'
when :osx
target = '10.6'
end
end
@target_definition.platform = Platform.new(name, target)
end end
# Specifies the Xcode workspace that should contain all the projects. # Specifies the Xcode workspace that should contain all the projects.
......
...@@ -17,7 +17,7 @@ describe "Pod::Command::Setup" do ...@@ -17,7 +17,7 @@ describe "Pod::Command::Setup" do
it "returns the read only URL of the `master' spec-repo" do it "returns the read only URL of the `master' spec-repo" do
cmd = Pod::Command::Setup.new(argv) cmd = Pod::Command::Setup.new(argv)
cmd.url.should == 'git://github.com/CocoaPods/Specs.git' cmd.url.should == 'https://github.com/CocoaPods/Specs.git'
end end
it "returns the push URL of the `master' spec-repo" do it "returns the push URL of the `master' spec-repo" do
......
...@@ -102,13 +102,13 @@ describe "Pod::Command::Spec#lint" do ...@@ -102,13 +102,13 @@ describe "Pod::Command::Spec#lint" do
it "lints a repo" do it "lints a repo" do
# The fixture has warnings so it raises # The fixture has warnings so it raises
cmd = command('spec', 'lint', 'master') cmd = command('spec', 'lint', "#{config.repos_dir}/master")
lambda { cmd.run }.should.raise Pod::Informative lambda { cmd.run }.should.raise Pod::Informative
cmd.output.should.include "WARN" cmd.output.should.include "WARN"
end end
it "complains if no repo name or url are provided and there a no specs in the current working directory" do it "complains if it can't find any spec to lint" do
Dir.chdir(fixture('spec-repos') + 'master/JSONKit/') do Dir.chdir(temporary_directory) do
lambda { command('spec', 'lint').run }.should.raise Pod::Informative lambda { command('spec', 'lint').run }.should.raise Pod::Informative
end end
end end
......
...@@ -55,10 +55,6 @@ describe Pod::Platform do ...@@ -55,10 +55,6 @@ describe Pod::Platform do
p.deployment_target.should == Pod::Version.new('4.0.0') p.deployment_target.should == Pod::Version.new('4.0.0')
end end
it "provides a default deployment target on initialization" do
p = Pod::Platform.new(:ios)
p.deployment_target.should == Pod::Version.new('4.3')
end
end end
describe "regarding supporting platforms" do describe "regarding supporting platforms" do
......
...@@ -11,6 +11,11 @@ describe "Pod::Podfile" do ...@@ -11,6 +11,11 @@ describe "Pod::Podfile" do
podfile.target_definitions[:default].platform.should == :ios podfile.target_definitions[:default].platform.should == :ios
end end
it "provides a default deployment target if not specified" do
podfile = Pod::Podfile.new { platform :ios }
podfile.target_definitions[:default].platform.deployment_target.should == Pod::Version.new('4.3')
end
it "adds dependencies" do it "adds dependencies" do
podfile = Pod::Podfile.new { dependency 'ASIHTTPRequest'; dependency 'SSZipArchive', '>= 0.1' } podfile = Pod::Podfile.new { dependency 'ASIHTTPRequest'; dependency 'SSZipArchive', '>= 0.1' }
podfile.dependencies.size.should == 2 podfile.dependencies.size.should == 2
......
...@@ -382,7 +382,7 @@ describe "A Pod::Specification subspec" do ...@@ -382,7 +382,7 @@ describe "A Pod::Specification subspec" do
@subspec.supports_platform?(:osx).should.be.false @subspec.supports_platform?(:osx).should.be.false
@subspec.supports_platform?(:ios, '4.0').should.be.true @subspec.supports_platform?(:ios, '4.0').should.be.true
@subspec.supports_platform?(:ios, '5.0').should.be.true @subspec.supports_platform?(:ios, '5.0').should.be.true
@subsubspec.supports_platform?(:ios).should.be.false @subsubspec.supports_platform?(:ios).should.be.true
@subsubspec.supports_platform?(:osx).should.be.false @subsubspec.supports_platform?(:osx).should.be.false
@subsubspec.supports_platform?(:ios, '4.0').should.be.false @subsubspec.supports_platform?(:ios, '4.0').should.be.false
@subsubspec.supports_platform?(:ios, '5.0').should.be.true @subsubspec.supports_platform?(:ios, '5.0').should.be.true
......
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