Sha256: ce886f659f60390422bb9bf70e41778ece77961252fffff7a0ac4b280c60877d

Contents?: true

Size: 310 Bytes

Versions: 40

Compression:

Stored size: 310 Bytes

Contents

require "shelly/ssh_key"

module Shelly
  class SshKeys
    def initialize
      @rsa = SshKey.new('~/.ssh/id_rsa.pub')
      @dsa = SshKey.new('~/.ssh/id_dsa.pub')
    end

    def destroy
      [@rsa, @dsa].map(&:destroy).any?
    end

    def prefered_key
      @dsa.exists? ? @dsa : @rsa
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
shelly-0.5.7 lib/shelly/ssh_keys.rb
shelly-0.5.6 lib/shelly/ssh_keys.rb
shelly-0.5.5 lib/shelly/ssh_keys.rb
shelly-0.5.4 lib/shelly/ssh_keys.rb
shelly-0.5.3 lib/shelly/ssh_keys.rb
shelly-0.5.2 lib/shelly/ssh_keys.rb
shelly-0.5.1 lib/shelly/ssh_keys.rb
shelly-0.5.0 lib/shelly/ssh_keys.rb
shelly-0.4.42 lib/shelly/ssh_keys.rb
shelly-0.4.41 lib/shelly/ssh_keys.rb
shelly-0.4.40 lib/shelly/ssh_keys.rb
shelly-0.4.39 lib/shelly/ssh_keys.rb
shelly-0.4.38 lib/shelly/ssh_keys.rb
shelly-0.4.37 lib/shelly/ssh_keys.rb
shelly-0.4.36 lib/shelly/ssh_keys.rb
shelly-0.4.35 lib/shelly/ssh_keys.rb
shelly-0.4.34 lib/shelly/ssh_keys.rb
shelly-0.4.33 lib/shelly/ssh_keys.rb
shelly-0.4.32 lib/shelly/ssh_keys.rb
shelly-0.4.31 lib/shelly/ssh_keys.rb