Sha256: f7e25093c5e913f21d9e4a53a74cbce5227e58c6208d30a33859cdad835ca191

Contents?: true

Size: 498 Bytes

Versions: 42

Compression:

Stored size: 498 Bytes

Contents

module Kontena::Cli::Certificate
  module Common
    def show_certificate(cert)
      puts "#{cert['id']}:"
      puts "  subject: #{cert['subject']}"
      puts "  valid until: #{Time.parse(cert['valid_until']).utc.strftime("%FT%TZ")}"
      if cert['alt_names'] && !cert['alt_names'].empty?
        puts "  alt names:"
        cert['alt_names'].each do |alt_name|
          puts "    - #{alt_name}"
        end
      end
      puts "  auto renewable: #{cert['auto_renewable']}"
    end
  end
end

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
krates-1.7.11 lib/kontena/cli/certificate/common.rb
krates-1.7.10 lib/kontena/cli/certificate/common.rb
krates-1.7.9 lib/kontena/cli/certificate/common.rb
krates-1.7.8 lib/kontena/cli/certificate/common.rb
krates-1.7.7 lib/kontena/cli/certificate/common.rb
krates-1.7.6 lib/kontena/cli/certificate/common.rb
krates-1.7.5 lib/kontena/cli/certificate/common.rb
krates-1.7.4 lib/kontena/cli/certificate/common.rb
krates-1.7.3 lib/kontena/cli/certificate/common.rb
krates-1.7.2 lib/kontena/cli/certificate/common.rb
krates-1.7.1 lib/kontena/cli/certificate/common.rb
krates-1.7.0 lib/kontena/cli/certificate/common.rb
krates-1.6.9 lib/kontena/cli/certificate/common.rb
krates-1.6.8 lib/kontena/cli/certificate/common.rb
krates-1.6.7 lib/kontena/cli/certificate/common.rb
krates-1.6.6 lib/kontena/cli/certificate/common.rb
krates-1.6.5 lib/kontena/cli/certificate/common.rb
krates-1.6.4 lib/kontena/cli/certificate/common.rb
krates-1.6.3 lib/kontena/cli/certificate/common.rb
krates-1.6.2 lib/kontena/cli/certificate/common.rb