Skip to content

Commit

Permalink
Add AzureRM to support authenticated_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitrino committed Feb 18, 2019
1 parent a91ab69 commit 73dc05d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/carrierwave/storage/fog.rb
Expand Up @@ -177,7 +177,7 @@ def attributes

##
# 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
#
Expand All @@ -186,7 +186,7 @@ def attributes
# [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)
Expand Down
2 changes: 1 addition & 1 deletion spec/storage/fog_helper.rb
Expand Up @@ -438,7 +438,7 @@ class FogSpec#{fog_credentials[:provider]}Uploader < CarrierWave::Uploader::Base
end

it "should have an authenticated_url" do
if ['AWS', 'Rackspace', 'Google', 'OpenStack'].include?(@provider)
if ['AWS', 'Rackspace', 'Google', 'OpenStack', 'AzureRM'].include?(@provider)
expect(@fog_file.authenticated_url).not_to be_nil
end
end
Expand Down

0 comments on commit 73dc05d

Please sign in to comment.