Commit 83096348 authored by Marius Rackwitz's avatar Marius Rackwitz

[Refactor] Extract #generate_pod_targets in Analyzer

parent 7c344bdd
...@@ -219,7 +219,23 @@ module Pod ...@@ -219,7 +219,23 @@ module Pod
end end
end end
# Group specs and subspecs by their root generate_pod_targets(target, specs)
target
end
# Setup the pod targets for an aggregate target. Group specs and subspecs
# by their root to create a {PodTarget} for each spec.
#
# @param [AggregateTarget] target
# the aggregate target
#
# @param [Array<Specification>] specs
# the specifications that need to be installed.
#
# @return [Array<PodTarget>]
#
def generate_pod_targets(target, specs)
grouped_specs = specs.map do |spec| grouped_specs = specs.map do |spec|
specs.select { |s| s.root == spec.root } specs.select { |s| s.root == spec.root }
end.uniq end.uniq
...@@ -240,7 +256,7 @@ module Pod ...@@ -240,7 +256,7 @@ module Pod
target.pod_targets << pod_target target.pod_targets << pod_target
end end
target pod_target
end end
# Generates dependencies that require the specific version of the Pods # Generates dependencies that require the specific version of the Pods
......
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