Commit 237a88d6 authored by Marius Rackwitz's avatar Marius Rackwitz

Merge remote-tracking branch 'origin/master' into clintegracon

Conflicts:
	CHANGELOG.md
parents b0d8c6b8 4965bade
...@@ -2,12 +2,11 @@ ...@@ -2,12 +2,11 @@
To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html). To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
## Master ## Master
##### Enhancements ##### Enhancements
* Display indication for deprecated pods when searching for pods * Display indication for deprecated pods when searching for Pods.
[Hugo Tunius][k0nserv] [Hugo Tunius][k0nserv]
[#2180](https://github.com/CocoaPods/CocoaPods/issues/2180) [#2180](https://github.com/CocoaPods/CocoaPods/issues/2180)
...@@ -17,7 +16,8 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -17,7 +16,8 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
##### Bug Fixes ##### Bug Fixes
* Fixed pod repo push to first check if Specs directory exists and if so push there. * Fixed pod repo push to first check if Specs directory exists and if so push
there.
[Edward Valentini](edwardvalentini) [Edward Valentini](edwardvalentini)
[#2060](https://github.com/CocoaPods/CocoaPods/issues/2060) [#2060](https://github.com/CocoaPods/CocoaPods/issues/2060)
...@@ -35,10 +35,18 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -35,10 +35,18 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Fabio Pelosin][irrationalfab] [Fabio Pelosin][irrationalfab]
[Core#132](https://github.com/CocoaPods/Core/issues/132) [Core#132](https://github.com/CocoaPods/Core/issues/132)
* Fixed missing XCTest framework in Xcode 6 * Fixed `pod init` so that it doesn't recurse when checking for Podfiles.
[Paddy O'Brien](tapi)
[#2181](https://github.com/CocoaPods/CocoaPods/issues/2181)
* Fixed missing XCTest framework in Xcode 6.
[Paul Williamson](squarefrog) [Paul Williamson](squarefrog)
[#2296](https://github.com/CocoaPods/CocoaPods/issues/2296) [#2296](https://github.com/CocoaPods/CocoaPods/issues/2296)
* Support multiple values in ARCHS.
[Robert Zuber](https://github.com/z00b)
[#1904](https://github.com/CocoaPods/CocoaPods/issues/1904)
## 0.33.1 ## 0.33.1
...@@ -245,12 +253,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -245,12 +253,11 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
[Fabio Pelosin][irrationalfab] [Fabio Pelosin][irrationalfab]
[#1021](https://github.com/CocoaPods/CocoaPods/issues/1021) [#1021](https://github.com/CocoaPods/CocoaPods/issues/1021)
* Warn when including deprecated pods * Warn when including deprecated pods
[Samuel E. Giddins](https://github.com/segiddins) [Samuel E. Giddins](https://github.com/segiddins)
[#2003](https://github.com/CocoaPods/CocoaPods/issues/2003) [#2003](https://github.com/CocoaPods/CocoaPods/issues/2003)
## 0.31.1 ## 0.31.1
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.31.1...0.31.0) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.31.1...0.31.0)
[CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.31.1...0.31.0) [CocoaPods-Core](https://github.com/CocoaPods/Core/compare/0.31.1...0.31.0)
...@@ -2466,4 +2473,3 @@ allowing you to automate Xcode related tasks. ...@@ -2466,4 +2473,3 @@ allowing you to automate Xcode related tasks.
[neonichu]: (https://github.com/neonichu) [neonichu]: (https://github.com/neonichu)
[mrackwitz]: https://github.com/mrackwitz [mrackwitz]: https://github.com/mrackwitz
[k0nserv]: https://github.com/k0nserv [k0nserv]: https://github.com/k0nserv
...@@ -7,7 +7,7 @@ GIT ...@@ -7,7 +7,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Core.git remote: https://github.com/CocoaPods/Core.git
revision: b264007943718f32c314e72952d312e92f1626c3 revision: 54327d78336f93e2301d1e8bf1c637c1a3271892
branch: master branch: master
specs: specs:
cocoapods-core (0.33.1) cocoapods-core (0.33.1)
......
...@@ -30,7 +30,7 @@ module Pod ...@@ -30,7 +30,7 @@ module Pod
def validate! def validate!
super super
raise Informative, "Existing Podfile found in directory" unless config.podfile.nil? raise Informative, "Existing Podfile found in directory" unless config.podfile_path_in_dir(Pathname.pwd).nil?
if @project_path if @project_path
help! "Xcode project at #{@project_path} does not exist" unless File.exist? @project_path help! "Xcode project at #{@project_path} does not exist" unless File.exist? @project_path
project_path = @project_path project_path = @project_path
......
...@@ -320,6 +320,8 @@ module Pod ...@@ -320,6 +320,8 @@ module Pod
'Podfile', 'Podfile',
] ]
public
# Returns the path of the Podfile in the given dir if any exists. # Returns the path of the Podfile in the given dir if any exists.
# #
# @param [Pathname] dir # @param [Pathname] dir
......
...@@ -494,12 +494,8 @@ module Pod ...@@ -494,12 +494,8 @@ module Pod
end end
archs = archs.compact.uniq.sort archs = archs.compact.uniq.sort
if archs.count > 1 UI.puts("Using `ARCHS` setting to build architectures: (`#{archs.join('`, `')}`)")
UI.warn "Found multiple values (`#{archs.join('`, `')}`) for the " \ archs.length > 1 ? archs : archs.first
"architectures (`ARCHS`) build setting for the " \
"`#{target_definition}` target definition. Using the first."
end
archs.first
end end
# Precompute the platforms for each target_definition in the Podfile # Precompute the platforms for each target_definition in the Podfile
......
...@@ -163,7 +163,7 @@ module Pod ...@@ -163,7 +163,7 @@ module Pod
else else
pod = Specification::Set::Presenter.new(set, statistics_provider) pod = Specification::Set::Presenter.new(set, statistics_provider)
title = "\n-> #{pod.name} (#{pod.version})" title = "\n-> #{pod.name} (#{pod.version})"
if pod.deprecated? if pod.spec.deprecated?
title += " #{pod.deprecation_description}" title += " #{pod.deprecation_description}"
colored_title = title.red colored_title = title.red
else else
......
...@@ -364,20 +364,20 @@ module Pod ...@@ -364,20 +364,20 @@ module Pod
it "handles an Array of ARCHs defined in a single user target" do it "handles an Array of ARCHs defined in a single user target" do
user_project = Xcodeproj::Project.new('path') user_project = Xcodeproj::Project.new('path')
target = user_project.new_target(:application, 'Target', :ios) target = user_project.new_target(:application, 'Target', :ios)
target.build_configuration_list.set_setting('ARCHS', 'armv7') target.build_configuration_list.set_setting('ARCHS', ['armv7', 'i386'])
target_definition = Podfile::TargetDefinition.new(:default, nil) target_definition = Podfile::TargetDefinition.new(:default, nil)
target_definition.set_platform(:ios, '4.0') target_definition.set_platform(:ios, '4.0')
user_targets = [target] user_targets = [target]
archs = @analyzer.send(:compute_archs_for_target_definition, target_definition, user_targets) archs = @analyzer.send(:compute_archs_for_target_definition, target_definition, user_targets)
archs.should == 'armv7' ['armv7', 'i386'].each { |a| archs.should.include a }
end end
it "handles an Array of ARCHs defined multiple user targets" do it "handles an Array of ARCHs defined multiple user targets" do
user_project = Xcodeproj::Project.new('path') user_project = Xcodeproj::Project.new('path')
targeta = user_project.new_target(:application, 'Target', :ios) targeta = user_project.new_target(:application, 'Target', :ios)
targeta.build_configuration_list.set_setting('ARCHS', 'armv7') targeta.build_configuration_list.set_setting('ARCHS', ['armv7', 'armv7s'])
targetb = user_project.new_target(:application, 'Target', :ios) targetb = user_project.new_target(:application, 'Target', :ios)
targetb.build_configuration_list.set_setting('ARCHS', ['armv7', 'i386']) targetb.build_configuration_list.set_setting('ARCHS', ['armv7', 'i386'])
...@@ -386,9 +386,8 @@ module Pod ...@@ -386,9 +386,8 @@ module Pod
user_targets = [targeta, targetb] user_targets = [targeta, targetb]
archs = @analyzer.send(:compute_archs_for_target_definition, target_definition, user_targets) archs = @analyzer.send(:compute_archs_for_target_definition, target_definition, user_targets)
archs.should == 'armv7' ['armv7', 'armv7s', 'i386'].each { |a| archs.should.include a }
end end
end end
#--------------------------------------# #--------------------------------------#
......
...@@ -195,8 +195,104 @@ module Pod ...@@ -195,8 +195,104 @@ module Pod
end end
end end
#-------------------------------------------------------------------------# #-------------------------------------------------------------------------#
describe "Pre-release versions" do
it "resolves explicitly requested pre-release versions" do
@podfile = Podfile.new do
platform :ios, '6.0'
pod 'AFNetworking', '1.0RC3'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should == ["AFNetworking (1.0RC3)"]
end
xit "resolves to latest minor version even when explicitly requesting pre-release versions when using ~>" do
@podfile = Podfile.new do
platform :ios, '6.0'
pod 'AFNetworking', '~> 1.0RC3'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.2.0)"]
end
it "does not resolve to a pre-release version implicitly when matching exact version" do
@podfile = Podfile.new do
platform :ios, '6.0'
pod 'AFNetworking', '1.0'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.0)"]
end
xit "does not resolve to a pre-release version implicitly when using <" do
@podfile = Podfile.new do
platform :ios, '6.0'
pod 'AFNetworking', '< 1.0'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (0.10.1)"]
end
it "does not resolve to a pre-release version implicitly when using <=" do
@podfile = Podfile.new do
platform :ios, '6.0'
pod 'AFNetworking', '<= 1.0'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.0)"]
end
it "does not resolve to a pre-release version implicitly when using >" do
@podfile = Podfile.new do
platform :ios, '6.0'
pod 'AFNetworking', '> 1.0', '< 1.3'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.2.1)"]
end
it "does not resolve to a pre-release version implicitly when using >=" do
@podfile = Podfile.new do
platform :ios, '6.0'
pod 'AFNetworking', '>= 1.0', '< 1.3'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.2.1)"]
end
it "does not resolve to a pre-release version implicitly when using ~>" do
@podfile = Podfile.new do
platform :ios, '6.0'
pod 'AFNetworking', '~> 1.0', '< 1.3'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs.should != ["AFNetworking (1.0RC3)"]
specs.should == ["AFNetworking (1.2.1)"]
end
end
end end
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