mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace|storage] Updates 'connection' references
`connection` is being deprecated within Fog::Model because it actually refers to the Fog::Service not the Fog::Connection. This replaces references to the instance variable to use the accessor so will continue to work following deprecation.
This commit is contained in:
parent
961be3ecd7
commit
05dffba5bf
1 changed files with 3 additions and 3 deletions
|
@ -56,17 +56,17 @@ module Fog
|
|||
requires :key
|
||||
connection.put_container(key)
|
||||
|
||||
if @connection.cdn && @public
|
||||
if connection.cdn && @public
|
||||
# if public and CDN connection then update cdn to public
|
||||
uri_header = 'X-CDN-URI'
|
||||
if connection.rackspace_cdn_ssl == true
|
||||
uri_header = 'X-CDN-SSL-URI'
|
||||
end
|
||||
@public_url = connection.cdn.put_container(key, 'X-CDN-Enabled' => 'True').headers[uri_header]
|
||||
elsif @connection.cdn && !@public
|
||||
elsif connection.cdn && !@public
|
||||
connection.cdn.put_container(key, 'X-CDN-Enabled' => 'False')
|
||||
@public_url = nil
|
||||
elsif !@connection.cdn && @public
|
||||
elsif !connection.cdn && @public
|
||||
# if public but no CDN connection then error
|
||||
raise(Fog::Storage::Rackspace::Error.new("Directory can not be set as :public without a CDN provided"))
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue