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
27fec6a8
Commit
27fec6a8
authored
Nov 23, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A subspec always depends on the parent spec if the parent spec is a Subspec too.
parent
a4108542
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
specification.rb
lib/cocoapods/specification.rb
+8
-1
master
spec/fixtures/spec-repos/master
+1
-1
specification_spec.rb
spec/unit/specification_spec.rb
+6
-0
No files found.
lib/cocoapods/specification.rb
View file @
27fec6a8
...
...
@@ -395,7 +395,10 @@ module Pod
@dependencies
,
@resources
,
@clean_paths
,
@subspecs
=
[],
[],
[],
[]
@xcconfig
=
Xcodeproj
::
Config
.
new
self
.
part_of
=
top_level_parent
.
name
,
top_level_parent
.
version
# A subspec is _always_ part of the source of its top level spec.
self
.
part_of
=
top_level_parent
.
name
,
version
# A subspec has a dependency on the parent if the parent is a subspec too.
dependency
(
@parent
.
name
,
version
)
if
@parent
.
is_a?
(
Subspec
)
yield
self
if
block_given?
end
...
...
@@ -416,6 +419,10 @@ module Pod
@summary
?
@summary
:
top_level_parent
.
summary
end
def
version
top_level_parent
.
version
end
def
source
top_level_parent
.
source
end
...
...
master
@
d0a5f7b8
Subproject commit
4d304b8066a9c1d1156412d882de60eeca625659
Subproject commit
d0a5f7b8b29c6cc81ff28760d756e5fb300a9e7f
spec/unit/specification_spec.rb
View file @
27fec6a8
...
...
@@ -313,6 +313,12 @@ describe "A Pod::Specification subspec" do
@spec
.
subspecs
.
first
.
subspecs
.
first
.
part_of
.
should
==
dependency
end
it
"depends on the parent spec, if it is a subspec"
do
dependency
=
Pod
::
Dependency
.
new
(
'MainSpec'
,
'1.2.3'
).
tap
{
|
d
|
d
.
only_part_of_other_pod
=
true
}
@spec
.
subspecs
.
first
.
dependencies
.
should
==
[
dependency
]
@spec
.
subspecs
.
first
.
subspecs
.
first
.
dependencies
.
should
==
[
dependency
,
Pod
::
Dependency
.
new
(
'MainSpec/FirstSubSpec'
,
'1.2.3'
)]
end
it
"automatically forwards undefined attributes to the top level parent"
do
@spec
.
subspecs
.
first
.
summary
.
should
==
@spec
.
summary
@spec
.
subspecs
.
first
.
source
.
should
==
@spec
.
source
...
...
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