1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[aws|elb] compact possible nil

forces jruby/1.8 to behave more like 1.9+
This commit is contained in:
geemus 2013-12-23 15:10:46 -06:00
parent 5e93f8d96d
commit d6dfe9daf3

View file

@ -74,7 +74,7 @@ module Fog
dns_name = Fog::AWS::ELB::Mock.dns_name(lb_name, @region)
availability_zones = [*availability_zones]
availability_zones = [*availability_zones].compact
region = availability_zones.empty? ? "us-east-1" : availability_zones.first.gsub(/[a-z]$/, '')
supported_platforms = Fog::Compute::AWS::Mock.data[region][@aws_access_key_id][:account_attributes].detect { |h| h["attributeName"] == "supported-platforms" }["values"]
security_group = if supported_platforms.include?("EC2")