Permalink
Browse files

[Config] Support extension for Podfile.

  • Loading branch information...
1 parent 818f390 commit 005e323e8fb7293333fd94e42ddbd50b775e724e @fabiopelosin fabiopelosin committed Sep 18, 2012
Showing with 14 additions and 1 deletion.
  1. +7 −1 lib/cocoapods/config.rb
  2. +7 −0 spec/unit/config_spec.rb
View
@@ -38,7 +38,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
@@ -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 005e323

Please sign in to comment.