lib/carrierwave/storage/fog.rb in carrierwave-1.3.1 vs lib/carrierwave/storage/fog.rb in carrierwave-1.3.2

- old
+ new

@@ -175,20 +175,20 @@ file.attributes end ## # Return a temporary authenticated url to a private file, if available - # Only supported for AWS, Rackspace and Google providers + # Only supported for AWS, Rackspace, Google and AzureRM providers # # === Returns # # [String] temporary authenticated url # or # [NilClass] no authenticated url available # def authenticated_url(options = {}) - if ['AWS', 'Google', 'Rackspace', 'OpenStack'].include?(@uploader.fog_credentials[:provider]) + if ['AWS', 'Google', 'Rackspace', 'OpenStack', 'AzureRM'].include?(@uploader.fog_credentials[:provider]) # avoid a get by using local references local_directory = connection.directories.new(:key => @uploader.fog_directory) local_file = local_directory.files.new(:key => path) expire_at = ::Fog::Time.now + @uploader.fog_authenticated_url_expiration case @uploader.fog_credentials[:provider] @@ -198,13 +198,11 @@ local_file.url(expire_at, options) else warn "Options hash not supported in #{local_file.class}. You may need to upgrade your Fog provider." local_file.url(expire_at) end - when 'Rackspace' + when 'Rackspace', 'OpenStack' connection.get_object_https_url(@uploader.fog_directory, path, expire_at, options) - when 'OpenStack' - connection.get_object_https_url(@uploader.fog_directory, path, expire_at) else local_file.url(expire_at) end end end