Commit 64fa978e authored by Marius Rackwitz's avatar Marius Rackwitz

[PodVariantSet] Use all subspecs if there are no default specs

parent 163794e0
...@@ -93,9 +93,15 @@ module Pod ...@@ -93,9 +93,15 @@ module Pod
# #
def scope_by_specs def scope_by_specs
root_spec = variants.first.root_spec root_spec = variants.first.root_spec
default_specs = Set.new([root_spec] + root_spec.default_subspecs.map do |subspec_name| specs = [root_spec]
root_spec.subspec_by_name("#{root_spec.name}/#{subspec_name}") if root_spec.default_subspecs.empty?
end) specs += root_spec.subspecs.compact
else
specs += root_spec.default_subspecs.map do |subspec_name|
root_spec.subspec_by_name("#{root_spec.name}/#{subspec_name}")
end
end
default_specs = Set.new(specs)
grouped_variants = group_by(&:specs) grouped_variants = group_by(&:specs)
all_spec_variants = grouped_variants.map { |set| set.variants.first.specs } all_spec_variants = grouped_variants.map { |set| set.variants.first.specs }
common_specs = all_spec_variants.map(&:to_set).flatten.inject(&:&) common_specs = all_spec_variants.map(&:to_set).flatten.inject(&:&)
......
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