Commit e6c4a42a authored by Luke Redpath's avatar Luke Redpath

Have install_dependencies! return an array of LocalPod instances so they can be used

throughout the installation process.
parent dca4cb2d
...@@ -57,21 +57,22 @@ module Pod ...@@ -57,21 +57,22 @@ module Pod
end end
def install_dependencies! def install_dependencies!
build_specifications.each do |spec| build_specifications.map do |spec|
if spec.pod_destroot.exist? || spec.local? Pod.new(sandbox, spec).tap do |pod|
message = "Using #{spec}" if spec.pod_destroot.exist? || spec.local?
message += " [LOCAL]" if spec.local? message = "Using #{spec}"
puts message unless config.silent? message += " [LOCAL]" if spec.local?
else puts message unless config.silent?
puts "Installing #{spec}" unless config.silent? else
spec = spec.part_of_specification if spec.part_of_other_pod? puts "Installing #{spec}" unless config.silent?
pod = Pod.new(sandbox, spec) spec = spec.part_of_specification if spec.part_of_other_pod?
downloader = Downloader.for_pod(pod) downloader = Downloader.for_pod(pod)
downloader.download downloader.download
if config.clean if config.clean
downloader.clean downloader.clean
pod.clean pod.clean
end
end end
end end
end end
...@@ -79,7 +80,7 @@ module Pod ...@@ -79,7 +80,7 @@ module Pod
def install! def install!
puts "Installing dependencies of: #{@podfile.defined_in_file}" if config.verbose? puts "Installing dependencies of: #{@podfile.defined_in_file}" if config.verbose?
install_dependencies! pods = install_dependencies!
root = config.project_pods_root root = config.project_pods_root
headers_symlink_root = config.headers_symlink_root headers_symlink_root = config.headers_symlink_root
......
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