Class: Rig::Command::Account::Main
- Inherits:
-
Rig::Command::Abstract
- Object
- Clamp::Command
- Rig::Command::Abstract
- Rig::Command::Account::Main
- Defined in:
- lib/rig/command/account.rb
Overview
TODO: figure out how to make this work with YAML references class Change < Abstract
PROPS = %w{awsid awskey dnszone region}
parameter "PROPERTY", "the property of config to change, must be one of #{PROPS.inspect}"
parameter "VALUE", "the value to set for the property"
def execute
case property
when "awsid"
Rig.account[:common][:aws_access_key_id] = value
Rig.save_account
when "awskey"
Rig.account[:common][:aws_secret_access_key] = value
Rig.save_account
when "dnszone"
Rig.account[:dns_zone] = value
Rig.save_account
when "region"
Rig.account[:region] = value
Rig.save_account
else
puts "Property #{property} not supported"
end
end
end