lib/jets/aws_info.rb in jets-0.6.2 vs lib/jets/aws_info.rb in jets-0.6.3

- old
+ new

@@ -3,11 +3,11 @@ class AwsInfo extend Memoist include AwsServices def region - return 'us-east-1' if ENV['TEST'] + return 'us-east-1' if test? region = nil # First try to get it from the ~/.aws/config region = `aws configure get region`.strip rescue nil @@ -26,11 +26,15 @@ end memoize :region # aws sts get-caller-identity def account - return '123456789' if ENV['TEST'] + return '123456789' if test? sts.get_caller_identity.account end memoize :account + + def test? + ENV['TEST'] || ENV['CIRCLECI'] + end end end \ No newline at end of file