提交 3179f089 编写于 作者: D Dino Maric 提交者: David Heinemeier Hansson

Rename Azure to AzureStorage (#30057)

上级 b9f0eb24
......@@ -7,7 +7,7 @@
# * +Disk+, to manage attachments saved directly on the hard drive.
# * +GCS+, to manage attachments through Google Cloud Storage.
# * +S3+, to manage attachments through Amazon S3.
# * +Azure+, to manage attachments through Microsoft Azure Storage.
# * +AzureStorage+, to manage attachments through Microsoft Azure Storage.
# * +Mirror+, to be able to use several services to manage attachments.
#
# Inside a Rails application, you can set-up your services through the
......
......@@ -4,7 +4,7 @@
# Wraps the Microsoft Azure Storage Blob Service as a Active Storage service.
# See `ActiveStorage::Service` for the generic API documentation that applies to all services.
class ActiveStorage::Service::AzureService < ActiveStorage::Service
class ActiveStorage::Service::AzureStorageService < ActiveStorage::Service
attr_reader :client, :path, :blobs, :container, :signer
def initialize(path:, storage_account_name:, storage_access_key:, container:)
......
......@@ -22,7 +22,7 @@ def config_for(name)
end
def resolve(class_name)
require "active_storage/service/#{class_name.to_s.downcase}_service"
require "active_storage/service/#{class_name.to_s.underscore}_service"
ActiveStorage::Service.const_get(:"#{class_name}Service")
end
end
......@@ -69,7 +69,7 @@ class ActiveStorage::GCSDirectUploadsControllerTest < ActionDispatch::Integratio
end
if SERVICE_CONFIGURATIONS[:azure]
class ActiveStorage::AzureDirectUploadsControllerTest < ActionDispatch::IntegrationTest
class ActiveStorage::AzureStorageDirectUploadsControllerTest < ActionDispatch::IntegrationTest
setup do
@config = SERVICE_CONFIGURATIONS[:azure]
......@@ -99,7 +99,7 @@ class ActiveStorage::AzureDirectUploadsControllerTest < ActionDispatch::Integrat
end
end
else
puts "Skipping Azure Direct Upload tests because no Azure configuration was supplied"
puts "Skipping Azure Storage Direct Upload tests because no Azure Storage configuration was supplied"
end
class ActiveStorage::DiskDirectUploadsControllerTest < ActionDispatch::IntegrationTest
......
......@@ -2,7 +2,7 @@
require "uri"
if SERVICE_CONFIGURATIONS[:azure]
class ActiveStorage::Service::AzureServiceTest < ActiveSupport::TestCase
class ActiveStorage::Service::AzureStorageServiceTest < ActiveSupport::TestCase
SERVICE = ActiveStorage::Service.configure(:azure, SERVICE_CONFIGURATIONS)
include ActiveStorage::Service::SharedServiceTests
......
......@@ -21,9 +21,9 @@ s3:
# }
# project:
# bucket:
#
#
# azure:
# service: Azure
# service: AzureStorage
# path: ""
# storage_account_name: ""
# storage_access_key: ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册