Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename azure storage service #30057

Merged
merged 1 commit into from
Aug 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion activestorage/lib/active_storage/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:)
Expand Down
2 changes: 1 addition & 1 deletion activestorage/lib/active_storage/service/configurator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,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]

Expand Down Expand Up @@ -98,7 +98,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions activestorage/test/service/configurations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ s3:
# }
# project:
# bucket:
#
#
# azure:
# service: Azure
# service: AzureStorage
# path: ""
# storage_account_name: ""
# storage_access_key: ""
Expand Down