Commit e1a6ccf0 authored by Eloy Duran's avatar Eloy Duran

Update for latest Xcodeproj.

parent a212f19c
GIT GIT
remote: git://github.com/CocoaPods/Xcodeproj.git remote: git://github.com/CocoaPods/Xcodeproj.git
revision: 21d9afe2ffde71f15b7a77a43d8fa97552eb6044 revision: 455192a27d22990363d3719662a6eb1ee683cd87
specs: specs:
xcodeproj (0.1.0) xcodeproj (0.1.0)
...@@ -22,8 +22,8 @@ GEM ...@@ -22,8 +22,8 @@ GEM
open4 (1.3.0) open4 (1.3.0)
rake (0.9.2.2) rake (0.9.2.2)
rb-fsevent (0.9.0) rb-fsevent (0.9.0)
vcr (2.0.0) vcr (2.0.1)
webmock (1.8.4) webmock (1.8.5)
addressable (>= 2.2.7) addressable (>= 2.2.7)
crack (>= 0.1.7) crack (>= 0.1.7)
......
...@@ -86,7 +86,7 @@ module Pod ...@@ -86,7 +86,7 @@ module Pod
end.reject do |target| end.reject do |target|
# reject any target that already has this Pods library in one of its frameworks build phases # reject any target that already has this Pods library in one of its frameworks build phases
target.frameworks_build_phases.any? do |phase| target.frameworks_build_phases.any? do |phase|
phase.files.any? { |build_file| build_file.file.name == @target_definition.lib_name } phase.files.any? { |file| file.name == @target_definition.lib_name }
end end
end end
end end
...@@ -104,9 +104,7 @@ module Pod ...@@ -104,9 +104,7 @@ module Pod
def add_pods_library def add_pods_library
pods_library = @integrator.user_project.group("Frameworks").files.new_static_library(@target_definition.label) pods_library = @integrator.user_project.group("Frameworks").files.new_static_library(@target_definition.label)
targets.each do |target| targets.each do |target|
target.frameworks_build_phases.each do |build_phase| target.frameworks_build_phases.each { |build_phase| build_phase << pods_library }
build_phase.files << pods_library.build_files.new
end
end end
end end
......
...@@ -65,7 +65,7 @@ describe Pod::Installer::UserProjectIntegrator do ...@@ -65,7 +65,7 @@ describe Pod::Installer::UserProjectIntegrator do
@podfile.target_definitions.each do |_, definition| @podfile.target_definitions.each do |_, definition|
target = @sample_project.targets.where(:name => definition.link_with.first) target = @sample_project.targets.where(:name => definition.link_with.first)
framework_build_phase = target.frameworks_build_phases.first framework_build_phase = target.frameworks_build_phases.first
framework_build_phase.files.where(:file => { :name => definition.lib_name }).should.not == nil framework_build_phase.files.where(:name => definition.lib_name).should.not == nil
end end
end end
...@@ -79,7 +79,7 @@ describe Pod::Installer::UserProjectIntegrator do ...@@ -79,7 +79,7 @@ describe Pod::Installer::UserProjectIntegrator do
it "only tries to integrate Pods libraries into user targets that haven't been integrated yet" do it "only tries to integrate Pods libraries into user targets that haven't been integrated yet" do
app, test_runner = @integrator.user_project.targets.to_a app, test_runner = @integrator.user_project.targets.to_a
test_runner.frameworks_build_phases.first.files.last.destroy test_runner.frameworks_build_phases.first.build_files.last.destroy
targets = @integrator.targets.sort_by { |target| target.target_definition.label } targets = @integrator.targets.sort_by { |target| target.target_definition.label }
@integrator.stubs(:targets).returns(targets) @integrator.stubs(:targets).returns(targets)
......
...@@ -316,7 +316,7 @@ else ...@@ -316,7 +316,7 @@ else
project = Xcodeproj::Project.new(config.project_pods_root + 'Pods.xcodeproj') project = Xcodeproj::Project.new(config.project_pods_root + 'Pods.xcodeproj')
project.targets.each do |target| project.targets.each do |target|
phase = target.build_phases.find { |phase| phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase) } phase = target.build_phases.find { |phase| phase.is_a?(Xcodeproj::Project::Object::PBXSourcesBuildPhase) }
files = phase.files.map(&:file).map(&:name) files = phase.files.map(&:name)
case target.product_name case target.product_name
when 'Pods' when 'Pods'
files.should.include "ASIHTTPRequest.m" files.should.include "ASIHTTPRequest.m"
...@@ -376,8 +376,7 @@ else ...@@ -376,8 +376,7 @@ else
target.build_configurations.each do |config| target.build_configurations.each do |config|
config.base_configuration.path.should == 'Pods/Pods.xcconfig' config.base_configuration.path.should == 'Pods/Pods.xcconfig'
end end
phase = target.frameworks_build_phases.first target.frameworks_build_phases.first.files.should.include libPods
phase.files.map { |build_file| build_file.file }.should.include libPods
# should be the last phase # should be the last phase
target.build_phases.last.shell_script.should == %{"${SRCROOT}/Pods/Pods-resources.sh"\n} target.build_phases.last.shell_script.should == %{"${SRCROOT}/Pods/Pods-resources.sh"\n}
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