Sha256: ce571f0f9b6f7e74b65fd9803dbb4acb10cd74b1e9f23ae654dc734d64fca66e

Contents?: true

Size: 974 Bytes

Versions: 16

Compression:

Stored size: 974 Bytes

Contents

require 'json'
require 'cocoapods-tdfire-binary/binary_url_manager'

module Pod
  class Command
    class Binary < Command
      class List < Binary

        self.abstract_command = false
        self.summary = '查看所有二进制版本信息'
        self.description = <<-DESC
					查看所有二进制版本信息
        DESC

        def initialize(argv)
          super
        end

        def validate!
          super
        end

        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
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cocoapods-tdfire-binary-2.0.9 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-2.0.8 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-2.0.7 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-2.0.6 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-2.0.5 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-2.0.4 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-2.0.3 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.30 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.29 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.28 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.26 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.25 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.24 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.23 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.22 lib/cocoapods-tdfire-binary/command/list.rb
cocoapods-tdfire-binary-1.4.21 lib/cocoapods-tdfire-binary/command/list.rb