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