Commit bcae7adc authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4972 from CocoaPods/seg-podfile-explicit-file-type

[Project] Set explicit_file_type for the added Podfile file ref
parents 142d282f 5c941b19
...@@ -8,7 +8,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -8,7 +8,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements ##### Enhancements
* None. * Enable syntax highlighting on the Podfile in the generated
`Pods.xcodeproj`.
[Samuel Giddins](https://github.com/segiddins)
[#4962](https://github.com/CocoaPods/CocoaPods/issues/4962)
##### Bug Fixes ##### Bug Fixes
......
...@@ -215,10 +215,11 @@ module Pod ...@@ -215,10 +215,11 @@ module Pod
# @return [PBXFileReference] The new file reference. # @return [PBXFileReference] The new file reference.
# #
def add_podfile(podfile_path) def add_podfile(podfile_path)
podfile_ref = new_file(podfile_path, :project) new_file(podfile_path, :project).tap do |podfile_ref|
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.explicit_file_type = 'text.script.ruby'
podfile_ref podfile_ref.last_known_file_type = 'text'
end
end end
# Adds a new build configuration to the project and populates it with # Adds a new build configuration to the project and populates it with
......
...@@ -374,6 +374,7 @@ module Pod ...@@ -374,6 +374,7 @@ module Pod
f = @project['Podfile'] f = @project['Podfile']
f.source_tree.should == 'SOURCE_ROOT' f.source_tree.should == 'SOURCE_ROOT'
f.xc_language_specification_identifier.should == 'xcode.lang.ruby' f.xc_language_specification_identifier.should == 'xcode.lang.ruby'
f.explicit_file_type.should == 'text.script.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