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
db625911
Commit
db625911
authored
Nov 22, 2013
by
Stefan Damm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added flag --pod-versions to list command
parent
333828bd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
list.rb
lib/cocoapods/command/list.rb
+4
-2
user_interface.rb
lib/cocoapods/user_interface.rb
+2
-0
No files found.
lib/cocoapods/command/list.rb
View file @
db625911
...
@@ -7,7 +7,8 @@ module Pod
...
@@ -7,7 +7,8 @@ module Pod
def
self
.
options
def
self
.
options
[[
[[
"--update"
,
"Run `pod repo update` before listing"
,
"--update"
,
"Run `pod repo update` before listing"
,
"--stats"
,
"Show additional stats (like GitHub watchers and forks)"
"--stats"
,
"Show additional stats (like GitHub watchers and forks)"
,
"--pod-versions"
,
"Show latest version of each pod"
]].
concat
(
super
)
]].
concat
(
super
)
end
end
...
@@ -17,6 +18,7 @@ module Pod
...
@@ -17,6 +18,7 @@ module Pod
def
initialize
(
argv
)
def
initialize
(
argv
)
@update
=
argv
.
flag?
(
'update'
)
@update
=
argv
.
flag?
(
'update'
)
@stats
=
argv
.
flag?
(
'stats'
)
@stats
=
argv
.
flag?
(
'stats'
)
@pod_versions
=
argv
.
flag?
(
'pod-versions'
)
super
super
end
end
...
@@ -24,7 +26,7 @@ module Pod
...
@@ -24,7 +26,7 @@ module Pod
update_if_necessary!
update_if_necessary!
sets
=
SourcesManager
.
all_sets
sets
=
SourcesManager
.
all_sets
sets
.
each
{
|
set
|
UI
.
pod
(
set
,
:name
)
}
sets
.
each
{
|
set
|
UI
.
pod
(
set
,
@pod_versions
?
:
name_and_version
:
:name
)
}
UI
.
puts
"
\n
#{
sets
.
count
}
pods were found"
UI
.
puts
"
\n
#{
sets
.
count
}
pods were found"
end
end
...
...
lib/cocoapods/user_interface.rb
View file @
db625911
...
@@ -160,6 +160,8 @@ module Pod
...
@@ -160,6 +160,8 @@ module Pod
def
pod
(
set
,
mode
=
:normal
,
statistics_provider
=
nil
)
def
pod
(
set
,
mode
=
:normal
,
statistics_provider
=
nil
)
if
mode
==
:name
if
mode
==
:name
puts_indented
set
.
name
puts_indented
set
.
name
elsif
mode
==
:name_and_version
puts_indented
"
#{
set
.
name
}
#{
set
.
versions
.
first
.
version
}
"
else
else
pod
=
Specification
::
Set
::
Presenter
.
new
(
set
,
statistics_provider
)
pod
=
Specification
::
Set
::
Presenter
.
new
(
set
,
statistics_provider
)
title
(
"
\n
->
#{
pod
.
name
}
(
#{
pod
.
version
}
)"
.
green
,
''
,
1
)
do
title
(
"
\n
->
#{
pod
.
name
}
(
#{
pod
.
version
}
)"
.
green
,
''
,
1
)
do
...
...
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