Skip to content
Browse files

Merge pull request #528 from CocoaPods/podfile_extension

[Config] Support extension for Podfile.
  • Loading branch information...
2 parents a478de6 + 005e323 commit 4b5e91ed8c677895f124ece11a88902159b89bfb @fabiopelosin fabiopelosin committed Sep 20, 2012
Showing with 14 additions and 1 deletion.
  1. +7 −1 lib/cocoapods/config.rb
  2. +7 −0 spec/unit/config_spec.rb
View
8 lib/cocoapods/config.rb
@@ -39,7 +39,13 @@ def project_pods_root
end
def project_podfile
- @project_podfile ||= project_root + 'Podfile'
+ unless @project_podfile
+ @project_podfile = project_root + 'Podfile.cocoapods'
+ unless @project_podfile.exist?
+ @project_podfile = project_root + 'Podfile'
+ end
+ end
+ @project_podfile
end
def project_lockfile
View
7 spec/unit/config_spec.rb
@@ -29,6 +29,13 @@
end
end
+ it "returns the path to the project Podfile if specified with the extension" do
+ (temporary_directory + 'Podfile.cocoapods').open('w') { |f| f << '# Yo' }
+ Dir.chdir(temporary_directory) do
+ config.project_podfile.should == Pathname.pwd + 'Podfile.cocoapods'
+ end
+ end
+
it "returns the path to the Pods directory that holds the dependencies" do
config.project_pods_root.should == Pathname.pwd + 'Pods'
end

0 comments on commit 4b5e91e

Please sign in to comment.
Something went wrong with that request. Please try again.