Sha256: 08905f5febdb0fe2488437dfa12572efdb3a8ec9adb7696fe4e00b895a4a7c29

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 Bytes

Contents

module HerokuConfig
  class AwsRotate < Base
    include AwsKeyNameMap
    class MaxKeysError < StandardError; end

    def initialize(options={})
      @options = options
      @app = options[:app]
    end

    def run
      key_id = config.get(id_key_name)
      unless key_id
        puts "WARN: No #{id_key_name} found for #{@app.color(:green)} app."
        if @options[:cli]
          puts "Exiting"
          exit 0
        else
          return
        end
      end

      aws_key = AwsKey.new(@options, key_id)
      aws_key.rotate
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heroku-config-0.4.0 lib/heroku_config/aws_rotate.rb