lib/awskeyring_command.rb in awskeyring-1.1.2 vs lib/awskeyring_command.rb in awskeyring-1.2.0
- old
+ new
@@ -147,11 +147,11 @@
def add(account = nil) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
account = ask_check(
existing: account, message: I18n.t('message.account'), validator: Awskeyring.method(:account_not_exists)
)
key = ask_check(
- existing: options[:key], message: I18n.t('message.key'), validator: Awskeyring::Validate.method(:access_key)
+ existing: options[:key], message: I18n.t('message.key'), validator: Awskeyring.method(:access_key_not_exists)
)
secret = ask_check(
existing: options[:secret], message: I18n.t('message.secret'),
flags: 'secure', validator: Awskeyring::Validate.method(:secret_access_key)
)
@@ -179,11 +179,11 @@
existing: account, message: I18n.t('message.account'),
validator: Awskeyring.method(:account_exists),
limited_to: Awskeyring.list_account_names
)
key = ask_check(
- existing: options[:key], message: I18n.t('message.key'), validator: Awskeyring::Validate.method(:access_key)
+ existing: options[:key], message: I18n.t('message.key'), validator: Awskeyring.method(:access_key_not_exists)
)
secret = ask_check(
existing: options[:secret], message: I18n.t('message.secret'),
flags: 'secure', validator: Awskeyring::Validate.method(:secret_access_key)
)
@@ -205,10 +205,10 @@
existing: role, message: I18n.t('message.role'),
validator: Awskeyring.method(:role_not_exists)
)
arn = ask_check(
existing: options[:arn], message: I18n.t('message.arn'),
- validator: Awskeyring::Validate.method(:role_arn)
+ validator: Awskeyring.method(:role_arn_not_exists)
)
Awskeyring.add_role(
role: role,
arn: arn