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
2463b914
Commit
2463b914
authored
Nov 23, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A Subspec has the same platform as the top level spec.
parent
4d074081
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
specification.rb
lib/cocoapods/specification.rb
+4
-0
specification_spec.rb
spec/unit/specification_spec.rb
+5
-8
No files found.
lib/cocoapods/specification.rb
View file @
2463b914
...
@@ -432,6 +432,10 @@ module Pod
...
@@ -432,6 +432,10 @@ module Pod
top_level_parent
.
version
top_level_parent
.
version
end
end
def
platform
top_level_parent
.
platform
end
def
source
def
source
top_level_parent
.
source
top_level_parent
.
source
end
end
...
...
spec/unit/specification_spec.rb
View file @
2463b914
...
@@ -286,6 +286,7 @@ describe "A Pod::Specification subspec" do
...
@@ -286,6 +286,7 @@ describe "A Pod::Specification subspec" do
@spec
=
Pod
::
Spec
.
new
do
|
s
|
@spec
=
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'MainSpec'
s
.
name
=
'MainSpec'
s
.
version
=
'1.2.3'
s
.
version
=
'1.2.3'
s
.
platform
=
:ios
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
...
@@ -320,14 +321,10 @@ describe "A Pod::Specification subspec" do
...
@@ -320,14 +321,10 @@ 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
@spec
.
subspecs
.
first
.
summary
.
should
==
@spec
.
summary
[
:version
,
:summary
,
:platform
,
:requires_arc
,
:compiler_flags
].
each
do
|
attr
|
@spec
.
subspecs
.
first
.
source
.
should
==
@spec
.
source
@spec
.
subspecs
.
first
.
send
(
attr
).
should
==
@spec
.
send
(
attr
)
@spec
.
subspecs
.
first
.
requires_arc
.
should
==
true
@spec
.
subspecs
.
first
.
subspecs
.
first
.
send
(
attr
).
should
==
@spec
.
send
(
attr
)
@spec
.
subspecs
.
first
.
compiler_flags
.
should
==
' -fobjc-arc'
end
@spec
.
subspecs
.
first
.
subspecs
.
first
.
summary
.
should
==
@spec
.
summary
@spec
.
subspecs
.
first
.
subspecs
.
first
.
source
.
should
==
@spec
.
source
@spec
.
subspecs
.
first
.
subspecs
.
first
.
requires_arc
.
should
==
true
@spec
.
subspecs
.
first
.
subspecs
.
first
.
compiler_flags
.
should
==
' -fobjc-arc'
end
end
it
"returns subspecs by name"
do
it
"returns subspecs by name"
do
...
...
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