Class: Pod::Command::Binary::List

Inherits:
Pod::Command::Binary show all
Defined in:
lib/cocoapods-tdfire-binary/command/list.rb

Instance Method Summary collapse

Methods inherited from Pod::Command::Binary

#binary_config, #first_podspec, #private_sources

Constructor Details

#initialize(argv) ⇒ List



16
17
18
# File 'lib/cocoapods-tdfire-binary/command/list.rb', line 16

def initialize(argv)
  super
end

Instance Method Details

#runObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/cocoapods-tdfire-binary/command/list.rb', line 24

def run
  result = Pod::Tdfire::BinaryUrlManager.list_binary
  begin
    pods = JSON.parse(result) unless result.nil?
    pods ||= []
    pods.sort.each do |pod, versions|
      UI.puts "  #{pod + " " + versions.last}\n"
    end
    UI.puts "\n#{pods.keys.count} pods were found"
  rescue JSON::ParserError => err
    UI.puts "查看二进制信息失败, 服务器返回 #{result}".red
  end

end

#validate!Object



20
21
22
# File 'lib/cocoapods-tdfire-binary/command/list.rb', line 20

def validate!
  super
end