Permalink
Browse files

Store the source_root in config (if it is passed in).

  • Loading branch information...
1 parent ffbf18f commit 55955d6ac5f4c5d910d0efc8338d1bf198cec3fa @subdigital committed Feb 24, 2012
Showing with 6 additions and 1 deletion.
  1. +1 −0 lib/cocoapods/command/install.rb
  2. +5 −1 lib/cocoapods/config.rb
View
1 lib/cocoapods/command/install.rb
@@ -27,6 +27,7 @@ def initialize(argv)
config.clean = !argv.option('--no-clean')
@update_repo = !argv.option('--no-update')
@projpath = argv.shift_argument
+ config.source_root = @projpath
super unless argv.empty?
end
View
6 lib/cocoapods/config.rb
@@ -10,7 +10,7 @@ def self.instance=(instance)
@instance = instance
end
- attr_accessor :repos_dir, :project_root, :project_pods_root, :rootspec, :clean, :verbose, :silent
+ attr_accessor :repos_dir, :project_root, :source_root, :project_pods_root, :rootspec, :clean, :verbose, :silent
alias_method :clean?, :clean
alias_method :verbose?, :verbose
alias_method :silent?, :silent
@@ -26,6 +26,10 @@ def project_root
@project_root ||= Pathname.pwd
end
+ def source_root
+ @source_root ||= project_root
+ end
+
def project_pods_root
@project_pods_root ||= project_root + 'Pods'
end

0 comments on commit 55955d6

Please sign in to comment.