aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorDino Maric <dino.onex@gmail.com>2017-08-05 00:57:02 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2017-08-04 17:57:02 -0500
commit3179f089be4f631b9c0f8b431567992164f2bdb4 (patch)
tree3df6f7a6901e3105f43173e725ce3f95d30b8e7b /activestorage
parentb9f0eb24ed6a86aec3881b43e6b0028a306465b2 (diff)
downloadrails-3179f089be4f631b9c0f8b431567992164f2bdb4.tar.gz
rails-3179f089be4f631b9c0f8b431567992164f2bdb4.tar.bz2
rails-3179f089be4f631b9c0f8b431567992164f2bdb4.zip
Rename Azure to AzureStorage (#30057)
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/lib/active_storage/service.rb2
-rw-r--r--activestorage/lib/active_storage/service/azure_storage_service.rb (renamed from activestorage/lib/active_storage/service/azure_service.rb)2
-rw-r--r--activestorage/lib/active_storage/service/configurator.rb2
-rw-r--r--activestorage/test/controllers/direct_uploads_controller_test.rb4
-rw-r--r--activestorage/test/service/azure_storage_service_test.rb (renamed from activestorage/test/service/azure_service_test.rb)2
-rw-r--r--activestorage/test/service/configurations.yml4
6 files changed, 8 insertions, 8 deletions
diff --git a/activestorage/lib/active_storage/service.rb b/activestorage/lib/active_storage/service.rb
index f6b4877759..4223295ed8 100644
--- a/activestorage/lib/active_storage/service.rb
+++ b/activestorage/lib/active_storage/service.rb
@@ -7,7 +7,7 @@ require "active_storage/log_subscriber"
# * +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
diff --git a/activestorage/lib/active_storage/service/azure_service.rb b/activestorage/lib/active_storage/service/azure_storage_service.rb
index a505b9a0ee..527dc57eeb 100644
--- a/activestorage/lib/active_storage/service/azure_service.rb
+++ b/activestorage/lib/active_storage/service/azure_storage_service.rb
@@ -4,7 +4,7 @@ require "azure/storage/core/auth/shared_access_signature"
# 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:)
diff --git a/activestorage/lib/active_storage/service/configurator.rb b/activestorage/lib/active_storage/service/configurator.rb
index 00ae24d251..a0afdaa912 100644
--- a/activestorage/lib/active_storage/service/configurator.rb
+++ b/activestorage/lib/active_storage/service/configurator.rb
@@ -22,7 +22,7 @@ class ActiveStorage::Service::Configurator #:nodoc:
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
diff --git a/activestorage/test/controllers/direct_uploads_controller_test.rb b/activestorage/test/controllers/direct_uploads_controller_test.rb
index b9f9bd8cb4..e056b629bb 100644
--- a/activestorage/test/controllers/direct_uploads_controller_test.rb
+++ b/activestorage/test/controllers/direct_uploads_controller_test.rb
@@ -69,7 +69,7 @@ else
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 @@ if SERVICE_CONFIGURATIONS[:azure]
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
diff --git a/activestorage/test/service/azure_service_test.rb b/activestorage/test/service/azure_storage_service_test.rb
index fb617db019..e2be510b60 100644
--- a/activestorage/test/service/azure_service_test.rb
+++ b/activestorage/test/service/azure_storage_service_test.rb
@@ -2,7 +2,7 @@ require "service/shared_service_tests"
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
diff --git a/activestorage/test/service/configurations.yml b/activestorage/test/service/configurations.yml
index 90b6baf0db..d7aa672573 100644
--- a/activestorage/test/service/configurations.yml
+++ b/activestorage/test/service/configurations.yml
@@ -21,9 +21,9 @@ s3:
# }
# project:
# bucket:
-#
+#
# azure:
-# service: Azure
+# service: AzureStorage
# path: ""
# storage_account_name: ""
# storage_access_key: ""