Commit 0d18c2b5 authored by Eloy Duran's avatar Eloy Duran

Don't install specs which are only wrappers for subspecs.

parent 2463b914
......@@ -6,7 +6,9 @@ module Pod
end
def build_specifications
dependent_specifications.reject { |spec| spec.defined_in_set.only_part_of_other_pod? }
dependent_specifications.reject do |spec|
spec.wrapper? || spec.defined_in_set.only_part_of_other_pod?
end
end
def download_only_specifications
......
......@@ -149,6 +149,10 @@ module Pod
include Config::Mixin
def wrapper?
source_files.empty? && !subspecs.empty?
end
def subspec_by_name(name)
# Remove this spec's name from the beginning of the name we’re looking for
# and take the first component from the remainder, which is the spec we need
......
......@@ -292,12 +292,19 @@ describe "A Pod::Specification subspec" do
s.requires_arc = true
s.subspec 'FirstSubSpec' do |fss|
fss.source_files = 'some/file'
fss.subspec 'SecondSubSpec' do |sss|
end
end
end
end
it "makes a parent spec a wrapper if it has no source files of its own" do
@spec.should.be.wrapper
@spec.subspecs.first.should.not.be.wrapper
end
it "returns the top level parent spec" do
@spec.subspecs.first.top_level_parent.should == @spec
@spec.subspecs.first.subspecs.first.top_level_parent.should == @spec
......
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