Class: HerokuConfig::AwsRotate
- Includes:
- AwsKeyNameMap
- Defined in:
- lib/heroku_config/aws_rotate.rb
Defined Under Namespace
Classes: MaxKeysError
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ AwsRotate
constructor
A new instance of AwsRotate.
- #run ⇒ Object
Methods included from AwsKeyNameMap
#id_key_name, #secret_key_name
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ AwsRotate
Returns a new instance of AwsRotate.
6 7 8 9 |
# File 'lib/heroku_config/aws_rotate.rb', line 6 def initialize(={}) @options = @app = [:app] end |
Instance Method Details
#run ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/heroku_config/aws_rotate.rb', line 11 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 |