class Pod::Command::List
def self.options
def self.options [[ "--update", "Run `pod repo update` before listing", "--stats", "Show additional stats (like GitHub watchers and forks)" ]].concat(super) end
def initialize(argv)
def initialize(argv) @update = argv.flag?('update') @stats = argv.flag?('stats') super end
def run
def run update_if_necessary! sets = SourcesManager.all_sets sets.each { |set| UI.pod(set, :name) } UI.puts "\n#{sets.count} pods were found" end
def update_if_necessary!
def update_if_necessary! if @update && config.verbose? UI.section("\nUpdating Spec Repositories\n".yellow) do Repo.new(ARGV.new(["update"])).run end end end