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
ae33f827
Commit
ae33f827
authored
Mar 28, 2013
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sort resolved specifications. Fixes #907.
parent
827cf407
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
sandbox_analyzer.rb
lib/cocoapods/installer/analyzer/sandbox_analyzer.rb
+2
-2
sandbox_analyzer_spec.rb
spec/unit/installer/analyzer/sandbox_analyzer_spec.rb
+2
-2
No files found.
lib/cocoapods/installer/analyzer/sandbox_analyzer.rb
View file @
ae33f827
...
@@ -190,7 +190,7 @@ module Pod
...
@@ -190,7 +190,7 @@ module Pod
# the name of the Pod.
# the name of the Pod.
#
#
def
resolved_spec_names
(
pod
)
def
resolved_spec_names
(
pod
)
specs
.
select
{
|
s
|
s
.
root
.
name
==
pod
}.
map
(
&
:name
).
uniq
specs
.
select
{
|
s
|
s
.
root
.
name
==
pod
}.
map
(
&
:name
).
uniq
.
sort
end
end
# @return [Array<String>] The name of the specifications stored in the
# @return [Array<String>] The name of the specifications stored in the
...
@@ -200,7 +200,7 @@ module Pod
...
@@ -200,7 +200,7 @@ module Pod
# the name of the Pod.
# the name of the Pod.
#
#
def
sandbox_spec_names
(
pod
)
def
sandbox_spec_names
(
pod
)
sandbox_manifest
.
pod_names
.
select
{
|
name
|
Specification
.
root_name
(
name
)
==
pod
}.
uniq
sandbox_manifest
.
pod_names
.
select
{
|
name
|
Specification
.
root_name
(
name
)
==
pod
}.
uniq
.
sort
end
end
# @return [Specification] The root specification for the Pod with the
# @return [Specification] The root specification for the Pod with the
...
...
spec/unit/installer/analyzer/sandbox_analyzer_spec.rb
View file @
ae33f827
...
@@ -130,9 +130,9 @@ module Pod
...
@@ -130,9 +130,9 @@ module Pod
@analyzer
.
send
(
:sandbox_pods
).
should
==
[
'BananaLib'
]
@analyzer
.
send
(
:sandbox_pods
).
should
==
[
'BananaLib'
]
end
end
it
"returns the name of the resolved specifications"
do
it
"returns the name of the resolved specifications
sorted by name
"
do
subspec
=
Spec
.
new
(
@spec
,
'Subspec'
)
subspec
=
Spec
.
new
(
@spec
,
'Subspec'
)
@analyzer
.
stubs
(
:specs
).
returns
([
@spec
,
sub
spec
])
@analyzer
.
stubs
(
:specs
).
returns
([
subspec
,
@
spec
])
@analyzer
.
send
(
:resolved_spec_names
,
'BananaLib'
).
should
==
[
'BananaLib'
,
'BananaLib/Subspec'
]
@analyzer
.
send
(
:resolved_spec_names
,
'BananaLib'
).
should
==
[
'BananaLib'
,
'BananaLib/Subspec'
]
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