Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
fb7e49cb
Commit
fb7e49cb
authored
Nov 23, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Subspec delegate license to the top level parent spec.
parent
0d18c2b5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
19 deletions
+6
-19
specification.rb
lib/cocoapods/specification.rb
+3
-18
specification_spec.rb
spec/unit/specification_spec.rb
+3
-1
No files found.
lib/cocoapods/specification.rb
View file @
fb7e49cb
...
@@ -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
)
...
...
spec/unit/specification_spec.rb
View file @
fb7e49cb
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment