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
cb2d9967
Commit
cb2d9967
authored
Aug 23, 2012
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[outdated] Don’t show pods that can't be checked.
parent
4954dbed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
37 deletions
+14
-37
outdated.rb
lib/cocoapods/command/outdated.rb
+9
-32
resolver.rb
lib/cocoapods/resolver.rb
+4
-4
resolver_spec.rb
spec/unit/resolver_spec.rb
+1
-1
No files found.
lib/cocoapods/command/outdated.rb
View file @
cb2d9967
...
@@ -6,7 +6,8 @@ module Pod
...
@@ -6,7 +6,8 @@ module Pod
$ pod outdated
$ pod outdated
Shows the outdated pods in the current Podfile.lock.}
Shows the outdated pods in the current Podfile.lock, but only those from
spec repos, not those from local/external sources or `:head' versions.}
end
end
def
self
.
options
def
self
.
options
...
@@ -30,41 +31,17 @@ module Pod
...
@@ -30,41 +31,17 @@ module Pod
resolver
.
update_mode
=
true
resolver
.
update_mode
=
true
resolver
.
update_external_specs
=
false
resolver
.
update_external_specs
=
false
resolver
.
resolve
resolver
.
resolve
pods_to_install
=
resolver
.
pods_to_install
external_pods
=
resolver
.
pods_from_external_sources
known_update_specs
=
[]
names
=
resolver
.
pods_to_install
-
resolver
.
pods_from_external_sources
head_mode_specs
=
[]
specs
=
resolver
.
specs
.
select
do
|
spec
|
resolver
.
specs
.
each
do
|
s
|
names
.
include?
(
spec
.
name
)
&&
!
spec
.
version
.
head?
next
if
external_pods
.
include?
(
s
.
name
)
next
unless
pods_to_install
.
include?
(
s
.
name
)
if
s
.
version
.
head?
head_mode_specs
<<
s
.
name
else
known_update_specs
<<
s
.
to_s
end
end
end
if
pods_to_install
.
empty?
if
specs
.
empty?
puts
"
\n
No updates are available.
\n
"
.
yellow
puts
"
No updates are available.
"
.
yellow
else
else
puts
"The following updates are available:"
.
green
unless
known_update_specs
.
empty?
puts
" - "
<<
specs
.
join
(
"
\n
- "
)
<<
"
\n
"
puts
"
\n
The following updates are available:"
.
green
puts
" - "
<<
known_update_specs
.
join
(
"
\n
- "
)
<<
"
\n
"
end
unless
head_mode_specs
.
empty?
puts
"
\n
The following pods might present updates as they are in head mode:"
.
green
puts
" - "
<<
head_mode_specs
.
join
(
"
\n
- "
)
<<
"
\n
"
end
unless
(
external_pods
).
empty?
puts
"
\n
The following pods might present updates as they loaded from an external source:"
.
green
puts
" - "
<<
external_pods
.
join
(
"
\n
- "
)
<<
"
\n
"
end
puts
end
end
end
end
end
end
...
...
lib/cocoapods/resolver.rb
View file @
cb2d9967
...
@@ -120,13 +120,13 @@ module Pod
...
@@ -120,13 +120,13 @@ module Pod
def
pods_to_install
def
pods_to_install
unless
@pods_to_install
unless
@pods_to_install
if
lockfile
if
lockfile
@pods_to_install
=
specs
.
select
{
|
spec
|
@pods_to_install
=
specs
.
select
do
|
spec
|
spec
.
version
!=
lockfile
.
pods_versions
[
spec
.
pod_name
]
spec
.
version
!=
lockfile
.
pods_versions
[
spec
.
pod_name
]
}
.
map
(
&
:name
)
end
.
map
(
&
:name
)
if
update_mode
if
update_mode
@pods_to_install
+=
specs
.
select
{
|
spec
|
@pods_to_install
+=
specs
.
select
do
|
spec
|
spec
.
version
.
head?
||
pods_from_external_sources
.
include?
(
spec
.
pod_name
)
spec
.
version
.
head?
||
pods_from_external_sources
.
include?
(
spec
.
pod_name
)
}
.
map
(
&
:name
)
end
.
map
(
&
:name
)
end
end
@pods_to_install
+=
@pods_by_state
[
:added
]
+
@pods_by_state
[
:changed
]
@pods_to_install
+=
@pods_by_state
[
:added
]
+
@pods_by_state
[
:changed
]
else
else
...
...
spec/unit/resolver_spec.rb
View file @
cb2d9967
...
@@ -326,7 +326,7 @@ module Pod
...
@@ -326,7 +326,7 @@ module Pod
@resolver
.
should_install?
(
"JSONKit"
).
should
.
be
.
true
@resolver
.
should_install?
(
"JSONKit"
).
should
.
be
.
true
end
end
it
"respects the constraints of the pofile"
do
it
"respects the constraints of the po
d
file"
do
podfile
=
Podfile
.
new
do
podfile
=
Podfile
.
new
do
platform
:ios
platform
:ios
pod
'BlocksKit'
pod
'BlocksKit'
...
...
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