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
0da6c35f
Commit
0da6c35f
authored
Aug 25, 2012
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When operating on all pods, make them unique. Fixes #376.
parent
5690b44c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
installer.rb
lib/cocoapods/installer.rb
+2
-2
project.rb
lib/cocoapods/project.rb
+2
-2
Reachability
spec/fixtures/integration/Reachability
+1
-1
installer_spec.rb
spec/unit/installer_spec.rb
+2
-2
project_spec.rb
spec/unit/project_spec.rb
+2
-2
No files found.
lib/cocoapods/installer.rb
View file @
0da6c35f
...
...
@@ -23,7 +23,7 @@ module Pod
# Add all source files to the project grouped by pod
pod
.
relative_source_files_by_spec
.
each
do
|
spec
,
paths
|
parent_group
=
pod
.
local?
?
@project
.
local_pods
:
@project
.
pods
group
=
@project
.
add_spec_
to_
group
(
pod
.
name
,
parent_group
)
group
=
@project
.
add_spec_group
(
pod
.
name
,
parent_group
)
paths
.
each
do
|
path
|
group
.
files
.
new
(
'path'
=>
path
.
to_s
)
end
...
...
@@ -186,7 +186,7 @@ module Pod
# @return [Array<LocalPod>] A list of LocalPod instances for each
# dependency that is not a download-only one.
def
pods
pods_by_target
.
values
.
flatten
pods_by_target
.
values
.
flatten
.
uniq
end
def
pods_by_target
...
...
lib/cocoapods/project.rb
View file @
0da6c35f
...
...
@@ -40,11 +40,11 @@ module Pod
end
# Adds a group as child to the `Pods' group namespacing subspecs.
def
add_spec_
to_
group
(
name
,
parent_group
)
def
add_spec_group
(
name
,
parent_group
)
groups
=
parent_group
.
groups
group
=
nil
name
.
split
(
'/'
).
each
do
|
name
|
group
=
groups
.
find
{
|
g
|
g
.
name
==
name
}
||
groups
.
new
(
{
'name'
=>
name
}
)
group
=
groups
.
find
{
|
g
|
g
.
name
==
name
}
||
groups
.
new
(
'name'
=>
name
)
groups
=
group
.
groups
end
group
...
...
Reachability
@
28e0d920
Subproject commit
6116b0a386a0313d7183ea219be1b51d56962546
Subproject commit
28e0d9209ab777d227783f1f0cad6ce096d0d6a8
spec/unit/installer_spec.rb
View file @
0da6c35f
...
...
@@ -75,8 +75,8 @@ module Pod
group
.
files
.
map
(
&
:name
).
should
==
[
"Reachability.h"
,
"Reachability.m"
]
end
it
"
it list
a pod only once"
do
reachability_pods
=
@installer
.
pods
.
map
(
&
:to_s
).
select
{
|
s
|
s
.
include?
(
'Reachability'
)}
it
"
lists
a pod only once"
do
reachability_pods
=
@installer
.
pods
.
map
(
&
:to_s
).
select
{
|
s
|
s
.
include?
(
'Reachability'
)
}
reachability_pods
.
count
.
should
==
1
end
...
...
spec/unit/project_spec.rb
View file @
0da6c35f
...
...
@@ -12,7 +12,7 @@ describe 'Pod::Project' do
end
it
"adds a group to the `Pods' group"
do
group
=
@project
.
add_spec_
to_
group
(
'JSONKit'
,
@project
.
pods
)
group
=
@project
.
add_spec_group
(
'JSONKit'
,
@project
.
pods
)
@project
.
pods
.
child_references
.
should
.
include
group
.
uuid
find_object
({
'isa'
=>
'PBXGroup'
,
...
...
@@ -23,7 +23,7 @@ describe 'Pod::Project' do
end
it
"namespaces subspecs in groups"
do
group
=
@project
.
add_spec_
to_
group
(
'JSONKit/Subspec'
,
@project
.
pods
)
group
=
@project
.
add_spec_group
(
'JSONKit/Subspec'
,
@project
.
pods
)
@project
.
pods
.
groups
.
find
{
|
g
|
g
.
name
==
'JSONKit'
}.
child_references
.
should
.
include
group
.
uuid
find_object
({
'isa'
=>
'PBXGroup'
,
...
...
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