From a2f4b5f883e45193aa1f13a7f92d12ece53e6835 Mon Sep 17 00:00:00 2001 From: Fabio Pelosin Date: Tue, 8 Oct 2013 19:27:59 +0200 Subject: [PATCH] [PodTargetInstaller] Hot fix for resources bundles --- .../installer/target_installer/pod_target_installer.rb | 7 ------- .../target_installer/pod_target_installer_spec.rb | 8 +++++--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/cocoapods/installer/target_installer/pod_target_installer.rb b/lib/cocoapods/installer/target_installer/pod_target_installer.rb index bd75e8a5fc..a49e903702 100644 --- a/lib/cocoapods/installer/target_installer/pod_target_installer.rb +++ b/lib/cocoapods/installer/target_installer/pod_target_installer.rb @@ -42,7 +42,6 @@ def add_files_to_build_phases source_files = file_accessor.source_files file_refs = source_files.map { |sf| project.reference_for_path(sf) } target.add_file_references(file_refs, flags) - end end end @@ -64,7 +63,6 @@ def add_resources_bundle_targets next end file_references = paths.map { |sf| project.reference_for_path(sf) } - group = project.group_for_spec(file_accessor.spec.name, :products) bundle_target = project.new_resources_bundle(bundle_name, file_accessor.spec_consumer.platform_name) bundle_target.add_resources(file_references) @@ -87,12 +85,7 @@ def create_xcconfig_file public_gen = Generator::XCConfig::PublicPodXCConfig.new(library) UI.message "- Generating public xcconfig file at #{UI.path(path)}" do public_gen.save_as(path) - # - # TODO add_file_to_support_group(path) - # relative_path = path.relative_path_from(sandbox.root) - # group = project.group_for_spec(library.root_spec.name, :support_files) - # group.new_file(relative_path) end path = library.xcconfig_private_path diff --git a/spec/unit/installer/target_installer/pod_target_installer_spec.rb b/spec/unit/installer/target_installer/pod_target_installer_spec.rb index ddc021a679..6d3865d3e6 100644 --- a/spec/unit/installer/target_installer/pod_target_installer_spec.rb +++ b/spec/unit/installer/target_installer/pod_target_installer_spec.rb @@ -47,7 +47,7 @@ module Pod it 'adds the target for the static library to the project' do @installer.install! @project.targets.count.should == 1 - @project.targets.first.name.should == 'Pods-BananaLib' + @project.targets.first.name.should == 'Pods-BananaLib' end it "sets VALIDATE_PRODUCT to YES for the Release configuration for iOS targets" do @@ -102,8 +102,10 @@ module Pod #--------------------------------------# - xit 'adds the resource bundle targets' do - + it 'adds the resource bundle targets' do + @pod_target.file_accessors.first.stubs(:resource_bundles).returns({'banana_bundle' => []}) + @installer.install! + @project.targets.map(&:name).should == ["Pods-BananaLib", "banana_bundle"] end xit 'adds the build configurations to the resources bundle targets' do