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
187c93b2
Commit
187c93b2
authored
Oct 16, 2014
by
Samuel E. Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ResolverSpec] Add specs for empty podfile and 3-way conflict
parent
2a4df8e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
30 deletions
+24
-30
Gemfile.lock
Gemfile.lock
+1
-1
resolver_spec.rb
spec/unit/resolver_spec.rb
+23
-29
No files found.
Gemfile.lock
View file @
187c93b2
...
...
@@ -18,7 +18,7 @@ GIT
GIT
remote: https://github.com/CocoaPods/Molinillo.git
revision:
b66281386b4d226801afc8fd02cb6514c80b81b6
revision:
9e8ae0cc7fe3534b64555a4a4312c3c741824d2a
branch: master
specs:
molinillo (0.0.1)
...
...
spec/unit/resolver_spec.rb
View file @
187c93b2
...
...
@@ -60,6 +60,15 @@ module Pod
specs
=
resolver
.
specs_by_target
.
values
.
flatten
specs
.
map
(
&
:to_s
).
should
==
[
'Reachability (3.0.0)'
]
end
it
'resolves an empty podfile'
do
@podfile
=
Podfile
.
new
do
platform
:ios
end
resolver
=
Resolver
.
new
(
config
.
sandbox
,
@podfile
,
[],
SourcesManager
.
all
)
specs
=
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:to_s
).
sort
specs
.
should
==
[]
end
end
#-------------------------------------------------------------------------#
...
...
@@ -100,6 +109,20 @@ module Pod
'RestKit/Support (0.20.1)'
,
'SOCKit (1.1)'
,
'TransitionKit (1.1.0)'
]
end
it
'resolves three-way conflicts'
do
@podfile
=
Podfile
.
new
do
platform
:ios
,
'7.0'
pod
'AFAmazonS3Client'
# latest version (2.0.0) requires 'AFNetworking', '~> 2.0'
pod
'CargoBay'
# latest version (2.1.0) requires 'AFNetworking', '~> 2.2'
pod
'AFOAuth2Client'
# latest version (0.1.2) requires 'AFNetworking', '~> 1.3'
end
resolver
=
Resolver
.
new
(
config
.
sandbox
,
@podfile
,
[],
SourcesManager
.
all
)
specs
=
resolver
.
resolve
.
values
.
flatten
.
map
(
&
:to_s
).
sort
specs
.
should
==
[
'AFAmazonS3Client (1.0.1)'
,
'AFNetworking (1.3.4)'
,
'AFOAuth2Client (0.1.2)'
,
'CargoBay (1.0.0)'
]
end
it
'holds the context state, such as cached specification sets'
do
@resolver
.
resolve
cached_sets
=
@resolver
.
send
(
:cached_sets
)
...
...
@@ -253,35 +276,6 @@ module Pod
version
.
to_s
.
should
==
'1.4'
end
xit
'takes into account locked implicit dependencies'
do
podfile
=
Podfile
.
new
do
platform
:ios
,
'8.0'
pod
'ARAnalytics/Mixpanel'
end
lockfile_yaml
=
<<-
EOS
PODS:
- ARAnalytics/CoreIOS (2.8.0)
- ARAnalytics/Mixpanel (2.8.0):
- ARAnalytics/CoreIOS
- Mixpanel
- Mixpanel (2.5.1)
DEPENDENCIES:
- ARAnalytics/Mixpanel
SPEC CHECKSUMS:
ARAnalytics: 93c5b65989145f88f4d45e262612eac277b0c219
Mixpanel: 0115466ba70fd12e67ac4d3d071408dd1d489657
COCOAPODS: 0.33.1
EOS
lockfile
=
Lockfile
.
new
(
YAMLHelper
.
load_string
(
lockfile_yaml
))
resolver
=
Resolver
.
new
(
config
.
sandbox
,
podfile
,
lockfile
.
dependencies
,
SourcesManager
.
master
)
resolver
.
resolve
.
values
.
first
.
find
{
|
s
|
s
.
name
==
'Mixpanel'
}.
version
.
to_s
.
should
==
'2.5.1'
end
it
'consults all sources when finding a matching spec'
do
podfile
=
Podfile
.
new
do
platform
:ios
...
...
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