Commit bf195d74 authored by Eloy Duran's avatar Eloy Duran

Update Xcodeproj and fix changes needed and a few specs.

parent 8e182444
Subproject commit 0c238db95a890b9a07546a6c54ce9b84ab39dbf7 Subproject commit f44b042cdcd4e4d314f15b146adb1970fc634ae4
...@@ -41,25 +41,22 @@ module Pod ...@@ -41,25 +41,22 @@ module Pod
framework = project.add_system_framework(platform == :ios ? 'Foundation' : 'Cocoa') framework = project.add_system_framework(platform == :ios ? 'Foundation' : 'Cocoa')
framework.group = project.groups.new({ 'name' => 'Frameworks' }) framework.group = project.groups.new({ 'name' => 'Frameworks' })
project.main_group << framework.group project.main_group << framework.group
products = project.groups.new({ 'name' => 'Products' })
project.main_group << products
project.root_object.products = products
configuration_list = project.objects.add(Xcodeproj::Project::Object::XCConfigurationList, { configuration_list = project.objects.add(Xcodeproj::Project::Object::XCConfigurationList, {
'defaultConfigurationIsVisible' => '0', 'defaultConfigurationIsVisible' => '0',
'defaultConfigurationName' => 'Release', 'defaultConfigurationName' => 'Release',
}) })
config = configuration_list.build_configurations.new( configuration_list.build_configurations.new(
'name' => 'Debug', 'name' => 'Debug',
'buildSettings' => build_settings(platform, :debug) 'buildSettings' => build_settings(platform, :debug)
) )
configuration_list.build_configurations.new( configuration_list.build_configurations.new(
'name' => 'Release', 'name' => 'Release',
'buildSettings' => build_settings(platform, :release) 'buildSettings' => build_settings(platform, :release)
) )
project.root_object.attributes['buildConfigurationList'] = configuration_list.uuid project.root_object.attributes['buildConfigurationList'] = configuration_list.uuid
end end
end end
......
...@@ -68,7 +68,7 @@ module Pod ...@@ -68,7 +68,7 @@ module Pod
def base_project_configurations_on_xcconfig(project, xcconfig_file) def base_project_configurations_on_xcconfig(project, xcconfig_file)
project.targets.each do |target| project.targets.each do |target|
target.build_configurations.each do |config| target.build_configurations.each do |config|
config.baseConfiguration = xcconfig_file config.base_configuration = xcconfig_file
end end
end end
end end
...@@ -76,7 +76,7 @@ module Pod ...@@ -76,7 +76,7 @@ module Pod
def add_pods_library_to_each_target_in_project(project, pods_library) def add_pods_library_to_each_target_in_project(project, pods_library)
project.targets.each do |target| project.targets.each do |target|
target.frameworks_build_phases.each do |build_phase| target.frameworks_build_phases.each do |build_phase|
build_phase.files << pods_library.buildFiles.new build_phase.files << pods_library.build_files.new
end end
end end
end end
......
...@@ -32,7 +32,7 @@ describe Pod::ProjectIntegration do ...@@ -32,7 +32,7 @@ describe Pod::ProjectIntegration do
@sample_project.targets.each do |target| @sample_project.targets.each do |target|
target.build_configurations.each do |config| target.build_configurations.each do |config|
config.baseConfiguration.should == xcconfig_file config.base_configuration.should == xcconfig_file
end end
end end
end end
...@@ -52,7 +52,7 @@ describe Pod::ProjectIntegration do ...@@ -52,7 +52,7 @@ describe Pod::ProjectIntegration do
it 'adds a Copy Pods Resources build phase to each target' do it 'adds a Copy Pods Resources build phase to each target' do
@sample_project.targets.each do |target| @sample_project.targets.each do |target|
expected_phase = target.shell_script_build_phases.where(:name => "Copy Pods Resources") expected_phase = target.shell_script_build_phases.where(:name => "Copy Pods Resources")
expected_phase.shellScript.strip.should == "\"${SRCROOT}/Pods/Pods-resources.sh\"".strip expected_phase.shell_script.strip.should == "\"${SRCROOT}/Pods/Pods-resources.sh\"".strip
end end
end end
end end
......
...@@ -56,4 +56,7 @@ end ...@@ -56,4 +56,7 @@ end
def copy_fixture_to_pod(name, pod) def copy_fixture_to_pod(name, pod)
path = SpecHelper::Fixture.fixture(name) path = SpecHelper::Fixture.fixture(name)
FileUtils.cp_r(path, pod.root) FileUtils.cp_r(path, pod.root)
end end
\ No newline at end of file
SpecHelper::Fixture.fixture('banana-lib') # ensure it exists
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