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
a9cabe6b
Commit
a9cabe6b
authored
Jul 03, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Installer] Fix issue with subspecs and target dependencies
Closes #1170 Closes #1168
parent
5aef67a5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
4 deletions
+38
-4
installer.rb
lib/cocoapods/installer.rb
+8
-2
pod_target.rb
lib/cocoapods/target/pod_target.rb
+8
-2
installer_spec.rb
spec/unit/installer_spec.rb
+18
-0
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+4
-0
No files found.
lib/cocoapods/installer.rb
View file @
a9cabe6b
...
@@ -339,8 +339,14 @@ module Pod
...
@@ -339,8 +339,14 @@ module Pod
add_dependency
(
aggregate_target
,
pod_target
)
add_dependency
(
aggregate_target
,
pod_target
)
pod_target
.
dependencies
.
each
do
|
dep
|
pod_target
.
dependencies
.
each
do
|
dep
|
pod_dependency_target
=
aggregate_target
.
pod_targets
.
find
{
|
target
|
target
.
root_spec
.
name
==
dep
}
unless
dep
==
pod_target
.
pod_name
add_dependency
(
pod_target
,
pod_dependency_target
)
pod_dependency_target
=
aggregate_target
.
pod_targets
.
find
{
|
target
|
target
.
pod_name
==
dep
}
# TODO remove me
unless
pod_dependency_target
puts
"[BUG] DEP:
#{
dep
}
"
end
add_dependency
(
pod_target
,
pod_dependency_target
)
end
end
end
end
end
end
end
...
...
lib/cocoapods/target/pod_target.rb
View file @
a9cabe6b
...
@@ -43,18 +43,24 @@ module Pod
...
@@ -43,18 +43,24 @@ module Pod
specs
.
map
{
|
spec
|
spec
.
consumer
(
platform
)
}
specs
.
map
{
|
spec
|
spec
.
consumer
(
platform
)
}
end
end
# @return [Specification]
t
he root specification for the target.
# @return [Specification]
T
he root specification for the target.
#
#
def
root_spec
def
root_spec
specs
.
first
.
root
specs
.
first
.
root
end
end
# @return [String] The name of the Pod that this target refers to.
#
def
pod_name
root_spec
.
name
end
# @return [Array<String>] The names of the Pods on which this target
# @return [Array<String>] The names of the Pods on which this target
# depends.
# depends.
#
#
def
dependencies
def
dependencies
specs
.
map
do
|
spec
|
specs
.
map
do
|
spec
|
spec
.
consumer
(
platform
).
dependencies
.
map
{
|
dep
|
dep
.
name
}
spec
.
consumer
(
platform
).
dependencies
.
map
{
|
dep
|
Specification
.
root_name
(
dep
.
name
)
}
end
.
flatten
end
.
flatten
end
end
...
...
spec/unit/installer_spec.rb
View file @
a9cabe6b
...
@@ -286,6 +286,24 @@ module Pod
...
@@ -286,6 +286,24 @@ module Pod
#--------------------------------------#
#--------------------------------------#
describe
"#set_target_dependencies"
do
xit
"sets the pod targets as dependencies of the aggregate target"
do
end
xit
"sets the dependecies of the pod targets"
do
end
xit
"is robusts against subspecs"
do
end
end
#--------------------------------------#
describe
"#write_pod_project"
do
describe
"#write_pod_project"
do
before
do
before
do
...
...
spec/unit/target/pod_target_spec.rb
View file @
a9cabe6b
...
@@ -30,6 +30,10 @@ module Pod
...
@@ -30,6 +30,10 @@ module Pod
@pod_target
.
root_spec
.
name
.
should
==
'BananaLib'
@pod_target
.
root_spec
.
name
.
should
==
'BananaLib'
end
end
it
"returns the name of the Pod"
do
@pod_target
.
pod_name
.
should
==
'BananaLib'
end
it
"returns the name of the Pods on which this target depends"
do
it
"returns the name of the Pods on which this target depends"
do
@pod_target
.
dependencies
.
should
==
[
"monkey"
]
@pod_target
.
dependencies
.
should
==
[
"monkey"
]
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