Commit fb7e49cb authored by Eloy Duran's avatar Eloy Duran

Make Subspec delegate license to the top level parent spec.

parent 0d18c2b5
......@@ -432,24 +432,9 @@ module Pod
@summary ? @summary : top_level_parent.summary
end
def version
top_level_parent.version
end
def platform
top_level_parent.platform
end
def source
top_level_parent.source
end
def defined_in_set
top_level_parent.defined_in_set
end
def requires_arc
top_level_parent.requires_arc
# Override the getters to always return the value of the top level parent spec.
[:version, :summary, :platform, :license, :authors, :requires_arc, :compiler_flags, :defined_in_set].each do |attr|
define_method(attr) { top_level_parent.send(attr) }
end
def copy_header_mapping(from)
......
......@@ -287,6 +287,8 @@ describe "A Pod::Specification subspec" do
s.name = 'MainSpec'
s.version = '1.2.3'
s.platform = :ios
s.license = 'MIT'
s.author = 'Joe the Plumber'
s.summary = 'A spec with subspecs'
s.source = { :git => '/some/url' }
s.requires_arc = true
......@@ -328,7 +330,7 @@ describe "A Pod::Specification subspec" do
end
it "automatically forwards undefined attributes to the top level parent" do
[:version, :summary, :platform, :requires_arc, :compiler_flags].each do |attr|
[:version, :summary, :platform, :license, :authors, :requires_arc, :compiler_flags].each do |attr|
@spec.subspecs.first.send(attr).should == @spec.send(attr)
@spec.subspecs.first.subspecs.first.send(attr).should == @spec.send(attr)
end
......
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