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:
parent
5e93f8d96d
commit
d6dfe9daf3
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ module Fog
|
||||||
|
|
||||||
dns_name = Fog::AWS::ELB::Mock.dns_name(lb_name, @region)
|
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]$/, '')
|
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"]
|
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")
|
security_group = if supported_platforms.include?("EC2")
|
||||||
|
|
Loading…
Reference in a new issue