Commit 93b38c13 authored by Fabio Pelosin's avatar Fabio Pelosin

Merge branch 'master' into pods-project-edit-feature

* master:
  [Project] Define CocoaPods build settings explicitely
  [Source] Don't load the specs in #search
  [Installer] Recreate and hide user schemes.
  [Xcodeproj] Adapt for interface change.
  [Gemfile] Use coveralls from rubygems
  [CHANGELOG] More tweaking related to Xcode 5 migration.
  [CHANGELOG] Try to reword notes related to Xcode 5.
  Depend on version 3.2 or greater of activesupport
  [Core] Add documentation_url DSL attribute to specification
  [Xcconfig] Reference vendored libraries & frameworks with a relative path
  [Fixtures] Sort the Pods project by name
  [Xcodeproj] Sort the Pods project by name
  [Bundle] udpate
  Remove stray debug puts
  New sentence works better here in the default podspec documentation.
  Fixed a typo on the word 'include' in the default podspec documentation.

Conflicts:
	lib/cocoapods/installer.rb
	lib/cocoapods/installer/user_project_integrator/target_integrator.rb
	lib/cocoapods/project.rb
	spec/cocoapods-integration-specs
	spec/unit/installer/user_project_integrator/target_integrator_spec.rb
	spec/unit/project_spec.rb
parents 6d53f280 cce22a68
...@@ -2,6 +2,41 @@ ...@@ -2,6 +2,41 @@
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
###### Enhancements
* CocoaPods now creates and hides the schemes of its targets during the
installation.
[#1185](https://github.com/CocoaPods/CocoaPods/pull/1185)
[@irrationalfab](https://github.com/irrationalfab)
* The Pods project now is sorted by name.
[#1389](https://github.com/CocoaPods/CocoaPods/pull/1389)
[@irrationalfab](https://github.com/irrationalfab)
* Added the `documentation_url` DSL attribute to the specifications.
[#1273](https://github.com/CocoaPods/CocoaPods/pull/1273)
[@irrationalfab](https://github.com/irrationalfab)
###### Bug Fixes
* The search paths of vendored frameworks and libraries now are always
specified relatively.
[#1405](https://github.com/CocoaPods/CocoaPods/pull/1405)
[@irrationalfab](https://github.com/irrationalfab)
* Fix an issue where CocoaPods would fail to work when used with an older
version of activesupport. This fix raises the dependency version to
the earliest compatible version of activesupport.
[Kyle Fuller](https://github.com/kylef)
[#1407](https://github.com/CocoaPods/CocoaPods/issues/1407)
* CocoaPods will not attempt to load anymore all the version of a specification
preventing crashes if those are incompatible.
[#1272](https://github.com/CocoaPods/CocoaPods/pull/1272)
[@irrationalfab](https://github.com/irrationalfab)
## 0.25.0 ## 0.25.0
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.24.0...0.25.0) [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.24.0...0.25.0)
[cocoapods-core](https://github.com/CocoaPods/Core/compare/0.24.0...0.25.0) [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.24.0...0.25.0)
...@@ -14,13 +49,15 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -14,13 +49,15 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
The generated Pods Xcode project is now compatible with `arm64` projects and The generated Pods Xcode project is now compatible with `arm64` projects and
is updated to use Xcode 5’s default settings removing all warnings. is updated to use Xcode 5’s default settings removing all warnings.
**NOTE to Xcode 4 users:** **NOTE to users migrating projects from Xcode 4, or are still using Xcode 4:**
1. This means that the Pods Xcode project now sets the `ONLY_ACTIVE_ARCH` 1. The Pods Xcode project now sets the `ONLY_ACTIVE_ARCH` build setting to
build setting to `YES` in the `Debug` configuration. You’ll have to set the `YES` in the `Debug` configuration. You _will_ have to set the same on your
same on your project/target, otherwise the build _will_ fail. project/target, otherwise the build _will_ fail.
2. When building a **iOS** project from the command-line with the `xcodebuild` 2. Ensure your project/target has an `ARCHS` value set, otherwise the build
tool you’ll need to completely disable this setting by appending to your _will_ fail.
build command: `ONLY_ACTIVE_ARCH=NO`. 3. When building a **iOS** project from the command-line, with the `xcodebuild`
tool that comes with Xcode 4, you’ll need to completely disable this setting
by appending to your build command: `ONLY_ACTIVE_ARCH=NO`.
[#1352](https://github.com/CocoaPods/CocoaPods/pull/1352) [#1352](https://github.com/CocoaPods/CocoaPods/pull/1352)
......
...@@ -18,7 +18,7 @@ group :development do ...@@ -18,7 +18,7 @@ group :development do
gem "mocha-on-bacon" gem "mocha-on-bacon"
gem 'prettybacon', :git => 'https://github.com/irrationalfab/PrettyBacon.git', :branch => 'master' gem 'prettybacon', :git => 'https://github.com/irrationalfab/PrettyBacon.git', :branch => 'master'
gem "rake" gem "rake"
gem 'coveralls', :require => false, :git => 'https://github.com/lemurheavy/coveralls-ruby.git' gem 'coveralls', :require => false
# Explicitly add this, otherwise it might sometimes be missing: # Explicitly add this, otherwise it might sometimes be missing:
# https://github.com/lemurheavy/coveralls-ruby/blob/master/coveralls-ruby.gemspec#L23. # https://github.com/lemurheavy/coveralls-ruby/blob/master/coveralls-ruby.gemspec#L23.
gem 'simplecov' gem 'simplecov'
......
...@@ -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: 1a7b59ccd0dd2d6593a991005b75f71d0e5b5bdf revision: 11e6a7fad3231da7f58cb5d9e39b8bde75adb5dd
branch: master branch: master
specs: specs:
cocoapods-core (0.25.0) cocoapods-core (0.25.0)
...@@ -17,16 +17,16 @@ GIT ...@@ -17,16 +17,16 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Xcodeproj.git remote: https://github.com/CocoaPods/Xcodeproj.git
revision: d6927a91a486d51d71f90618c5bf3c20a82ab48b revision: c1751f473d90f7dd03c0433c88b6178ec2f13080
branch: master branch: master
specs: specs:
xcodeproj (0.11.1) xcodeproj (0.11.1)
activesupport (~> 3.0) activesupport (~> 3.2)
colored (~> 1.2) colored (~> 1.2)
GIT GIT
remote: https://github.com/CocoaPods/cocoapods-downloader.git remote: https://github.com/CocoaPods/cocoapods-downloader.git
revision: 91052d25156dbc9e283cea9c0a46b77819d613bf revision: e1d5a83fcd4c22e2f54e4a3517c69405c5acad55
branch: master branch: master
specs: specs:
cocoapods-downloader (0.2.0) cocoapods-downloader (0.2.0)
...@@ -47,22 +47,11 @@ GIT ...@@ -47,22 +47,11 @@ GIT
prettybacon (0.0.1) prettybacon (0.0.1)
bacon (~> 1.2) bacon (~> 1.2)
GIT
remote: https://github.com/lemurheavy/coveralls-ruby.git
revision: b1a5dcc23a4a9cb02a6a1560c63861d102530cd9
specs:
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
PATH PATH
remote: . remote: .
specs: specs:
cocoapods (0.25.0) cocoapods (0.25.0)
activesupport (~> 3.0) activesupport (~> 3.2)
claide (~> 0.3.2) claide (~> 0.3.2)
cocoapods-core (= 0.25.0) cocoapods-core (= 0.25.0)
cocoapods-downloader (~> 0.2.0) cocoapods-downloader (~> 0.2.0)
...@@ -82,6 +71,12 @@ GEM ...@@ -82,6 +71,12 @@ GEM
bacon (1.2.0) bacon (1.2.0)
coderay (1.0.9) coderay (1.0.9)
colored (1.2) colored (1.2)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
diffy (3.0.1) diffy (3.0.1)
escape (0.0.4) escape (0.0.4)
ffi (1.9.0) ffi (1.9.0)
...@@ -142,7 +137,7 @@ DEPENDENCIES ...@@ -142,7 +137,7 @@ DEPENDENCIES
cocoapods! cocoapods!
cocoapods-core! cocoapods-core!
cocoapods-downloader! cocoapods-downloader!
coveralls! coveralls
diffy diffy
github-markup github-markup
kicker! kicker!
......
...@@ -36,7 +36,7 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA ...@@ -36,7 +36,7 @@ s.files = Dir["lib/**/*.rb"] + %w{ bin/pod bin/sandbox-pod README.md LICENSE CHA
s.add_runtime_dependency 'escape', '~> 0.0.4' s.add_runtime_dependency 'escape', '~> 0.0.4'
s.add_runtime_dependency 'json', '~> 1.8' s.add_runtime_dependency 'json', '~> 1.8'
s.add_runtime_dependency 'open4', '~> 1.3' s.add_runtime_dependency 'open4', '~> 1.3'
s.add_runtime_dependency 'activesupport', '~> 3.0' s.add_runtime_dependency 'activesupport', '~> 3.2'
s.add_development_dependency 'bacon', '~> 1.1' s.add_development_dependency 'bacon', '~> 1.1'
......
...@@ -13,7 +13,6 @@ module Pod ...@@ -13,7 +13,6 @@ module Pod
# #
class Informative < PlainInformative class Informative < PlainInformative
def message def message
puts "CALL"
"[!] #{super}".red "[!] #{super}".red
end end
end end
......
...@@ -518,7 +518,7 @@ Pod::Spec.new do |s| ...@@ -518,7 +518,7 @@ Pod::Spec.new do |s|
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
# #
# CocoaPods is smart about how it include source code, for source files # CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any h, m, mm, c & cpp files. For header # giving a folder will include any h, m, mm, c & cpp files. For header
# files it will include any header in the folder. # files it will include any header in the folder.
# Not including the public_header_files will make all headers public. # Not including the public_header_files will make all headers public.
......
...@@ -75,7 +75,7 @@ module Pod ...@@ -75,7 +75,7 @@ module Pod
# #
def self.add_framework_build_settings(framework_path, xcconfig, sandbox_root) def self.add_framework_build_settings(framework_path, xcconfig, sandbox_root)
name = File.basename(framework_path, ".framework") name = File.basename(framework_path, ".framework")
dirname = File.dirname(framework_path).sub(sandbox_root.to_s, '$(PODS_ROOT)') dirname = '$(PODS_ROOT)/' + framework_path.dirname.relative_path_from(sandbox_root).to_s
build_settings = { build_settings = {
'OTHER_LDFLAGS' => "-framework #{name}", 'OTHER_LDFLAGS' => "-framework #{name}",
'FRAMEWORK_SEARCH_PATHS' => quote([dirname]) 'FRAMEWORK_SEARCH_PATHS' => quote([dirname])
...@@ -94,7 +94,7 @@ module Pod ...@@ -94,7 +94,7 @@ module Pod
# #
def self.add_library_build_settings(library_path, xcconfig, sandbox_root) def self.add_library_build_settings(library_path, xcconfig, sandbox_root)
name = File.basename(library_path, ".a").sub(/\Alib/, '') name = File.basename(library_path, ".a").sub(/\Alib/, '')
dirname = File.dirname(library_path).sub(sandbox_root.to_s, '$(PODS_ROOT)') dirname = '$(PODS_ROOT)/' + library_path.dirname.relative_path_from(sandbox_root).to_s
build_settings = { build_settings = {
'OTHER_LDFLAGS' => "-l#{name}", 'OTHER_LDFLAGS' => "-l#{name}",
'LIBRARY_SEARCH_PATHS' => quote([dirname]) 'LIBRARY_SEARCH_PATHS' => quote([dirname])
......
...@@ -101,7 +101,7 @@ module Pod ...@@ -101,7 +101,7 @@ module Pod
frameworks = user_project.frameworks_group frameworks = user_project.frameworks_group
native_targets.each do |native_target| native_targets.each do |native_target|
library = frameworks.files.select { |f| f.path == target.product_name }.first || library = frameworks.files.select { |f| f.path == target.product_name }.first ||
frameworks.new_static_library(target.name) frameworks.new_product_ref_for_target(target.name, :static_library)
unless native_target.frameworks_build_phase.files_references.include?(library) unless native_target.frameworks_build_phase.files_references.include?(library)
native_target.frameworks_build_phase.add_file_reference(library) native_target.frameworks_build_phase.add_file_reference(library)
end end
......
...@@ -18,6 +18,15 @@ module Pod ...@@ -18,6 +18,15 @@ module Pod
@refs_by_absolute_path = {} @refs_by_absolute_path = {}
end end
# @return [void] Prepares the project with the build settings used by
# CocoaPods.
#
def set_cocoapods_defaults
build_configurations.each do |configuration|
configuration.build_settings['CLANG_ENABLE_OBJC_ARC'] = 'NO'
end
end
# @return [Hash] The names of the specification subgroups by key. # @return [Hash] The names of the specification subgroups by key.
# #
ROOT_GROUPS = { ROOT_GROUPS = {
...@@ -52,6 +61,8 @@ module Pod ...@@ -52,6 +61,8 @@ module Pod
# @return [void] # @return [void]
# #
def prepare_for_serialization def prepare_for_serialization
set_cocoapods_defaults
recreate_user_schemes(false)
pods.remove_from_project if pods.empty? pods.remove_from_project if pods.empty?
development_pods.remove_from_project if development_pods.empty? development_pods.remove_from_project if development_pods.empty?
sort sort
......
...@@ -22,6 +22,13 @@ module Pod ...@@ -22,6 +22,13 @@ module Pod
describe "#integrate!" do describe "#integrate!" do
it 'returns the targets that need to be integrated' do
pods_library = @project.frameworks_group.new_product_ref_for_target('Pods', :static_library)
@native_target.frameworks_build_phase.add_file_reference(pods_library)
@sut.stubs(:user_project).returns(@project)
@sut.send(:native_targets).map(&:name).should.be.empty?
end
before do before do
@sut.integrate! @sut.integrate!
end end
...@@ -81,7 +88,7 @@ module Pod ...@@ -81,7 +88,7 @@ module Pod
end end
it 'returns the targets that need to be integrated' do it 'returns the targets that need to be integrated' do
pods_library = @project.frameworks_group.new_static_library('Pods') pods_library = @project.frameworks_group.new_product_ref_for_target('Pods', :static_library)
@native_target.frameworks_build_phase.add_file_reference(pods_library) @native_target.frameworks_build_phase.add_file_reference(pods_library)
@sut.stubs(:user_project).returns(@project) @sut.stubs(:user_project).returns(@project)
@sut.send(:native_targets).map(&:name).should.be.empty? @sut.send(:native_targets).map(&:name).should.be.empty?
......
...@@ -38,6 +38,14 @@ module Pod ...@@ -38,6 +38,14 @@ module Pod
@sut.pods.children.map(&:name).should == ["group_1", "group_2"] @sut.pods.children.map(&:name).should == ["group_1", "group_2"]
end end
end end
it "sets the default build settings of CocoaPods" do
@sut.prepare_for_serialization
@sut.build_configurations.each do |configuration|
configuration.build_settings['CLANG_ENABLE_OBJC_ARC'].should== 'NO'
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