Commit 8c8c6de9 authored by Chris Eidhof's avatar Chris Eidhof

Command to list all available pods

parent aa4549fe
......@@ -3,6 +3,7 @@ module Pod
autoload :Install, 'cocoapods/command/install'
autoload :Repo, 'cocoapods/command/repo'
autoload :Search, 'cocoapods/command/search'
autoload :List, 'cocoapods/command/list'
autoload :Setup, 'cocoapods/command/setup'
autoload :Spec, 'cocoapods/command/spec'
......@@ -35,6 +36,7 @@ module Pod
"\n" \
" * $ pod setup --help\n" \
" * $ pod search --help\n" \
" * $ pod list --help\n" \
" * $ pod install --help\n" \
" * $ pod repo --help\n" \
" * $ pod spec --help"
......@@ -72,6 +74,7 @@ module Pod
when 'install' then Install
when 'repo' then Repo
when 'search' then Search
when 'list' then List
when 'setup' then Setup
when 'spec' then Spec
end
......
module Pod
class Command
class List < Command
def self.banner
%{List all pods:
$ pod list
Lists all available pods.}
end
def initialize(argv)
end
def run
Source.search_by_name('', false).each do |set|
puts "==> #{set.name} (#{set.versions.reverse.join(", ")})"
puts " #{set.specification.summary.strip}"
puts
end
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment