bin/metrics-sqs.rb in sensu-plugins-aws-2.1.0 vs bin/metrics-sqs.rb in sensu-plugins-aws-2.1.1

- old
+ new

@@ -66,14 +66,14 @@ region: config[:aws_region] } end def run - if config[:scheme] == '' - scheme = "aws.sqs.queue.#{config[:queue].tr('-', '_')}.message_count" - else - scheme = config[:scheme] - end + scheme = if config[:scheme] == '' + "aws.sqs.queue.#{config[:queue].tr('-', '_')}.message_count" + else + config[:scheme] + end begin sqs = AWS::SQS.new aws_config messages = sqs.queues.named(config[:queue]).approximate_number_of_messages