lib/awspec/helper/finder/account_attributes.rb in awspec-1.25.1 vs lib/awspec/helper/finder/account_attributes.rb in awspec-1.25.2

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Awspec::Helper module Finder module AccountAttributes def find_ec2_account_attributes attributes = {} @@ -10,15 +12,15 @@ if attr[:attribute_name] == 'supported-platforms' # supported-platforms attributes[attr[:attribute_name].tr('-', '_').to_sym] = values else value = values.first - if value =~ /\A\d+\z/ - attributes[attr[:attribute_name].tr('-', '_').to_sym] = value.to_i - else - attributes[attr[:attribute_name].tr('-', '_').to_sym] = value - end + attributes[attr[:attribute_name].tr('-', '_').to_sym] = if value =~ /\A\d+\z/ + value.to_i + else + value + end end end attributes.to_struct end @@ -50,10 +52,10 @@ attributes.to_struct end def find_ses_send_quota ses_client.get_send_quota - rescue + rescue StandardError # Aws::Errors::NoSuchEndpointError nil end end end