Commit 4dcef288 authored by Fabio Pelosin's avatar Fabio Pelosin

[Xcodeproj] Adapt for improved path handling

parent c06de172
...@@ -17,7 +17,7 @@ GIT ...@@ -17,7 +17,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Xcodeproj.git remote: https://github.com/CocoaPods/Xcodeproj.git
revision: 230cd26ab0c73c70e6017458a8eea920e5f76233 revision: b1878be0ea3e2f212a2f61be089c757d13b637db
branch: paths-refactor branch: paths-refactor
specs: specs:
xcodeproj (0.9.0) xcodeproj (0.9.0)
......
...@@ -126,8 +126,7 @@ module Pod ...@@ -126,8 +126,7 @@ module Pod
# @return [PBXFileReference] the file reference of the added file. # @return [PBXFileReference] the file reference of the added file.
# #
def add_file_to_support_group(path) def add_file_to_support_group(path)
relative_path = path.relative_path_from(sandbox.root) support_files_group.new_file(path)
support_files_group.new_file(relative_path)
end end
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
......
...@@ -157,7 +157,7 @@ module Pod ...@@ -157,7 +157,7 @@ module Pod
existing = file_reference(file) existing = file_reference(file)
unless existing unless existing
file = Pathname.new(file) file = Pathname.new(file)
ref = group.new_file(relativize(file)) ref = group.new_file(file)
@refs_by_absolute_path[file] = ref @refs_by_absolute_path[file] = ref
end end
end end
...@@ -166,7 +166,7 @@ module Pod ...@@ -166,7 +166,7 @@ module Pod
# TODO: missing customization for file reference # TODO: missing customization for file reference
# #
def add_file_reference(absolute_path, group) def add_file_reference(absolute_path, group)
ref = group.new_file(relativize(absolute_path)) ref = group.new_file(absolute_path)
@refs_by_absolute_path[absolute_path] = ref @refs_by_absolute_path[absolute_path] = ref
end end
...@@ -192,7 +192,7 @@ module Pod ...@@ -192,7 +192,7 @@ module Pod
# #
def add_podfile(podfile_path) def add_podfile(podfile_path)
podfile_path = Pathname.new(podfile_path) podfile_path = Pathname.new(podfile_path)
podfile_ref = new_file(relativize(podfile_path)) podfile_ref = new_file(podfile_path)
podfile_ref.xc_language_specification_identifier = 'xcode.lang.ruby' podfile_ref.xc_language_specification_identifier = 'xcode.lang.ruby'
podfile_ref.last_known_file_type = 'text' podfile_ref.last_known_file_type = 'text'
podfile_ref podfile_ref
......
...@@ -83,7 +83,7 @@ module Pod ...@@ -83,7 +83,7 @@ module Pod
it "adds the Podfile configured as a Ruby file" do it "adds the Podfile configured as a Ruby file" do
@project.add_podfile(config.sandbox.root + '../Podfile') @project.add_podfile(config.sandbox.root + '../Podfile')
f = @project['Podfile'] f = @project['Podfile']
f.source_tree.should == 'SOURCE_ROOT' f.source_tree.should == '<group>'
f.xc_language_specification_identifier.should == 'xcode.lang.ruby' f.xc_language_specification_identifier.should == 'xcode.lang.ruby'
f.path.should == '../Podfile' f.path.should == '../Podfile'
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