Class: Pod::Command::RepoSq::List

Inherits:
Pod::Command::RepoSq show all
Defined in:
lib/pod/command/repo_sq/list.rb

Overview

Subclass of Pod::Command::RepoSq Provides support for the pod repo-sq list command, which lists the Square SDK repositories currently registered on the user's cocoapods local repositories store.

Instance Method Summary collapse

Instance Method Details

#runObject

Lists all Square SDK repositories registered on the current user CocoapodsRepoSq::RepositoryStore.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/pod/command/repo_sq/list.rb', line 38

def run
  repositories = repository_store.list

  repositories.each do |repository|
    UI.title "Square SDK repository: #{repository.name}" do
      UI.puts " - URL:  #{repository.url}"
      UI.puts " - Path: #{repository.path}"
    end
  end
  UI.puts "\n"

  n = repositories.length
  UI.puts "#{n} #{n != 1 ? 'repositories' : 'repository'}".green
end