Sha256: 2f1d2cc73f54c9f83f6aa3f764060b3fb698200de9bf2eb349ca267b04ed4d0c

Contents?: true

Size: 978 Bytes

Versions: 4

Compression:

Stored size: 978 Bytes

Contents

command :'certificates:list' do |c|
  c.syntax = 'ios certificates:list [development|distribution]'
  c.summary = 'Lists the Certificates'
  c.description = ''

  c.action do |args, options|
    type = args.first.downcase.to_sym rescue nil
    certificates = agent.list_certificates(type ||= :development)

    say_warning "No #{type} certificates found." and abort if certificates.empty?

    table = Terminal::Table.new do |t|
      t << ["Name", "Provisioning Profiles", "Expiration Date", "Status"]
      t.add_separator
      certificates.each do |certificate|
        status = case certificate.status
                 when "Issued"
                   certificate.status.green
                 else
                   certificate.status.red
                 end

        t << [certificate.name, certificate.provisioning_profiles.join("\n"), certificate.expiration_date, status]
      end
    end

    puts table
  end
end

alias_command :certificates, :'certificates:list'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cupertino-0.3.2 ./lib/cupertino/provisioning_portal/commands/certificates.rb
cupertino-0.3.1 ./lib/cupertino/provisioning_portal/commands/certificates.rb
cupertino-0.3.0 ./lib/cupertino/provisioning_portal/commands/certificates.rb
cupertino-0.2.0 ./lib/cupertino/provisioning_portal/commands/certificates.rb