Sha256: cb8d8d59746c160d6ebb7912786276e721ad6d208a32bd40e75f1aed081eea01

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

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

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

    def run
      key_id = config.get("AWS_ACCESS_KEY_ID")
      unless key_id
        puts "WARN: No AWS_ACCESS_KEY_ID 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.3.0 lib/heroku_config/aws_rotate.rb