Sha256: 5ec3612c14757700619cf76eb108ef7789a6ad502c5853d7b6208c62fcba8533

Contents?: true

Size: 404 Bytes

Versions: 7

Compression:

Stored size: 404 Bytes

Contents

# encoding: utf-8
require 'travis/cli'

module Travis
  module CLI
    class Pubkey < RepoCommand
      on('-p', '--[no-]pem', 'encode in format used by pem')

      def run
        say key, "Public key for #{color(repository.slug, :info)}:\n\n%s", :bold
      end

      private

        def key
          key = repository.public_key
          pem? ? key.to_s : key.to_ssh
        end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
travis-1.5.2 lib/travis/cli/pubkey.rb
travis-1.5.1 lib/travis/cli/pubkey.rb
travis-1.5.0 lib/travis/cli/pubkey.rb
travis-1.4.0 lib/travis/cli/pubkey.rb
travis-1.3.1 lib/travis/cli/pubkey.rb
travis-1.3.0 lib/travis/cli/pubkey.rb
travis-1.2.8 lib/travis/cli/pubkey.rb