Commit 44661e54 authored by Fabio Pelosin's avatar Fabio Pelosin

[Project] Add the Podfile to the Pods project.

parent e85feb56
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
- The subversion downloader now does an export instead of a checkout, which - The subversion downloader now does an export instead of a checkout, which
makes it play nicer with SCMs that store metadata in each directory. makes it play nicer with SCMs that store metadata in each directory.
[#245](https://github.com/CocoaPods/CocoaPods/issues/245) [#245](https://github.com/CocoaPods/CocoaPods/issues/245)
- Now the Podfile is added to the Pods project for convenient editing.
###### Bug fixes ###### Bug fixes
......
...@@ -12,8 +12,11 @@ end ...@@ -12,8 +12,11 @@ end
module Pod module Pod
class Project < Xcodeproj::Project class Project < Xcodeproj::Project
include Config::Mixin
def initialize(*) def initialize(*)
super super
main_group << files.new('path' => config.project_podfile.to_s, 'xcLanguageSpecificationIdentifier' => 'xcode.lang.ruby')
main_group << groups.new('name' => 'Pods') main_group << groups.new('name' => 'Pods')
@user_build_configurations = [] @user_build_configurations = []
end end
......
...@@ -11,6 +11,15 @@ describe 'Pod::Project' do ...@@ -11,6 +11,15 @@ describe 'Pod::Project' do
end.first end.first
end end
it "adds the Podfile configured as a Ruby file" do
find_object({
'isa' => 'PBXFileReference',
'name' => 'Podfile',
'sourceTree' => 'SOURCE_ROOT',
'xcLanguageSpecificationIdentifier' => 'xcode.lang.ruby'
}).should.not == nil
end
it "adds a group to the `Pods' group" do it "adds a group to the `Pods' group" do
group = @project.add_spec_to_group('JSONKit', @project.pods) group = @project.add_spec_to_group('JSONKit', @project.pods)
@project.pods.child_references.should.include group.uuid @project.pods.child_references.should.include group.uuid
......
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