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
e9d352d0
Commit
e9d352d0
authored
Jan 12, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Resolver] Ensure specs are ordered properly by version & source preference
parent
03b5ba94
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
resolver_spec.rb
spec/unit/resolver_spec.rb
+48
-0
No files found.
spec/unit/resolver_spec.rb
View file @
e9d352d0
...
@@ -737,6 +737,54 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
...
@@ -737,6 +737,54 @@ Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by
UI
.
warnings
.
should
.
match
/multiple specifications/
UI
.
warnings
.
should
.
match
/multiple specifications/
end
end
it
'chooses the first source in a complicated scenario'
do
test_repo1
=
MockSource
.
new
(
'test_repo1'
)
do
pod
'Core'
,
'1.0.0'
do
test_spec
end
pod
'Core'
,
'1.0.1'
do
test_spec
end
pod
'Data'
,
'1.0.0'
do
|
s
|
s
.
dependency
'Core'
,
'~> 1.0'
test_spec
{
|
ts
|
ts
.
dependency
'Testing'
,
'~> 1.0'
}
end
pod
'Data'
,
'1.0.1'
do
|
s
|
s
.
dependency
'Core'
,
'~> 1.0'
test_spec
{
|
ts
|
ts
.
dependency
'Testing'
,
'~> 1.0'
}
end
pod
'Testing'
,
'1.0.0'
do
|
s
|
s
.
dependency
'Core'
end
pod
'Testing'
,
'1.0.1'
do
|
s
|
s
.
dependency
'Core'
end
end
test_repo2
=
MockSource
.
new
(
'test_repo2'
)
do
pod
'Core'
,
'1.0.1'
do
test_spec
end
pod
'Data'
,
'1.0.1'
do
|
s
|
s
.
dependency
'Core'
,
'~> 1.0'
test_spec
{
|
ts
|
ts
.
dependency
'Testing'
,
'~> 1.0'
}
end
pod
'Testing'
,
'1.0.1'
do
|
s
|
s
.
dependency
'Core'
end
end
sources
=
[
test_repo1
,
test_repo2
]
podfile
=
Podfile
.
new
do
platform
:ios
,
'9.0'
pod
'Data/Tests'
,
'~> 1.0'
pod
'Data'
,
'~> 1.0'
end
resolver
=
Resolver
.
new
(
config
.
sandbox
,
podfile
,
empty_graph
,
sources
)
resolver
.
resolve
.
values
.
flatten
.
map
{
|
rs
|
rs
.
spec
.
to_s
}.
sort
.
should
==
[
'Core (1.0.1)'
,
'Data (1.0.1)'
,
'Data/Tests (1.0.1)'
,
'Testing (1.0.1)'
]
end
it
'does not warn when multiple sources contain a pod but a dependency '
\
it
'does not warn when multiple sources contain a pod but a dependency '
\
'has an explicit source specified'
do
'has an explicit source specified'
do
test_repo_url
=
config
.
sources_manager
.
source_with_name_or_url
(
'test_repo'
).
url
test_repo_url
=
config
.
sources_manager
.
source_with_name_or_url
(
'test_repo'
).
url
...
...
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