Skip to content

Commit

Permalink
Merge 5c07f17 into 80b0dc9
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Aug 16, 2013
2 parents 80b0dc9 + 5c07f17 commit d4bb663
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Expand Up @@ -17,7 +17,7 @@ GIT

GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
revision: e2a6fb7466b26c3628c726271be60700bc635a62
revision: 9d2f8cef72466cb3f155a9a5a3cfb12c94802656
branch: master
specs:
xcodeproj (0.9.0)
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Expand Up @@ -220,6 +220,7 @@ namespace :spec do
title 'Running the specs'
sh "bundle exec bacon #{specs('**')}"

require 'pathname'
unless Pathname.new(ENV['HOME']+'/.cocoapods/repos/master').exist?
title 'Ensuring specs repo is up to date'
sh "./bin/pod setup"
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/command/setup.rb
Expand Up @@ -6,7 +6,7 @@ class Setup < Command
self.summary = 'Setup the CocoaPods environment'

self.description = <<-DESC
Creates a directory at `~/.cocoapods` which will hold your spec-repos.
Creates a directory at `~/.cocoapods/repos` which will hold your spec-repos.
This is where it will create a clone of the public `master` spec-repo from:
https://github.com/CocoaPods/Specs
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods/installer.rb
Expand Up @@ -285,7 +285,7 @@ def clean_pod_sources
#
def prepare_pods_project
UI.message "- Creating Pods project" do
@pods_project = Pod::Project.new(sandbox)
@pods_project = Pod::Project.new(sandbox, @podfile.target_definitions['Pods'].build_configurations)
if config.podfile_path
@pods_project.add_podfile(config.podfile_path)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/cocoapods/project.rb
Expand Up @@ -17,8 +17,8 @@ class Project < Xcodeproj::Project

# @param [Sandbox] sandbox @see #sandbox
#
def initialize(sandbox)
super(nil) # Recreate the project from scratch for now.
def initialize(sandbox, build_configurations)
super(nil, build_configurations) # Recreate the project from scratch for now.
# TODO
raise unless sandbox.is_a?(Sandbox)
@sandbox = sandbox
Expand Down
2 changes: 1 addition & 1 deletion spec/cocoapods-integration-specs
Submodule cocoapods-integration-specs updated 42 files
+0 −11 init_single_platform/after/Podfile
+136 −0 init_single_platform/after/SampleApp.xcodeproj.yaml
+0 −396 init_single_platform/after/SampleApp.xcodeproj/project.pbxproj
+1 −0 init_single_platform/after/execution_output.txt
+1 −1 install_add_pod/after/Podfile.lock
+1 −1 install_add_pod/after/Pods/Manifest.lock
+2 −2 install_add_pod/after/Pods/Pods.xcodeproj.yaml
+1 −1 install_custom_workspace/after/Podfile.lock
+1 −1 install_custom_workspace/after/Pods/Manifest.lock
+2 −2 install_custom_workspace/after/Pods/Pods.xcodeproj.yaml
+1 −1 install_external_source/after/Podfile.lock
+1 −1 install_external_source/after/Pods/Manifest.lock
+2 −2 install_external_source/after/Pods/Pods.xcodeproj.yaml
+1 −1 install_local_source/after/Podfile.lock
+1 −1 install_local_source/after/Pods/Manifest.lock
+2 −2 install_local_source/after/Pods/Pods.xcodeproj.yaml
+1 −1 install_multiple_targets/after/Podfile.lock
+1 −1 install_multiple_targets/after/Pods/Manifest.lock
+2 −2 install_multiple_targets/after/Pods/Pods.xcodeproj.yaml
+1 −1 install_new/after/Podfile.lock
+1 −1 install_new/after/Pods/Manifest.lock
+2 −2 install_new/after/Pods/Pods.xcodeproj.yaml
+5 −0 install_new/after/execution_output.txt
+1 −1 install_podfile_callbacks/after/Podfile.lock
+1 −1 install_podfile_callbacks/after/Pods/Manifest.lock
+2 −2 install_podfile_callbacks/after/Pods/Pods.xcodeproj.yaml
+1 −1 install_podspec/after/Podfile.lock
+1 −1 install_podspec/after/Pods/Manifest.lock
+2 −2 install_podspec/after/Pods/Pods.xcodeproj.yaml
+1 −1 install_remove_pod/after/Podfile.lock
+1 −1 install_remove_pod/after/Pods/Manifest.lock
+2 −2 install_remove_pod/after/Pods/Pods.xcodeproj.yaml
+1 −1 install_spec_callbacks/after/Podfile.lock
+1 −1 install_spec_callbacks/after/Pods/Manifest.lock
+2 −2 install_spec_callbacks/after/Pods/Pods.xcodeproj.yaml
+8 −0 install_spec_callbacks/after/execution_output.txt
+1 −1 install_subspecs/after/Podfile.lock
+1 −1 install_subspecs/after/Pods/Manifest.lock
+2 −2 install_subspecs/after/Pods/Pods.xcodeproj.yaml
+1 −1 update/after/Podfile.lock
+1 −1 update/after/Pods/Manifest.lock
+2 −2 update/after/Pods/Pods.xcodeproj.yaml
2 changes: 1 addition & 1 deletion spec/unit/installer/file_references_installer_spec.rb
Expand Up @@ -7,7 +7,7 @@ module Pod
@file_accessor = fixture_file_accessor('banana-lib/BananaLib.podspec')
@pod_target = PodTarget.new([], nil, config.sandbox)
@pod_target.file_accessors = [@file_accessor]
@project = Project.new(config.sandbox)
@project = Project.new(config.sandbox, nil)
@installer = Installer::FileReferencesInstaller.new(config.sandbox, [@pod_target], @project)
end

Expand Down
Expand Up @@ -9,7 +9,7 @@ module Pod
xcodeproj 'dummy'
end
@target_definition = @podfile.target_definitions['Pods']
@project = Project.new(config.sandbox)
@project = Project.new(config.sandbox, nil)

config.sandbox.project = @project
path_list = Sandbox::PathList.new(fixture('banana-lib'))
Expand Down
Expand Up @@ -9,7 +9,8 @@ module Pod
xcodeproj 'dummy'
end
@target_definition = @podfile.target_definitions['Pods']
@project = Project.new(config.sandbox)
user_build_configurations = { 'Debug' => :debug, 'Release' => :release, 'AppStore' => :release, 'Test' => :debug }
@project = Project.new(config.sandbox, user_build_configurations)

config.sandbox.project = @project
path_list = Sandbox::PathList.new(fixture('banana-lib'))
Expand All @@ -19,7 +20,7 @@ module Pod

@pod_target = PodTarget.new([@spec], @target_definition, config.sandbox)
@pod_target.stubs(:platform).returns(Platform.new(:ios, '6.0'))
@pod_target.user_build_configurations = { 'Debug' => :debug, 'Release' => :release, 'AppStore' => :release, 'Test' => :debug }
@pod_target.user_build_configurations = user_build_configurations
@pod_target.file_accessors = [file_accessor]

@installer = Installer::PodTargetInstaller.new(config.sandbox, @pod_target)
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/installer/target_installer_spec.rb
Expand Up @@ -9,7 +9,7 @@ module Pod
xcodeproj 'dummy'
end
@target_definition = @podfile.target_definitions['Pods']
@project = Project.new(config.sandbox)
@project = Project.new(config.sandbox, nil)

config.sandbox.project = @project
path_list = Sandbox::PathList.new(fixture('banana-lib'))
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/installer/user_project_integrator_spec.rb
Expand Up @@ -16,7 +16,7 @@ module Pod

end
end
config.sandbox.project = Project.new(config.sandbox)
config.sandbox.project = Project.new(config.sandbox, nil)
Xcodeproj::Project.new.save_as(config.sandbox.project_path)
@library = AggregateTarget.new(@podfile.target_definitions['Pods'], config.sandbox)
@library.client_root = sample_project_path.dirname
Expand Down
11 changes: 10 additions & 1 deletion spec/unit/installer_spec.rb
Expand Up @@ -16,7 +16,7 @@ def generate_lockfile
def generate_podfile(pods = ['JSONKit'])
podfile = Pod::Podfile.new do
platform :ios
xcodeproj 'SampleProject/SampleProject'
xcodeproj 'SampleProject/SampleProject', 'Debug' => :debug, 'Test' => :debug, 'Release' => :release, 'App Store' => :release
pods.each { |name| pod name }
end
end
Expand Down Expand Up @@ -243,6 +243,15 @@ def @installer.write_pod_project
build_setting["IPHONEOS_DEPLOYMENT_TARGET"].should == '6.0'
end
end

it "sets STRIP_INSTALLED_PRODUCT to NO for all configurations for the whole project" do
@installer.stubs(:aggregate_targets).returns([])
@installer.send(:prepare_pods_project)
@installer.pods_project.build_settings('Debug')["STRIP_INSTALLED_PRODUCT"].should == "NO"
@installer.pods_project.build_settings('Test')["STRIP_INSTALLED_PRODUCT"].should == "NO"
@installer.pods_project.build_settings('Release')["STRIP_INSTALLED_PRODUCT"].should == "NO"
@installer.pods_project.build_settings('App Store')["STRIP_INSTALLED_PRODUCT"].should == "NO"
end
end

#--------------------------------------#
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/project_spec.rb
Expand Up @@ -4,7 +4,7 @@ module Pod
describe Project do

before do
@project = Project.new(config.sandbox)
@project = Project.new(config.sandbox, nil)
end

#-------------------------------------------------------------------------#
Expand Down

0 comments on commit d4bb663

Please sign in to comment.