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

Better formatting of conditional.

This commit is contained in:
H. Wade Minter 2011-03-24 14:20:49 -04:00
parent 8c457441d4
commit 96366efce8

View file

@ -38,7 +38,13 @@ module Fog
requires :key
@public_url ||= begin
begin response = connection.cdn.head_container(key)
response.headers['X-CDN-Enabled'] == 'True' && (connection.rackspace_cdn_ssl == true ? response.headers['X-CDN-SSL-URI'] : response.headers['X-CDN-URI'])
if response.headers['X-CDN-Enabled'] == 'True'
if connection.rackspace_cdn_ssl == true
response.headers['X-CDN-SSL-URI']
else
response.headers['X-CDN-URI']
end
end
rescue Fog::Service::NotFound
nil
end