Sha256: ee56093b2f900ccec87d760e723347ac6d3b14c213bdaff417a7fab32802d147

Contents?: true

Size: 481 Bytes

Versions: 8

Compression:

Stored size: 481 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/base')

module KnifeJoyent
  class JoyentKeyList < Chef::Knife

    include KnifeJoyent::Base

    banner "knife joyent key list"

    def run
      keys = [
        ui.color('Name', :bold),
        ui.color('Key', :bold),
      ]

      self.connection.keys.sort_by(&:name).each do |k|
        keys << k.name
        keys << k.key[0..32] + '...'
      end

      puts ui.list(keys, :uneven_columns_across, 2)

    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
knife-joyent-0.0.10 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.0.9 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.0.7 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.0.6 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.0.5 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.0.4 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.0.3 lib/chef/knife/joyent_key_list.rb
knife-joyent-0.0.2 lib/knife-joyent/joyent_key_list.rb