Skip to content

Commit

Permalink
[Project] Add the Podfile to the Pods project.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Aug 25, 2012
1 parent e85feb5 commit 44661e5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -33,6 +33,7 @@
- The subversion downloader now does an export instead of a checkout, which
makes it play nicer with SCMs that store metadata in each directory.
[#245](https://github.com/CocoaPods/CocoaPods/issues/245)
- Now the Podfile is added to the Pods project for convenient editing.

###### Bug fixes

Expand Down
3 changes: 3 additions & 0 deletions lib/cocoapods/project.rb
Expand Up @@ -12,8 +12,11 @@ def self.new_pod_dir(project, pod_name, path)

module Pod
class Project < Xcodeproj::Project
include Config::Mixin

def initialize(*)
super
main_group << files.new('path' => config.project_podfile.to_s, 'xcLanguageSpecificationIdentifier' => 'xcode.lang.ruby')
main_group << groups.new('name' => 'Pods')
@user_build_configurations = []
end
Expand Down
9 changes: 9 additions & 0 deletions spec/unit/project_spec.rb
Expand Up @@ -11,6 +11,15 @@ def find_object(conditions)
end.first
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
group = @project.add_spec_to_group('JSONKit', @project.pods)
@project.pods.child_references.should.include group.uuid
Expand Down

0 comments on commit 44661e5

Please sign in to comment.