From 46e23a7cb3950bf18da75c2b0cbb9aa98c6dc0fa Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:12:24 +0900 Subject: [PATCH 01/13] Add AWS::Storage --- lib/fog/aws.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/fog/aws.rb b/lib/fog/aws.rb index cf5f69cc6..5d28d6501 100644 --- a/lib/fog/aws.rb +++ b/lib/fog/aws.rb @@ -17,10 +17,6 @@ module Fog autoload :AWS, File.expand_path('../aws/dns', __FILE__) end - module Storage - autoload :AWS, File.expand_path('../aws/storage', __FILE__) - end - module AWS extend Fog::Provider @@ -54,6 +50,7 @@ module Fog autoload :SNS, File.expand_path('../aws/sns', __FILE__) autoload :SQS, File.expand_path('../aws/sqs', __FILE__) autoload :STS, File.expand_path('../aws/sts', __FILE__) + autoload :Storage, File.expand_path('../aws/storage', __FILE__) autoload :Support, File.expand_path('../aws/support', __FILE__) autoload :SimpleDB, File.expand_path('../aws/simpledb', __FILE__) From 1013b696c6cecdd905e45ec02aa2cd4cf971f2f5 Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:13:06 +0900 Subject: [PATCH 02/13] git grep -l "module Storage" -- lib/fog/aws/models/storage/ | xargs sed -i "" "s/module Storage/module AWS/g" --- lib/fog/aws/models/storage/directories.rb | 2 +- lib/fog/aws/models/storage/directory.rb | 2 +- lib/fog/aws/models/storage/file.rb | 2 +- lib/fog/aws/models/storage/files.rb | 2 +- lib/fog/aws/models/storage/version.rb | 2 +- lib/fog/aws/models/storage/versions.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fog/aws/models/storage/directories.rb b/lib/fog/aws/models/storage/directories.rb index 83617f67d..f48508f40 100644 --- a/lib/fog/aws/models/storage/directories.rb +++ b/lib/fog/aws/models/storage/directories.rb @@ -1,7 +1,7 @@ require 'fog/aws/models/storage/directory' module Fog - module Storage + module AWS class AWS class Directories < Fog::Collection model Fog::Storage::AWS::Directory diff --git a/lib/fog/aws/models/storage/directory.rb b/lib/fog/aws/models/storage/directory.rb index f6d58e123..97d142d0d 100644 --- a/lib/fog/aws/models/storage/directory.rb +++ b/lib/fog/aws/models/storage/directory.rb @@ -2,7 +2,7 @@ require 'fog/aws/models/storage/files' require 'fog/aws/models/storage/versions' module Fog - module Storage + module AWS class AWS class Directory < Fog::Model VALID_ACLS = ['private', 'public-read', 'public-read-write', 'authenticated-read'] diff --git a/lib/fog/aws/models/storage/file.rb b/lib/fog/aws/models/storage/file.rb index b6f20d099..593ebe254 100644 --- a/lib/fog/aws/models/storage/file.rb +++ b/lib/fog/aws/models/storage/file.rb @@ -1,7 +1,7 @@ require 'fog/aws/models/storage/versions' module Fog - module Storage + module AWS class AWS class File < Fog::Model # @see AWS Object docs http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectOps.html diff --git a/lib/fog/aws/models/storage/files.rb b/lib/fog/aws/models/storage/files.rb index 45d687ea4..30dfa9924 100644 --- a/lib/fog/aws/models/storage/files.rb +++ b/lib/fog/aws/models/storage/files.rb @@ -1,7 +1,7 @@ require 'fog/aws/models/storage/file' module Fog - module Storage + module AWS class AWS class Files < Fog::Collection extend Fog::Deprecation diff --git a/lib/fog/aws/models/storage/version.rb b/lib/fog/aws/models/storage/version.rb index 88a2b7b79..6f3bc555d 100644 --- a/lib/fog/aws/models/storage/version.rb +++ b/lib/fog/aws/models/storage/version.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Version < Fog::Model identity :version, :aliases => 'VersionId' diff --git a/lib/fog/aws/models/storage/versions.rb b/lib/fog/aws/models/storage/versions.rb index 01e0c2c78..e19f3c74d 100644 --- a/lib/fog/aws/models/storage/versions.rb +++ b/lib/fog/aws/models/storage/versions.rb @@ -1,7 +1,7 @@ require 'fog/aws/models/storage/version' module Fog - module Storage + module AWS class AWS class Versions < Fog::Collection attribute :file From 613cc24fde0c7f39e6c8e8c0256db0edb87627e8 Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:13:21 +0900 Subject: [PATCH 03/13] git grep -l "class AWS" -- lib/fog/aws/models/storage/ | xargs sed -i "" "s/class AWS/class Storage/g" --- lib/fog/aws/models/storage/directories.rb | 2 +- lib/fog/aws/models/storage/directory.rb | 2 +- lib/fog/aws/models/storage/file.rb | 2 +- lib/fog/aws/models/storage/files.rb | 2 +- lib/fog/aws/models/storage/version.rb | 2 +- lib/fog/aws/models/storage/versions.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fog/aws/models/storage/directories.rb b/lib/fog/aws/models/storage/directories.rb index f48508f40..2c3c0a4e6 100644 --- a/lib/fog/aws/models/storage/directories.rb +++ b/lib/fog/aws/models/storage/directories.rb @@ -2,7 +2,7 @@ require 'fog/aws/models/storage/directory' module Fog module AWS - class AWS + class Storage class Directories < Fog::Collection model Fog::Storage::AWS::Directory diff --git a/lib/fog/aws/models/storage/directory.rb b/lib/fog/aws/models/storage/directory.rb index 97d142d0d..2d35f2d1e 100644 --- a/lib/fog/aws/models/storage/directory.rb +++ b/lib/fog/aws/models/storage/directory.rb @@ -3,7 +3,7 @@ require 'fog/aws/models/storage/versions' module Fog module AWS - class AWS + class Storage class Directory < Fog::Model VALID_ACLS = ['private', 'public-read', 'public-read-write', 'authenticated-read'] diff --git a/lib/fog/aws/models/storage/file.rb b/lib/fog/aws/models/storage/file.rb index 593ebe254..7d211d354 100644 --- a/lib/fog/aws/models/storage/file.rb +++ b/lib/fog/aws/models/storage/file.rb @@ -2,7 +2,7 @@ require 'fog/aws/models/storage/versions' module Fog module AWS - class AWS + class Storage class File < Fog::Model # @see AWS Object docs http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectOps.html diff --git a/lib/fog/aws/models/storage/files.rb b/lib/fog/aws/models/storage/files.rb index 30dfa9924..77e783a3b 100644 --- a/lib/fog/aws/models/storage/files.rb +++ b/lib/fog/aws/models/storage/files.rb @@ -2,7 +2,7 @@ require 'fog/aws/models/storage/file' module Fog module AWS - class AWS + class Storage class Files < Fog::Collection extend Fog::Deprecation deprecate :get_url, :get_https_url diff --git a/lib/fog/aws/models/storage/version.rb b/lib/fog/aws/models/storage/version.rb index 6f3bc555d..4b585c2bb 100644 --- a/lib/fog/aws/models/storage/version.rb +++ b/lib/fog/aws/models/storage/version.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Version < Fog::Model identity :version, :aliases => 'VersionId' diff --git a/lib/fog/aws/models/storage/versions.rb b/lib/fog/aws/models/storage/versions.rb index e19f3c74d..fd388f664 100644 --- a/lib/fog/aws/models/storage/versions.rb +++ b/lib/fog/aws/models/storage/versions.rb @@ -2,7 +2,7 @@ require 'fog/aws/models/storage/version' module Fog module AWS - class AWS + class Storage class Versions < Fog::Collection attribute :file attribute :directory From a54b14120ec813121486aa3f4e2ce56f342ab51d Mon Sep 17 00:00:00 2001 From: sue445 Date: Sat, 15 Sep 2018 00:08:23 +0900 Subject: [PATCH 04/13] git grep -l " module Storage" -- lib/fog/aws/parsers/storage/ | xargs sed -i "" "s/ module Storage/ module AWS/g" --- lib/fog/aws/parsers/storage/access_control_list.rb | 2 +- lib/fog/aws/parsers/storage/complete_multipart_upload.rb | 2 +- lib/fog/aws/parsers/storage/copy_object.rb | 2 +- lib/fog/aws/parsers/storage/cors_configuration.rb | 2 +- lib/fog/aws/parsers/storage/delete_multiple_objects.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_location.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_logging.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_notification.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_object_versions.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_tagging.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_versioning.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_website.rb | 2 +- lib/fog/aws/parsers/storage/get_request_payment.rb | 2 +- lib/fog/aws/parsers/storage/get_service.rb | 2 +- lib/fog/aws/parsers/storage/initiate_multipart_upload.rb | 2 +- lib/fog/aws/parsers/storage/list_multipart_uploads.rb | 2 +- lib/fog/aws/parsers/storage/list_parts.rb | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/fog/aws/parsers/storage/access_control_list.rb b/lib/fog/aws/parsers/storage/access_control_list.rb index 53247e1fa..b922115e2 100644 --- a/lib/fog/aws/parsers/storage/access_control_list.rb +++ b/lib/fog/aws/parsers/storage/access_control_list.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class AccessControlList < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/complete_multipart_upload.rb b/lib/fog/aws/parsers/storage/complete_multipart_upload.rb index 6c02c7175..5d1c010dc 100644 --- a/lib/fog/aws/parsers/storage/complete_multipart_upload.rb +++ b/lib/fog/aws/parsers/storage/complete_multipart_upload.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class CompleteMultipartUpload < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/copy_object.rb b/lib/fog/aws/parsers/storage/copy_object.rb index 7223f4ae7..eb7566ef5 100644 --- a/lib/fog/aws/parsers/storage/copy_object.rb +++ b/lib/fog/aws/parsers/storage/copy_object.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class CopyObject < Fog::Parsers::Base def end_element(name) diff --git a/lib/fog/aws/parsers/storage/cors_configuration.rb b/lib/fog/aws/parsers/storage/cors_configuration.rb index f969feb5c..33d6093a8 100644 --- a/lib/fog/aws/parsers/storage/cors_configuration.rb +++ b/lib/fog/aws/parsers/storage/cors_configuration.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class CorsConfiguration < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/delete_multiple_objects.rb b/lib/fog/aws/parsers/storage/delete_multiple_objects.rb index 6d6198d7d..ef01288b7 100644 --- a/lib/fog/aws/parsers/storage/delete_multiple_objects.rb +++ b/lib/fog/aws/parsers/storage/delete_multiple_objects.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class DeleteMultipleObjects < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/get_bucket.rb b/lib/fog/aws/parsers/storage/get_bucket.rb index 2d53f6441..42e3ef10b 100644 --- a/lib/fog/aws/parsers/storage/get_bucket.rb +++ b/lib/fog/aws/parsers/storage/get_bucket.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetBucket < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb b/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb index 3eff79cf8..baf103452 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetBucketLifecycle < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/get_bucket_location.rb b/lib/fog/aws/parsers/storage/get_bucket_location.rb index 920f69761..f9f67debb 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_location.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_location.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetBucketLocation < Fog::Parsers::Base def end_element(name) diff --git a/lib/fog/aws/parsers/storage/get_bucket_logging.rb b/lib/fog/aws/parsers/storage/get_bucket_logging.rb index 931aeaadb..6680741eb 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_logging.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_logging.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetBucketLogging < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/get_bucket_notification.rb b/lib/fog/aws/parsers/storage/get_bucket_notification.rb index eaa3d170b..5919d0c04 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_notification.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_notification.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetBucketNotification < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb b/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb index dae2f2d47..edf234f7d 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetBucketObjectVersions < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/get_bucket_tagging.rb b/lib/fog/aws/parsers/storage/get_bucket_tagging.rb index 3b26b89c7..47ba80146 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_tagging.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_tagging.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetBucketTagging < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/get_bucket_versioning.rb b/lib/fog/aws/parsers/storage/get_bucket_versioning.rb index 549c6ebf4..b02c2d116 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_versioning.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_versioning.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetBucketVersioning < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/get_bucket_website.rb b/lib/fog/aws/parsers/storage/get_bucket_website.rb index 1863ddeb9..b9ae633f8 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_website.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_website.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS # http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETwebsite.html diff --git a/lib/fog/aws/parsers/storage/get_request_payment.rb b/lib/fog/aws/parsers/storage/get_request_payment.rb index 91edb28ad..b93aaaf12 100644 --- a/lib/fog/aws/parsers/storage/get_request_payment.rb +++ b/lib/fog/aws/parsers/storage/get_request_payment.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetRequestPayment < Fog::Parsers::Base def end_element(name) diff --git a/lib/fog/aws/parsers/storage/get_service.rb b/lib/fog/aws/parsers/storage/get_service.rb index 403cb8188..9a585b15d 100644 --- a/lib/fog/aws/parsers/storage/get_service.rb +++ b/lib/fog/aws/parsers/storage/get_service.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class GetService < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb b/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb index df5d66310..1eddaa5ed 100644 --- a/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb +++ b/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class InitiateMultipartUpload < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/list_multipart_uploads.rb b/lib/fog/aws/parsers/storage/list_multipart_uploads.rb index 0692f0074..f90e469da 100644 --- a/lib/fog/aws/parsers/storage/list_multipart_uploads.rb +++ b/lib/fog/aws/parsers/storage/list_multipart_uploads.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class ListMultipartUploads < Fog::Parsers::Base def reset diff --git a/lib/fog/aws/parsers/storage/list_parts.rb b/lib/fog/aws/parsers/storage/list_parts.rb index 4cb6916f6..93285204c 100644 --- a/lib/fog/aws/parsers/storage/list_parts.rb +++ b/lib/fog/aws/parsers/storage/list_parts.rb @@ -1,6 +1,6 @@ module Fog module Parsers - module Storage + module AWS module AWS class ListParts < Fog::Parsers::Base def reset From 270d6f632e15e5273312a7d9e9a8f529f617968a Mon Sep 17 00:00:00 2001 From: sue445 Date: Sat, 15 Sep 2018 00:08:36 +0900 Subject: [PATCH 05/13] git grep -l " module AWS" -- lib/fog/aws/parsers/storage/ | xargs sed -i "" "s/ module AWS/ module Storage/g" --- lib/fog/aws/parsers/storage/access_control_list.rb | 2 +- lib/fog/aws/parsers/storage/complete_multipart_upload.rb | 2 +- lib/fog/aws/parsers/storage/copy_object.rb | 2 +- lib/fog/aws/parsers/storage/cors_configuration.rb | 2 +- lib/fog/aws/parsers/storage/delete_multiple_objects.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_location.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_logging.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_notification.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_object_versions.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_tagging.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_versioning.rb | 2 +- lib/fog/aws/parsers/storage/get_bucket_website.rb | 2 +- lib/fog/aws/parsers/storage/get_request_payment.rb | 2 +- lib/fog/aws/parsers/storage/get_service.rb | 2 +- lib/fog/aws/parsers/storage/initiate_multipart_upload.rb | 2 +- lib/fog/aws/parsers/storage/list_multipart_uploads.rb | 2 +- lib/fog/aws/parsers/storage/list_parts.rb | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/fog/aws/parsers/storage/access_control_list.rb b/lib/fog/aws/parsers/storage/access_control_list.rb index b922115e2..66c7764f5 100644 --- a/lib/fog/aws/parsers/storage/access_control_list.rb +++ b/lib/fog/aws/parsers/storage/access_control_list.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class AccessControlList < Fog::Parsers::Base def reset @in_access_control_list = false diff --git a/lib/fog/aws/parsers/storage/complete_multipart_upload.rb b/lib/fog/aws/parsers/storage/complete_multipart_upload.rb index 5d1c010dc..1e9ba1ef3 100644 --- a/lib/fog/aws/parsers/storage/complete_multipart_upload.rb +++ b/lib/fog/aws/parsers/storage/complete_multipart_upload.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class CompleteMultipartUpload < Fog::Parsers::Base def reset @response = {} diff --git a/lib/fog/aws/parsers/storage/copy_object.rb b/lib/fog/aws/parsers/storage/copy_object.rb index eb7566ef5..ae3e923aa 100644 --- a/lib/fog/aws/parsers/storage/copy_object.rb +++ b/lib/fog/aws/parsers/storage/copy_object.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class CopyObject < Fog::Parsers::Base def end_element(name) case name diff --git a/lib/fog/aws/parsers/storage/cors_configuration.rb b/lib/fog/aws/parsers/storage/cors_configuration.rb index 33d6093a8..5dfd2d262 100644 --- a/lib/fog/aws/parsers/storage/cors_configuration.rb +++ b/lib/fog/aws/parsers/storage/cors_configuration.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class CorsConfiguration < Fog::Parsers::Base def reset @in_cors_configuration_list = false diff --git a/lib/fog/aws/parsers/storage/delete_multiple_objects.rb b/lib/fog/aws/parsers/storage/delete_multiple_objects.rb index ef01288b7..c6e0a16dd 100644 --- a/lib/fog/aws/parsers/storage/delete_multiple_objects.rb +++ b/lib/fog/aws/parsers/storage/delete_multiple_objects.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class DeleteMultipleObjects < Fog::Parsers::Base def reset @deleted = { 'Deleted' => {} } diff --git a/lib/fog/aws/parsers/storage/get_bucket.rb b/lib/fog/aws/parsers/storage/get_bucket.rb index 42e3ef10b..ae3f31ce2 100644 --- a/lib/fog/aws/parsers/storage/get_bucket.rb +++ b/lib/fog/aws/parsers/storage/get_bucket.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetBucket < Fog::Parsers::Base def reset @object = { 'Owner' => {} } diff --git a/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb b/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb index baf103452..320c3f4cd 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_lifecycle.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetBucketLifecycle < Fog::Parsers::Base def reset @expiration = {} diff --git a/lib/fog/aws/parsers/storage/get_bucket_location.rb b/lib/fog/aws/parsers/storage/get_bucket_location.rb index f9f67debb..dc53717f7 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_location.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_location.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetBucketLocation < Fog::Parsers::Base def end_element(name) case name diff --git a/lib/fog/aws/parsers/storage/get_bucket_logging.rb b/lib/fog/aws/parsers/storage/get_bucket_logging.rb index 6680741eb..a836a8a26 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_logging.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_logging.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetBucketLogging < Fog::Parsers::Base def reset @grant = { 'Grantee' => {} } diff --git a/lib/fog/aws/parsers/storage/get_bucket_notification.rb b/lib/fog/aws/parsers/storage/get_bucket_notification.rb index 5919d0c04..7a02be04e 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_notification.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_notification.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetBucketNotification < Fog::Parsers::Base def reset @func = {} diff --git a/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb b/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb index edf234f7d..f6a3abe8e 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_object_versions.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetBucketObjectVersions < Fog::Parsers::Base def reset @delete_marker = { 'Owner' => {} } diff --git a/lib/fog/aws/parsers/storage/get_bucket_tagging.rb b/lib/fog/aws/parsers/storage/get_bucket_tagging.rb index 47ba80146..7fb0841cf 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_tagging.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_tagging.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetBucketTagging < Fog::Parsers::Base def reset @in_tag = {} diff --git a/lib/fog/aws/parsers/storage/get_bucket_versioning.rb b/lib/fog/aws/parsers/storage/get_bucket_versioning.rb index b02c2d116..9053de9d8 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_versioning.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_versioning.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetBucketVersioning < Fog::Parsers::Base def reset @response = { 'VersioningConfiguration' => {} } diff --git a/lib/fog/aws/parsers/storage/get_bucket_website.rb b/lib/fog/aws/parsers/storage/get_bucket_website.rb index b9ae633f8..4ca369777 100644 --- a/lib/fog/aws/parsers/storage/get_bucket_website.rb +++ b/lib/fog/aws/parsers/storage/get_bucket_website.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage # http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETwebsite.html class GetBucketWebsite < Fog::Parsers::Base diff --git a/lib/fog/aws/parsers/storage/get_request_payment.rb b/lib/fog/aws/parsers/storage/get_request_payment.rb index b93aaaf12..0170b8314 100644 --- a/lib/fog/aws/parsers/storage/get_request_payment.rb +++ b/lib/fog/aws/parsers/storage/get_request_payment.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetRequestPayment < Fog::Parsers::Base def end_element(name) case name diff --git a/lib/fog/aws/parsers/storage/get_service.rb b/lib/fog/aws/parsers/storage/get_service.rb index 9a585b15d..8cc9a3471 100644 --- a/lib/fog/aws/parsers/storage/get_service.rb +++ b/lib/fog/aws/parsers/storage/get_service.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class GetService < Fog::Parsers::Base def reset @bucket = {} diff --git a/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb b/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb index 1eddaa5ed..1a4b5c963 100644 --- a/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb +++ b/lib/fog/aws/parsers/storage/initiate_multipart_upload.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class InitiateMultipartUpload < Fog::Parsers::Base def reset @response = {} diff --git a/lib/fog/aws/parsers/storage/list_multipart_uploads.rb b/lib/fog/aws/parsers/storage/list_multipart_uploads.rb index f90e469da..be167fb9b 100644 --- a/lib/fog/aws/parsers/storage/list_multipart_uploads.rb +++ b/lib/fog/aws/parsers/storage/list_multipart_uploads.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class ListMultipartUploads < Fog::Parsers::Base def reset @upload = { 'Initiator' => {}, 'Owner' => {} } diff --git a/lib/fog/aws/parsers/storage/list_parts.rb b/lib/fog/aws/parsers/storage/list_parts.rb index 93285204c..712458ce4 100644 --- a/lib/fog/aws/parsers/storage/list_parts.rb +++ b/lib/fog/aws/parsers/storage/list_parts.rb @@ -1,7 +1,7 @@ module Fog module Parsers module AWS - module AWS + module Storage class ListParts < Fog::Parsers::Base def reset @part = {} From ed087d80d9d0c19c59ab31f289584e99ed1211d0 Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:13:30 +0900 Subject: [PATCH 06/13] git grep -l "Storage::AWS" -- lib/ | xargs sed -i "" "s/Storage::AWS/AWS::Storage/g" --- lib/fog/aws/models/storage/directories.rb | 2 +- lib/fog/aws/models/storage/directory.rb | 4 ++-- lib/fog/aws/models/storage/file.rb | 4 ++-- lib/fog/aws/models/storage/files.rb | 4 ++-- lib/fog/aws/models/storage/versions.rb | 2 +- lib/fog/aws/requests/storage/abort_multipart_upload.rb | 2 +- lib/fog/aws/requests/storage/acl_utils.rb | 2 +- lib/fog/aws/requests/storage/complete_multipart_upload.rb | 4 ++-- lib/fog/aws/requests/storage/copy_object.rb | 2 +- lib/fog/aws/requests/storage/cors_utils.rb | 2 +- lib/fog/aws/requests/storage/delete_multiple_objects.rb | 2 +- lib/fog/aws/requests/storage/get_bucket.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_acl.rb | 4 ++-- lib/fog/aws/requests/storage/get_bucket_cors.rb | 4 ++-- lib/fog/aws/requests/storage/get_bucket_lifecycle.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_location.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_logging.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_notification.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_object_versions.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_tagging.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_versioning.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_website.rb | 2 +- lib/fog/aws/requests/storage/get_object_acl.rb | 4 ++-- lib/fog/aws/requests/storage/get_request_payment.rb | 2 +- lib/fog/aws/requests/storage/get_service.rb | 2 +- lib/fog/aws/requests/storage/initiate_multipart_upload.rb | 4 ++-- lib/fog/aws/requests/storage/list_multipart_uploads.rb | 2 +- lib/fog/aws/requests/storage/list_parts.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_acl.rb | 4 ++-- lib/fog/aws/requests/storage/put_bucket_cors.rb | 4 ++-- lib/fog/aws/requests/storage/put_object.rb | 4 ++-- lib/fog/aws/requests/storage/put_object_acl.rb | 4 ++-- lib/fog/aws/requests/storage/upload_part.rb | 2 +- lib/fog/aws/service_mapper.rb | 2 +- lib/fog/aws/storage.rb | 2 +- 35 files changed, 47 insertions(+), 47 deletions(-) diff --git a/lib/fog/aws/models/storage/directories.rb b/lib/fog/aws/models/storage/directories.rb index 2c3c0a4e6..64341509a 100644 --- a/lib/fog/aws/models/storage/directories.rb +++ b/lib/fog/aws/models/storage/directories.rb @@ -4,7 +4,7 @@ module Fog module AWS class Storage class Directories < Fog::Collection - model Fog::Storage::AWS::Directory + model Fog::AWS::Storage::Directory def all data = service.get_service.body['Buckets'] diff --git a/lib/fog/aws/models/storage/directory.rb b/lib/fog/aws/models/storage/directory.rb index 2d35f2d1e..26ac1ee8f 100644 --- a/lib/fog/aws/models/storage/directory.rb +++ b/lib/fog/aws/models/storage/directory.rb @@ -40,7 +40,7 @@ module Fog end def files - @files ||= Fog::Storage::AWS::Files.new(:directory => self, :service => service) + @files ||= Fog::AWS::Storage::Files.new(:directory => self, :service => service) end def payer @@ -67,7 +67,7 @@ module Fog end def versions - @versions ||= Fog::Storage::AWS::Versions.new(:directory => self, :service => service) + @versions ||= Fog::AWS::Storage::Versions.new(:directory => self, :service => service) end def public=(new_public) diff --git a/lib/fog/aws/models/storage/file.rb b/lib/fog/aws/models/storage/file.rb index 7d211d354..4e16cb19a 100644 --- a/lib/fog/aws/models/storage/file.rb +++ b/lib/fog/aws/models/storage/file.rb @@ -240,11 +240,11 @@ module Fog end # File version if exists or creates new version. - # @return [Fog::Storage::AWS::Version] + # @return [Fog::AWS::Storage::Version] # def versions @versions ||= begin - Fog::Storage::AWS::Versions.new( + Fog::AWS::Storage::Versions.new( :file => self, :service => service ) diff --git a/lib/fog/aws/models/storage/files.rb b/lib/fog/aws/models/storage/files.rb index 77e783a3b..1a50cf4e7 100644 --- a/lib/fog/aws/models/storage/files.rb +++ b/lib/fog/aws/models/storage/files.rb @@ -15,7 +15,7 @@ module Fog attribute :max_keys, :aliases => ['MaxKeys', 'max-keys'] attribute :prefix, :aliases => 'Prefix' - model Fog::Storage::AWS::File + model Fog::AWS::Storage::File def all(options = {}) requires :directory @@ -70,7 +70,7 @@ module Fog when /NoSuchKey<\/Code>/ nil when /NoSuchBucket<\/Code>/ - raise(Fog::Storage::AWS::NotFound.new("Directory #{directory.identity} does not exist.")) + raise(Fog::AWS::Storage::NotFound.new("Directory #{directory.identity} does not exist.")) else raise(error) end diff --git a/lib/fog/aws/models/storage/versions.rb b/lib/fog/aws/models/storage/versions.rb index fd388f664..aac379e41 100644 --- a/lib/fog/aws/models/storage/versions.rb +++ b/lib/fog/aws/models/storage/versions.rb @@ -7,7 +7,7 @@ module Fog attribute :file attribute :directory - model Fog::Storage::AWS::Version + model Fog::AWS::Storage::Version def all(options = {}) data = if file diff --git a/lib/fog/aws/requests/storage/abort_multipart_upload.rb b/lib/fog/aws/requests/storage/abort_multipart_upload.rb index 4191e3fdc..bc5f46e10 100644 --- a/lib/fog/aws/requests/storage/abort_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/abort_multipart_upload.rb @@ -25,7 +25,7 @@ module Fog class Mock # :nodoc:all require 'fog/aws/requests/storage/shared_mock_methods' - include Fog::Storage::AWS::SharedMockMethods + include Fog::AWS::Storage::SharedMockMethods def abort_multipart_upload(bucket_name, object_name, upload_id) verify_mock_bucket_exists(bucket_name) diff --git a/lib/fog/aws/requests/storage/acl_utils.rb b/lib/fog/aws/requests/storage/acl_utils.rb index 61902f999..17b494fe6 100644 --- a/lib/fog/aws/requests/storage/acl_utils.rb +++ b/lib/fog/aws/requests/storage/acl_utils.rb @@ -51,7 +51,7 @@ module Fog end def self.acl_to_hash(acl_xml) - parser = Fog::Parsers::Storage::AWS::AccessControlList.new + parser = Fog::Parsers::AWS::Storage::AccessControlList.new Nokogiri::XML::SAX::Parser.new(parser).parse(acl_xml) parser.response end diff --git a/lib/fog/aws/requests/storage/complete_multipart_upload.rb b/lib/fog/aws/requests/storage/complete_multipart_upload.rb index c5580cc8e..4eac73b9d 100644 --- a/lib/fog/aws/requests/storage/complete_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/complete_multipart_upload.rb @@ -40,7 +40,7 @@ module Fog :bucket_name => bucket_name, :object_name => object_name, :method => 'POST', - :parser => Fog::Parsers::Storage::AWS::CompleteMultipartUpload.new, + :parser => Fog::Parsers::AWS::Storage::CompleteMultipartUpload.new, :query => {'uploadId' => upload_id} }) end @@ -48,7 +48,7 @@ module Fog class Mock # :nodoc:all require 'fog/aws/requests/storage/shared_mock_methods' - include Fog::Storage::AWS::SharedMockMethods + include Fog::AWS::Storage::SharedMockMethods def complete_multipart_upload(bucket_name, object_name, upload_id, parts) bucket = verify_mock_bucket_exists(bucket_name) diff --git a/lib/fog/aws/requests/storage/copy_object.rb b/lib/fog/aws/requests/storage/copy_object.rb index 4ac712e95..89963ee9e 100644 --- a/lib/fog/aws/requests/storage/copy_object.rb +++ b/lib/fog/aws/requests/storage/copy_object.rb @@ -35,7 +35,7 @@ module Fog :bucket_name => target_bucket_name, :object_name => target_object_name, :method => 'PUT', - :parser => Fog::Parsers::Storage::AWS::CopyObject.new, + :parser => Fog::Parsers::AWS::Storage::CopyObject.new, }) end end diff --git a/lib/fog/aws/requests/storage/cors_utils.rb b/lib/fog/aws/requests/storage/cors_utils.rb index 0e4b3e59b..39222dfe0 100644 --- a/lib/fog/aws/requests/storage/cors_utils.rb +++ b/lib/fog/aws/requests/storage/cors_utils.rb @@ -30,7 +30,7 @@ module Fog end def self.cors_to_hash(cors_xml) - parser = Fog::Parsers::Storage::AWS::CorsConfiguration.new + parser = Fog::Parsers::AWS::Storage::CorsConfiguration.new Nokogiri::XML::SAX::Parser.new(parser).parse(cors_xml) parser.response end diff --git a/lib/fog/aws/requests/storage/delete_multiple_objects.rb b/lib/fog/aws/requests/storage/delete_multiple_objects.rb index 82029e6d1..ea3c44b18 100644 --- a/lib/fog/aws/requests/storage/delete_multiple_objects.rb +++ b/lib/fog/aws/requests/storage/delete_multiple_objects.rb @@ -56,7 +56,7 @@ module Fog :headers => headers, :bucket_name => bucket_name, :method => 'POST', - :parser => Fog::Parsers::Storage::AWS::DeleteMultipleObjects.new, + :parser => Fog::Parsers::AWS::Storage::DeleteMultipleObjects.new, :query => {'delete' => nil} }) end diff --git a/lib/fog/aws/requests/storage/get_bucket.rb b/lib/fog/aws/requests/storage/get_bucket.rb index 266e428ee..49e976ff9 100644 --- a/lib/fog/aws/requests/storage/get_bucket.rb +++ b/lib/fog/aws/requests/storage/get_bucket.rb @@ -46,7 +46,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucket.new, + :parser => Fog::Parsers::AWS::Storage::GetBucket.new, :query => options }) end diff --git a/lib/fog/aws/requests/storage/get_bucket_acl.rb b/lib/fog/aws/requests/storage/get_bucket_acl.rb index 5b5560d5d..259970c44 100644 --- a/lib/fog/aws/requests/storage/get_bucket_acl.rb +++ b/lib/fog/aws/requests/storage/get_bucket_acl.rb @@ -35,7 +35,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::AccessControlList.new, + :parser => Fog::Parsers::AWS::Storage::AccessControlList.new, :query => {'acl' => nil} }) end @@ -49,7 +49,7 @@ module Fog if acl = self.data[:acls][:bucket][bucket_name] response.status = 200 if acl.is_a?(String) - response.body = Fog::Storage::AWS.acl_to_hash(acl) + response.body = Fog::AWS::Storage.acl_to_hash(acl) else response.body = acl end diff --git a/lib/fog/aws/requests/storage/get_bucket_cors.rb b/lib/fog/aws/requests/storage/get_bucket_cors.rb index 21e42f1ae..2152d7252 100644 --- a/lib/fog/aws/requests/storage/get_bucket_cors.rb +++ b/lib/fog/aws/requests/storage/get_bucket_cors.rb @@ -31,7 +31,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::CorsConfiguration.new, + :parser => Fog::Parsers::AWS::Storage::CorsConfiguration.new, :query => {'cors' => nil} }) end @@ -45,7 +45,7 @@ module Fog if cors = self.data[:cors][:bucket][bucket_name] response.status = 200 if cors.is_a?(String) - response.body = Fog::Storage::AWS.cors_to_hash(cors) + response.body = Fog::AWS::Storage.cors_to_hash(cors) else response.body = cors end diff --git a/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb b/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb index 21983ec29..231c652f7 100644 --- a/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +++ b/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb @@ -25,7 +25,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucketLifecycle.new, + :parser => Fog::Parsers::AWS::Storage::GetBucketLifecycle.new, :query => {'lifecycle' => nil} }) end diff --git a/lib/fog/aws/requests/storage/get_bucket_location.rb b/lib/fog/aws/requests/storage/get_bucket_location.rb index 78c44fc5e..05baa11f3 100644 --- a/lib/fog/aws/requests/storage/get_bucket_location.rb +++ b/lib/fog/aws/requests/storage/get_bucket_location.rb @@ -21,7 +21,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucketLocation.new, + :parser => Fog::Parsers::AWS::Storage::GetBucketLocation.new, :query => {'location' => nil}, :path_style => true }) diff --git a/lib/fog/aws/requests/storage/get_bucket_logging.rb b/lib/fog/aws/requests/storage/get_bucket_logging.rb index 87c8d5ec2..6cee5d712 100644 --- a/lib/fog/aws/requests/storage/get_bucket_logging.rb +++ b/lib/fog/aws/requests/storage/get_bucket_logging.rb @@ -35,7 +35,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucketLogging.new, + :parser => Fog::Parsers::AWS::Storage::GetBucketLogging.new, :query => {'logging' => nil} }) end diff --git a/lib/fog/aws/requests/storage/get_bucket_notification.rb b/lib/fog/aws/requests/storage/get_bucket_notification.rb index 15645b472..133b9777c 100644 --- a/lib/fog/aws/requests/storage/get_bucket_notification.rb +++ b/lib/fog/aws/requests/storage/get_bucket_notification.rb @@ -35,7 +35,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucketNotification.new, + :parser => Fog::Parsers::AWS::Storage::GetBucketNotification.new, :query => {'notification' => nil} }) end diff --git a/lib/fog/aws/requests/storage/get_bucket_object_versions.rb b/lib/fog/aws/requests/storage/get_bucket_object_versions.rb index ea421048e..dc2597dd7 100644 --- a/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +++ b/lib/fog/aws/requests/storage/get_bucket_object_versions.rb @@ -57,7 +57,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucketObjectVersions.new, + :parser => Fog::Parsers::AWS::Storage::GetBucketObjectVersions.new, :query => {'versions' => nil}.merge!(options) }) end end diff --git a/lib/fog/aws/requests/storage/get_bucket_tagging.rb b/lib/fog/aws/requests/storage/get_bucket_tagging.rb index a5f979418..799568a50 100644 --- a/lib/fog/aws/requests/storage/get_bucket_tagging.rb +++ b/lib/fog/aws/requests/storage/get_bucket_tagging.rb @@ -25,7 +25,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucketTagging.new, + :parser => Fog::Parsers::AWS::Storage::GetBucketTagging.new, :query => {'tagging' => nil} }) end diff --git a/lib/fog/aws/requests/storage/get_bucket_versioning.rb b/lib/fog/aws/requests/storage/get_bucket_versioning.rb index b3e91dc14..0ca19f6e9 100644 --- a/lib/fog/aws/requests/storage/get_bucket_versioning.rb +++ b/lib/fog/aws/requests/storage/get_bucket_versioning.rb @@ -25,7 +25,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucketVersioning.new, + :parser => Fog::Parsers::AWS::Storage::GetBucketVersioning.new, :query => {'versioning' => nil} }) end diff --git a/lib/fog/aws/requests/storage/get_bucket_website.rb b/lib/fog/aws/requests/storage/get_bucket_website.rb index a64ff658f..c0f8d4c80 100644 --- a/lib/fog/aws/requests/storage/get_bucket_website.rb +++ b/lib/fog/aws/requests/storage/get_bucket_website.rb @@ -28,7 +28,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetBucketWebsite.new, + :parser => Fog::Parsers::AWS::Storage::GetBucketWebsite.new, :query => {'website' => nil} }) end diff --git a/lib/fog/aws/requests/storage/get_object_acl.rb b/lib/fog/aws/requests/storage/get_object_acl.rb index f074e6c19..b17b5b8ba 100644 --- a/lib/fog/aws/requests/storage/get_object_acl.rb +++ b/lib/fog/aws/requests/storage/get_object_acl.rb @@ -46,7 +46,7 @@ module Fog :object_name => object_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::AccessControlList.new, + :parser => Fog::Parsers::AWS::Storage::AccessControlList.new, :query => query }) end @@ -60,7 +60,7 @@ module Fog if acl = self.data[:acls][:object][bucket_name] && self.data[:acls][:object][bucket_name][object_name] response.status = 200 if acl.is_a?(String) - response.body = Fog::Storage::AWS.acl_to_hash(acl) + response.body = Fog::AWS::Storage.acl_to_hash(acl) else response.body = acl end diff --git a/lib/fog/aws/requests/storage/get_request_payment.rb b/lib/fog/aws/requests/storage/get_request_payment.rb index c12baef62..3840525ac 100644 --- a/lib/fog/aws/requests/storage/get_request_payment.rb +++ b/lib/fog/aws/requests/storage/get_request_payment.rb @@ -21,7 +21,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetRequestPayment.new, + :parser => Fog::Parsers::AWS::Storage::GetRequestPayment.new, :query => {'requestPayment' => nil} }) end diff --git a/lib/fog/aws/requests/storage/get_service.rb b/lib/fog/aws/requests/storage/get_service.rb index 497f54d1b..770e87ca0 100644 --- a/lib/fog/aws/requests/storage/get_service.rb +++ b/lib/fog/aws/requests/storage/get_service.rb @@ -24,7 +24,7 @@ module Fog :host => @host, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::GetService.new + :parser => Fog::Parsers::AWS::Storage::GetService.new }) end end diff --git a/lib/fog/aws/requests/storage/initiate_multipart_upload.rb b/lib/fog/aws/requests/storage/initiate_multipart_upload.rb index 95e89125c..f824c20f5 100644 --- a/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/initiate_multipart_upload.rb @@ -32,7 +32,7 @@ module Fog :bucket_name => bucket_name, :object_name => object_name, :method => 'POST', - :parser => Fog::Parsers::Storage::AWS::InitiateMultipartUpload.new, + :parser => Fog::Parsers::AWS::Storage::InitiateMultipartUpload.new, :query => {'uploads' => nil} }) end @@ -40,7 +40,7 @@ module Fog class Mock # :nodoc:all require 'fog/aws/requests/storage/shared_mock_methods' - include Fog::Storage::AWS::SharedMockMethods + include Fog::AWS::Storage::SharedMockMethods def initiate_multipart_upload(bucket_name, object_name, options = {}) verify_mock_bucket_exists(bucket_name) diff --git a/lib/fog/aws/requests/storage/list_multipart_uploads.rb b/lib/fog/aws/requests/storage/list_multipart_uploads.rb index eb45c0e01..a5c332e4b 100644 --- a/lib/fog/aws/requests/storage/list_multipart_uploads.rb +++ b/lib/fog/aws/requests/storage/list_multipart_uploads.rb @@ -42,7 +42,7 @@ module Fog :bucket_name => bucket_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::ListMultipartUploads.new, + :parser => Fog::Parsers::AWS::Storage::ListMultipartUploads.new, :query => options.merge!({'uploads' => nil}) }) end diff --git a/lib/fog/aws/requests/storage/list_parts.rb b/lib/fog/aws/requests/storage/list_parts.rb index 4344870da..74f0ce5a1 100644 --- a/lib/fog/aws/requests/storage/list_parts.rb +++ b/lib/fog/aws/requests/storage/list_parts.rb @@ -43,7 +43,7 @@ module Fog :object_name => object_name, :idempotent => true, :method => 'GET', - :parser => Fog::Parsers::Storage::AWS::ListParts.new, + :parser => Fog::Parsers::AWS::Storage::ListParts.new, :query => options.merge!({'uploadId' => upload_id}) }) end diff --git a/lib/fog/aws/requests/storage/put_bucket_acl.rb b/lib/fog/aws/requests/storage/put_bucket_acl.rb index 2fef776fd..67050a897 100644 --- a/lib/fog/aws/requests/storage/put_bucket_acl.rb +++ b/lib/fog/aws/requests/storage/put_bucket_acl.rb @@ -29,7 +29,7 @@ module Fog headers = {} if acl.is_a?(Hash) - data = Fog::Storage::AWS.hash_to_acl(acl) + data = Fog::AWS::Storage.hash_to_acl(acl) else if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl) raise Excon::Errors::BadRequest.new('invalid x-amz-acl') @@ -55,7 +55,7 @@ module Fog class Mock def put_bucket_acl(bucket_name, acl) if acl.is_a?(Hash) - self.data[:acls][:bucket][bucket_name] = Fog::Storage::AWS.hash_to_acl(acl) + self.data[:acls][:bucket][bucket_name] = Fog::AWS::Storage.hash_to_acl(acl) else if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl) raise Excon::Errors::BadRequest.new('invalid x-amz-acl') diff --git a/lib/fog/aws/requests/storage/put_bucket_cors.rb b/lib/fog/aws/requests/storage/put_bucket_cors.rb index 0fd9103b9..d71e3852d 100644 --- a/lib/fog/aws/requests/storage/put_bucket_cors.rb +++ b/lib/fog/aws/requests/storage/put_bucket_cors.rb @@ -19,7 +19,7 @@ module Fog # @see http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTcors.html def put_bucket_cors(bucket_name, cors) - data = Fog::Storage::AWS.hash_to_cors(cors) + data = Fog::AWS::Storage.hash_to_cors(cors) headers = {} headers['Content-MD5'] = Base64.encode64(OpenSSL::Digest::MD5.digest(data)).strip @@ -39,7 +39,7 @@ module Fog class Mock def put_bucket_cors(bucket_name, cors) - self.data[:cors][:bucket][bucket_name] = Fog::Storage::AWS.hash_to_cors(cors) + self.data[:cors][:bucket][bucket_name] = Fog::AWS::Storage.hash_to_cors(cors) end end end diff --git a/lib/fog/aws/requests/storage/put_object.rb b/lib/fog/aws/requests/storage/put_object.rb index 6b0074a25..e5ce65bb8 100644 --- a/lib/fog/aws/requests/storage/put_object.rb +++ b/lib/fog/aws/requests/storage/put_object.rb @@ -57,14 +57,14 @@ module Fog class Mock # :nodoc:all require 'fog/aws/requests/storage/shared_mock_methods' - include Fog::Storage::AWS::SharedMockMethods + include Fog::AWS::Storage::SharedMockMethods def put_object(bucket_name, object_name, data, options = {}) define_mock_acl(bucket_name, object_name, options) data = parse_mock_data(data) headers = data[:headers].merge!(options) - Fog::Storage::AWS::Real.conforming_to_us_ascii! headers.keys.grep(/^x-amz-meta-/), headers + Fog::AWS::Storage::Real.conforming_to_us_ascii! headers.keys.grep(/^x-amz-meta-/), headers bucket = verify_mock_bucket_exists(bucket_name) options['Content-Type'] ||= data[:headers]['Content-Type'] diff --git a/lib/fog/aws/requests/storage/put_object_acl.rb b/lib/fog/aws/requests/storage/put_object_acl.rb index 7b9c7e526..eec630e3e 100644 --- a/lib/fog/aws/requests/storage/put_object_acl.rb +++ b/lib/fog/aws/requests/storage/put_object_acl.rb @@ -37,7 +37,7 @@ module Fog headers = {} if acl.is_a?(Hash) - data = Fog::Storage::AWS.hash_to_acl(acl) + data = Fog::AWS::Storage.hash_to_acl(acl) else if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl) raise Excon::Errors::BadRequest.new('invalid x-amz-acl') @@ -64,7 +64,7 @@ module Fog class Mock def put_object_acl(bucket_name, object_name, acl, options = {}) if acl.is_a?(Hash) - self.data[:acls][:object][bucket_name][object_name] = Fog::Storage::AWS.hash_to_acl(acl) + self.data[:acls][:object][bucket_name][object_name] = Fog::AWS::Storage.hash_to_acl(acl) else if !['private', 'public-read', 'public-read-write', 'authenticated-read'].include?(acl) raise Excon::Errors::BadRequest.new('invalid x-amz-acl') diff --git a/lib/fog/aws/requests/storage/upload_part.rb b/lib/fog/aws/requests/storage/upload_part.rb index ed9f33074..60486355d 100644 --- a/lib/fog/aws/requests/storage/upload_part.rb +++ b/lib/fog/aws/requests/storage/upload_part.rb @@ -37,7 +37,7 @@ module Fog class Mock # :nodoc:all require 'fog/aws/requests/storage/shared_mock_methods' - include Fog::Storage::AWS::SharedMockMethods + include Fog::AWS::Storage::SharedMockMethods def upload_part(bucket_name, object_name, upload_id, part_number, data, options = {}) data = parse_mock_data(data) diff --git a/lib/fog/aws/service_mapper.rb b/lib/fog/aws/service_mapper.rb index fa532b007..a0a865985 100644 --- a/lib/fog/aws/service_mapper.rb +++ b/lib/fog/aws/service_mapper.rb @@ -46,7 +46,7 @@ module Fog when :sqs Fog::AWS::SQS when :eu_storage, :storage - Fog::Storage::AWS + Fog::AWS::Storage when :rds Fog::AWS::RDS when :sns diff --git a/lib/fog/aws/storage.rb b/lib/fog/aws/storage.rb index 8c92ee921..c9b586f98 100644 --- a/lib/fog/aws/storage.rb +++ b/lib/fog/aws/storage.rb @@ -130,7 +130,7 @@ module Fog end def url(params, expires) - Fog::Logger.deprecation("Fog::Storage::AWS => #url is deprecated, use #https_url instead [light_black](#{caller.first})[/]") + Fog::Logger.deprecation("Fog::AWS::Storage => #url is deprecated, use #https_url instead [light_black](#{caller.first})[/]") https_url(params, expires) end From e21685385b1830ad6296e0c1c8d642c77e34e310 Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:13:39 +0900 Subject: [PATCH 07/13] git grep -l "Storage::AWS" -- tests/ | xargs sed -i "" "s/Storage::AWS/AWS::Storage/g" --- tests/requests/storage/acl_utils_tests.rb | 48 +++++++++++----------- tests/requests/storage/cors_utils_tests.rb | 28 ++++++------- tests/storage_tests.rb | 2 +- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/tests/requests/storage/acl_utils_tests.rb b/tests/requests/storage/acl_utils_tests.rb index 5df8ce856..8214529f3 100644 --- a/tests/requests/storage/acl_utils_tests.rb +++ b/tests/requests/storage/acl_utils_tests.rb @@ -1,44 +1,44 @@ require 'fog/aws/requests/storage/acl_utils' -Shindo.tests('Fog::Storage::AWS | ACL utils', ["aws"]) do +Shindo.tests('Fog::AWS::Storage | ACL utils', ["aws"]) do tests(".hash_to_acl") do tests(".hash_to_acl({}) at xpath //AccessControlPolicy").returns("", "has an empty AccessControlPolicy") do - xml = Fog::Storage::AWS.hash_to_acl({}) + xml = Fog::AWS::Storage.hash_to_acl({}) Nokogiri::XML(xml).xpath("//AccessControlPolicy").first.content.chomp end tests(".hash_to_acl({}) at xpath //AccessControlPolicy/Owner").returns(nil, "does not have an Owner element") do - xml = Fog::Storage::AWS.hash_to_acl({}) + xml = Fog::AWS::Storage.hash_to_acl({}) Nokogiri::XML(xml).xpath("//AccessControlPolicy/Owner").first end tests(".hash_to_acl('Owner' => {}) at xpath //AccessControlPolicy/Owner").returns(nil, "does not have an Owner element") do - xml = Fog::Storage::AWS.hash_to_acl('Owner' => {}) + xml = Fog::AWS::Storage.hash_to_acl('Owner' => {}) Nokogiri::XML(xml).xpath("//AccessControlPolicy/Owner").first end tests(".hash_to_acl('Owner' => {'ID' => 'abcdef0123456789'}) at xpath //AccessControlPolicy/Owner/ID").returns("abcdef0123456789", "returns the Owner ID") do - xml = Fog::Storage::AWS.hash_to_acl('Owner' => {'ID' => 'abcdef0123456789'}) + xml = Fog::AWS::Storage.hash_to_acl('Owner' => {'ID' => 'abcdef0123456789'}) Nokogiri::XML(xml).xpath("//AccessControlPolicy/Owner/ID").first.content end tests(".hash_to_acl('Owner' => {'DisplayName' => 'bob'}) at xpath //AccessControlPolicy/Owner/ID").returns(nil, "does not have an Owner ID element") do - xml = Fog::Storage::AWS.hash_to_acl('Owner' => {'DisplayName' => 'bob'}) + xml = Fog::AWS::Storage.hash_to_acl('Owner' => {'DisplayName' => 'bob'}) Nokogiri::XML(xml).xpath("//AccessControlPolicy/Owner/ID").first end tests(".hash_to_acl('Owner' => {'DisplayName' => 'bob'}) at xpath //AccessControlPolicy/Owner/DisplayName").returns("bob", "returns the Owner DisplayName") do - xml = Fog::Storage::AWS.hash_to_acl('Owner' => {'DisplayName' => 'bob'}) + xml = Fog::AWS::Storage.hash_to_acl('Owner' => {'DisplayName' => 'bob'}) Nokogiri::XML(xml).xpath("//AccessControlPolicy/Owner/DisplayName").first.content end tests(".hash_to_acl('Owner' => {'ID' => 'abcdef0123456789'}) at xpath //AccessControlPolicy/Owner/DisplayName").returns(nil, "does not have an Owner DisplayName element") do - xml = Fog::Storage::AWS.hash_to_acl('Owner' => {'ID' => 'abcdef0123456789'}) + xml = Fog::AWS::Storage.hash_to_acl('Owner' => {'ID' => 'abcdef0123456789'}) Nokogiri::XML(xml).xpath("//AccessControlPolicy/Owner/DisplayName").first end tests(".hash_to_acl({}) at xpath //AccessControlPolicy/AccessControlList").returns(nil, "has no AccessControlList") do - xml = Fog::Storage::AWS.hash_to_acl({}) + xml = Fog::AWS::Storage.hash_to_acl({}) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlPolicy").first end @@ -55,22 +55,22 @@ Shindo.tests('Fog::Storage::AWS | ACL utils', ["aws"]) do } tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee").returns("CanonicalUser", "has an xsi:type of CanonicalUser") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee").first.attributes["type"].value end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee/ID").returns("abcdef0123456789", "returns the Grantee ID") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee/ID").first.content end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee/DisplayName").returns("bob", "returns the Grantee DisplayName") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee/DisplayName").first.content end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Permission").returns("READ", "returns the Grantee Permission") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Permission").first.content end @@ -86,17 +86,17 @@ Shindo.tests('Fog::Storage::AWS | ACL utils', ["aws"]) do } tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee").returns("AmazonCustomerByEmail", "has an xsi:type of AmazonCustomerByEmail") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee").first.attributes["type"].value end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee/EmailAddress").returns("user@example.com", "returns the Grantee EmailAddress") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee/EmailAddress").first.content end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Permission").returns("FULL_CONTROL", "returns the Grantee Permission") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Permission").first.content end @@ -112,17 +112,17 @@ Shindo.tests('Fog::Storage::AWS | ACL utils', ["aws"]) do } tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee").returns("Group", "has an xsi:type of Group") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee").first.attributes["type"].value end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee/URI").returns("http://acs.amazonaws.com/groups/global/AllUsers", "returns the Grantee URI") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee/URI").first.content end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Permission").returns("WRITE", "returns the Grantee Permission") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Permission").first.content end @@ -151,22 +151,22 @@ Shindo.tests('Fog::Storage::AWS | ACL utils', ["aws"]) do } tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant").returns(3, "has three elements") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant").size end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee/ID").returns("abcdef0123456789", "returns the first Grant's Grantee ID") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee/ID").first.content end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee/EmailAddress").returns("user@example.com", "returns the second Grant's Grantee EmailAddress") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee/EmailAddress").first.content end tests(".hash_to_acl(#{acl.inspect}) at xpath //AccessControlPolicy/AccessControlList/Grant/Grantee/URI").returns("http://acs.amazonaws.com/groups/global/AllUsers", "returns the third Grant's Grantee URI") do - xml = Fog::Storage::AWS.hash_to_acl(acl) + xml = Fog::AWS::Storage.hash_to_acl(acl) Nokogiri::XML(xml).xpath("//AccessControlPolicy/AccessControlList/Grant/Grantee/URI").first.content end end @@ -203,7 +203,7 @@ XML "Permission" => "FULL_CONTROL" }] }, 'returns hash of ACL XML') do - Fog::Storage::AWS.acl_to_hash(acl_xml) + Fog::AWS::Storage.acl_to_hash(acl_xml) end end end diff --git a/tests/requests/storage/cors_utils_tests.rb b/tests/requests/storage/cors_utils_tests.rb index c8c8847c2..ae6d335ae 100644 --- a/tests/requests/storage/cors_utils_tests.rb +++ b/tests/requests/storage/cors_utils_tests.rb @@ -1,14 +1,14 @@ require 'fog/aws/requests/storage/cors_utils' -Shindo.tests('Fog::Storage::AWS | CORS utils', ["aws"]) do +Shindo.tests('Fog::AWS::Storage | CORS utils', ["aws"]) do tests(".hash_to_cors") do tests(".hash_to_cors({}) at xpath //CORSConfiguration").returns("", "has an empty CORSConfiguration") do - xml = Fog::Storage::AWS.hash_to_cors({}) + xml = Fog::AWS::Storage.hash_to_cors({}) Nokogiri::XML(xml).xpath("//CORSConfiguration").first.content.chomp end tests(".hash_to_cors({}) at xpath //CORSConfiguration/CORSRule").returns(nil, "has no CORSRules") do - xml = Fog::Storage::AWS.hash_to_cors({}) + xml = Fog::AWS::Storage.hash_to_cors({}) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule").first end @@ -26,52 +26,52 @@ Shindo.tests('Fog::Storage::AWS | CORS utils', ["aws"]) do } tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/AllowedOrigin").returns("origin_123", "returns the CORSRule AllowedOrigin") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/AllowedOrigin")[0].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/AllowedOrigin").returns("origin_456", "returns the CORSRule AllowedOrigin") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/AllowedOrigin")[1].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/AllowedMethod").returns("GET", "returns the CORSRule AllowedMethod") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/AllowedMethod")[0].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/AllowedMethod").returns("POST", "returns the CORSRule AllowedMethod") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/AllowedMethod")[1].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/AllowedHeader").returns("Accept", "returns the CORSRule AllowedHeader") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/AllowedHeader")[0].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/AllowedHeader").returns("Content-Type", "returns the CORSRule AllowedHeader") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/AllowedHeader")[1].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/ID").returns("blah-888", "returns the CORSRule ID") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/ID")[0].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/MaxAgeSeconds").returns("2500", "returns the CORSRule MaxAgeSeconds") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/MaxAgeSeconds")[0].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/ExposeHeader").returns("x-some-header", "returns the CORSRule ExposeHeader") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/ExposeHeader")[0].content end tests(".hash_to_cors(#{cors.inspect}) at xpath //CORSConfiguration/CORSRule/ExposeHeader").returns("x-other-header", "returns the CORSRule ExposeHeader") do - xml = Fog::Storage::AWS.hash_to_cors(cors) + xml = Fog::AWS::Storage.hash_to_cors(cors) Nokogiri::XML(xml).xpath("//CORSConfiguration/CORSRule/ExposeHeader")[1].content end end @@ -102,7 +102,7 @@ XML "ExposeHeader" => ["x-amz-server-side-encryption", "x-amz-balls"] }] }, 'returns hash of CORS XML') do - Fog::Storage::AWS.cors_to_hash(cors_xml) + Fog::AWS::Storage.cors_to_hash(cors_xml) end end end diff --git a/tests/storage_tests.rb b/tests/storage_tests.rb index 0f2748dfe..a8a307a1d 100644 --- a/tests/storage_tests.rb +++ b/tests/storage_tests.rb @@ -2,6 +2,6 @@ Shindo.tests('AWS Storage | escape', ['aws']) do tests('Keys can contain a hierarchical prefix which should not be escaped') do - returns( Fog::Storage::AWS.new.send(:escape, "key/with/prefix") ) { "key/with/prefix" } + returns( Fog::AWS::Storage.new.send(:escape, "key/with/prefix") ) { "key/with/prefix" } end end From afa48062bc1d78c3d46b66e538a1302d246e32c9 Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:14:23 +0900 Subject: [PATCH 08/13] git grep -l "module Storage" -- lib/fog/aws/storage.rb | xargs sed -i "" "s/module Storage/module AWS/g" --- lib/fog/aws/storage.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/aws/storage.rb b/lib/fog/aws/storage.rb index c9b586f98..285edacc7 100644 --- a/lib/fog/aws/storage.rb +++ b/lib/fog/aws/storage.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS < Fog::Service extend Fog::AWS::CredentialFetcher::ServiceMethods From f244ee944ca83cb4c04ee698d914345e9d9a5e36 Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:14:34 +0900 Subject: [PATCH 09/13] git grep -l "class AWS" -- lib/fog/aws/storage.rb | xargs sed -i "" "s/class AWS/class Storage/g" --- lib/fog/aws/storage.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/aws/storage.rb b/lib/fog/aws/storage.rb index 285edacc7..a2bab86d4 100644 --- a/lib/fog/aws/storage.rb +++ b/lib/fog/aws/storage.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS < Fog::Service + class Storage < Fog::Service extend Fog::AWS::CredentialFetcher::ServiceMethods COMPLIANT_BUCKET_NAMES = /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\.(?![\.\-])|\-(?![\.])){1,61}[a-z0-9]$/ From 62a716fe2361866ca1d759fa16d2537d93ab4505 Mon Sep 17 00:00:00 2001 From: sue445 Date: Sun, 16 Sep 2018 17:29:42 +0900 Subject: [PATCH 10/13] git grep -l "module Storage" -- lib/fog/aws/requests/storage/ | xargs sed -i "" "s/module Storage/module AWS/g" --- lib/fog/aws/requests/storage/abort_multipart_upload.rb | 2 +- lib/fog/aws/requests/storage/acl_utils.rb | 2 +- lib/fog/aws/requests/storage/complete_multipart_upload.rb | 2 +- lib/fog/aws/requests/storage/copy_object.rb | 2 +- lib/fog/aws/requests/storage/cors_utils.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_cors.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_policy.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_tagging.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_website.rb | 2 +- lib/fog/aws/requests/storage/delete_multiple_objects.rb | 2 +- lib/fog/aws/requests/storage/delete_object.rb | 2 +- lib/fog/aws/requests/storage/delete_object_url.rb | 2 +- lib/fog/aws/requests/storage/get_bucket.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_acl.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_cors.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_lifecycle.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_location.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_logging.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_notification.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_object_versions.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_policy.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_tagging.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_versioning.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_website.rb | 2 +- lib/fog/aws/requests/storage/get_object.rb | 2 +- lib/fog/aws/requests/storage/get_object_acl.rb | 2 +- lib/fog/aws/requests/storage/get_object_http_url.rb | 2 +- lib/fog/aws/requests/storage/get_object_https_url.rb | 2 +- lib/fog/aws/requests/storage/get_object_torrent.rb | 2 +- lib/fog/aws/requests/storage/get_object_url.rb | 2 +- lib/fog/aws/requests/storage/get_request_payment.rb | 2 +- lib/fog/aws/requests/storage/get_service.rb | 2 +- lib/fog/aws/requests/storage/head_bucket.rb | 2 +- lib/fog/aws/requests/storage/head_object.rb | 2 +- lib/fog/aws/requests/storage/head_object_url.rb | 2 +- lib/fog/aws/requests/storage/initiate_multipart_upload.rb | 2 +- lib/fog/aws/requests/storage/list_multipart_uploads.rb | 2 +- lib/fog/aws/requests/storage/list_parts.rb | 2 +- lib/fog/aws/requests/storage/post_object_hidden_fields.rb | 2 +- lib/fog/aws/requests/storage/post_object_restore.rb | 2 +- lib/fog/aws/requests/storage/put_bucket.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_acl.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_cors.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_lifecycle.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_logging.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_notification.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_policy.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_tagging.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_versioning.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_website.rb | 2 +- lib/fog/aws/requests/storage/put_object.rb | 2 +- lib/fog/aws/requests/storage/put_object_acl.rb | 2 +- lib/fog/aws/requests/storage/put_object_url.rb | 2 +- lib/fog/aws/requests/storage/put_request_payment.rb | 2 +- lib/fog/aws/requests/storage/shared_mock_methods.rb | 2 +- lib/fog/aws/requests/storage/sync_clock.rb | 2 +- lib/fog/aws/requests/storage/upload_part.rb | 2 +- 59 files changed, 59 insertions(+), 59 deletions(-) diff --git a/lib/fog/aws/requests/storage/abort_multipart_upload.rb b/lib/fog/aws/requests/storage/abort_multipart_upload.rb index bc5f46e10..68fbf561f 100644 --- a/lib/fog/aws/requests/storage/abort_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/abort_multipart_upload.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # diff --git a/lib/fog/aws/requests/storage/acl_utils.rb b/lib/fog/aws/requests/storage/acl_utils.rb index 17b494fe6..cb0ebac2b 100644 --- a/lib/fog/aws/requests/storage/acl_utils.rb +++ b/lib/fog/aws/requests/storage/acl_utils.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS require 'fog/aws/parsers/storage/access_control_list' diff --git a/lib/fog/aws/requests/storage/complete_multipart_upload.rb b/lib/fog/aws/requests/storage/complete_multipart_upload.rb index 4eac73b9d..f12cecb3c 100644 --- a/lib/fog/aws/requests/storage/complete_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/complete_multipart_upload.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/complete_multipart_upload' diff --git a/lib/fog/aws/requests/storage/copy_object.rb b/lib/fog/aws/requests/storage/copy_object.rb index 89963ee9e..0c3340dee 100644 --- a/lib/fog/aws/requests/storage/copy_object.rb +++ b/lib/fog/aws/requests/storage/copy_object.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/copy_object' diff --git a/lib/fog/aws/requests/storage/cors_utils.rb b/lib/fog/aws/requests/storage/cors_utils.rb index 39222dfe0..c94ac7e43 100644 --- a/lib/fog/aws/requests/storage/cors_utils.rb +++ b/lib/fog/aws/requests/storage/cors_utils.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS require 'fog/aws/parsers/storage/cors_configuration' diff --git a/lib/fog/aws/requests/storage/delete_bucket.rb b/lib/fog/aws/requests/storage/delete_bucket.rb index 2d5331038..7d18f8d17 100644 --- a/lib/fog/aws/requests/storage/delete_bucket.rb +++ b/lib/fog/aws/requests/storage/delete_bucket.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Delete an S3 bucket diff --git a/lib/fog/aws/requests/storage/delete_bucket_cors.rb b/lib/fog/aws/requests/storage/delete_bucket_cors.rb index 27900a6ac..d1faa450b 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_cors.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_cors.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Deletes the cors configuration information set for the bucket. diff --git a/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb b/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb index 3574fbbdd..f47cb5138 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Delete lifecycle configuration for a bucket diff --git a/lib/fog/aws/requests/storage/delete_bucket_policy.rb b/lib/fog/aws/requests/storage/delete_bucket_policy.rb index d698f3ea8..3af7e3333 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_policy.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_policy.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Delete policy for a bucket diff --git a/lib/fog/aws/requests/storage/delete_bucket_tagging.rb b/lib/fog/aws/requests/storage/delete_bucket_tagging.rb index 8c3af34ec..1b1f5b6e7 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_tagging.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_tagging.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Delete tagging for a bucket diff --git a/lib/fog/aws/requests/storage/delete_bucket_website.rb b/lib/fog/aws/requests/storage/delete_bucket_website.rb index d6e80d802..d5bb66630 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_website.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_website.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Delete website configuration for a bucket diff --git a/lib/fog/aws/requests/storage/delete_multiple_objects.rb b/lib/fog/aws/requests/storage/delete_multiple_objects.rb index ea3c44b18..00c0239f6 100644 --- a/lib/fog/aws/requests/storage/delete_multiple_objects.rb +++ b/lib/fog/aws/requests/storage/delete_multiple_objects.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/delete_multiple_objects' diff --git a/lib/fog/aws/requests/storage/delete_object.rb b/lib/fog/aws/requests/storage/delete_object.rb index b56adcab7..ea04059ed 100644 --- a/lib/fog/aws/requests/storage/delete_object.rb +++ b/lib/fog/aws/requests/storage/delete_object.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Delete an object from S3 diff --git a/lib/fog/aws/requests/storage/delete_object_url.rb b/lib/fog/aws/requests/storage/delete_object_url.rb index ecbcdf6c8..860a39d60 100644 --- a/lib/fog/aws/requests/storage/delete_object_url.rb +++ b/lib/fog/aws/requests/storage/delete_object_url.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS module DeleteObjectUrl def delete_object_url(bucket_name, object_name, expires, options = {}) diff --git a/lib/fog/aws/requests/storage/get_bucket.rb b/lib/fog/aws/requests/storage/get_bucket.rb index 49e976ff9..8cbd2a32b 100644 --- a/lib/fog/aws/requests/storage/get_bucket.rb +++ b/lib/fog/aws/requests/storage/get_bucket.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket' diff --git a/lib/fog/aws/requests/storage/get_bucket_acl.rb b/lib/fog/aws/requests/storage/get_bucket_acl.rb index 259970c44..62910e213 100644 --- a/lib/fog/aws/requests/storage/get_bucket_acl.rb +++ b/lib/fog/aws/requests/storage/get_bucket_acl.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/access_control_list' diff --git a/lib/fog/aws/requests/storage/get_bucket_cors.rb b/lib/fog/aws/requests/storage/get_bucket_cors.rb index 2152d7252..5f2aaf74b 100644 --- a/lib/fog/aws/requests/storage/get_bucket_cors.rb +++ b/lib/fog/aws/requests/storage/get_bucket_cors.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/cors_configuration' diff --git a/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb b/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb index 231c652f7..cbf640697 100644 --- a/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +++ b/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket_lifecycle' diff --git a/lib/fog/aws/requests/storage/get_bucket_location.rb b/lib/fog/aws/requests/storage/get_bucket_location.rb index 05baa11f3..98706d4e4 100644 --- a/lib/fog/aws/requests/storage/get_bucket_location.rb +++ b/lib/fog/aws/requests/storage/get_bucket_location.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket_location' diff --git a/lib/fog/aws/requests/storage/get_bucket_logging.rb b/lib/fog/aws/requests/storage/get_bucket_logging.rb index 6cee5d712..0710cb899 100644 --- a/lib/fog/aws/requests/storage/get_bucket_logging.rb +++ b/lib/fog/aws/requests/storage/get_bucket_logging.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket_logging' diff --git a/lib/fog/aws/requests/storage/get_bucket_notification.rb b/lib/fog/aws/requests/storage/get_bucket_notification.rb index 133b9777c..5184c676d 100644 --- a/lib/fog/aws/requests/storage/get_bucket_notification.rb +++ b/lib/fog/aws/requests/storage/get_bucket_notification.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket_notification' diff --git a/lib/fog/aws/requests/storage/get_bucket_object_versions.rb b/lib/fog/aws/requests/storage/get_bucket_object_versions.rb index dc2597dd7..8f0902311 100644 --- a/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +++ b/lib/fog/aws/requests/storage/get_bucket_object_versions.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket_object_versions' diff --git a/lib/fog/aws/requests/storage/get_bucket_policy.rb b/lib/fog/aws/requests/storage/get_bucket_policy.rb index 8a1c793c6..2d004a1ab 100644 --- a/lib/fog/aws/requests/storage/get_bucket_policy.rb +++ b/lib/fog/aws/requests/storage/get_bucket_policy.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Get bucket policy for an S3 bucket diff --git a/lib/fog/aws/requests/storage/get_bucket_tagging.rb b/lib/fog/aws/requests/storage/get_bucket_tagging.rb index 799568a50..324cf4ca6 100644 --- a/lib/fog/aws/requests/storage/get_bucket_tagging.rb +++ b/lib/fog/aws/requests/storage/get_bucket_tagging.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket_tagging' diff --git a/lib/fog/aws/requests/storage/get_bucket_versioning.rb b/lib/fog/aws/requests/storage/get_bucket_versioning.rb index 0ca19f6e9..946f0c4a0 100644 --- a/lib/fog/aws/requests/storage/get_bucket_versioning.rb +++ b/lib/fog/aws/requests/storage/get_bucket_versioning.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket_versioning' diff --git a/lib/fog/aws/requests/storage/get_bucket_website.rb b/lib/fog/aws/requests/storage/get_bucket_website.rb index c0f8d4c80..16790ee52 100644 --- a/lib/fog/aws/requests/storage/get_bucket_website.rb +++ b/lib/fog/aws/requests/storage/get_bucket_website.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_bucket_website' diff --git a/lib/fog/aws/requests/storage/get_object.rb b/lib/fog/aws/requests/storage/get_object.rb index 5096d4ec0..89308c397 100644 --- a/lib/fog/aws/requests/storage/get_object.rb +++ b/lib/fog/aws/requests/storage/get_object.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Get an object from S3 diff --git a/lib/fog/aws/requests/storage/get_object_acl.rb b/lib/fog/aws/requests/storage/get_object_acl.rb index b17b5b8ba..f782cd506 100644 --- a/lib/fog/aws/requests/storage/get_object_acl.rb +++ b/lib/fog/aws/requests/storage/get_object_acl.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/access_control_list' diff --git a/lib/fog/aws/requests/storage/get_object_http_url.rb b/lib/fog/aws/requests/storage/get_object_http_url.rb index 1b5480a03..d00946e0c 100644 --- a/lib/fog/aws/requests/storage/get_object_http_url.rb +++ b/lib/fog/aws/requests/storage/get_object_http_url.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS module GetObjectHttpUrl def get_object_http_url(bucket_name, object_name, expires, options = {}) diff --git a/lib/fog/aws/requests/storage/get_object_https_url.rb b/lib/fog/aws/requests/storage/get_object_https_url.rb index 5b8411ed6..1db402cf9 100644 --- a/lib/fog/aws/requests/storage/get_object_https_url.rb +++ b/lib/fog/aws/requests/storage/get_object_https_url.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS module GetObjectHttpsUrl def get_object_https_url(bucket_name, object_name, expires, options = {}) diff --git a/lib/fog/aws/requests/storage/get_object_torrent.rb b/lib/fog/aws/requests/storage/get_object_torrent.rb index 2ebab2d4a..efe07d620 100644 --- a/lib/fog/aws/requests/storage/get_object_torrent.rb +++ b/lib/fog/aws/requests/storage/get_object_torrent.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Get torrent for an S3 object diff --git a/lib/fog/aws/requests/storage/get_object_url.rb b/lib/fog/aws/requests/storage/get_object_url.rb index fc304e103..980fecaa8 100644 --- a/lib/fog/aws/requests/storage/get_object_url.rb +++ b/lib/fog/aws/requests/storage/get_object_url.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS module GetObjectUrl def get_object_url(bucket_name, object_name, expires, options = {}) diff --git a/lib/fog/aws/requests/storage/get_request_payment.rb b/lib/fog/aws/requests/storage/get_request_payment.rb index 3840525ac..35d396b50 100644 --- a/lib/fog/aws/requests/storage/get_request_payment.rb +++ b/lib/fog/aws/requests/storage/get_request_payment.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_request_payment' diff --git a/lib/fog/aws/requests/storage/get_service.rb b/lib/fog/aws/requests/storage/get_service.rb index 770e87ca0..3df989819 100644 --- a/lib/fog/aws/requests/storage/get_service.rb +++ b/lib/fog/aws/requests/storage/get_service.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/get_service' diff --git a/lib/fog/aws/requests/storage/head_bucket.rb b/lib/fog/aws/requests/storage/head_bucket.rb index 7ef4fb634..7ca8fb50e 100644 --- a/lib/fog/aws/requests/storage/head_bucket.rb +++ b/lib/fog/aws/requests/storage/head_bucket.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Get headers for an S3 bucket, used to verify if it exists and if you have permission to access it diff --git a/lib/fog/aws/requests/storage/head_object.rb b/lib/fog/aws/requests/storage/head_object.rb index 9d2d1e33b..040fba8ad 100644 --- a/lib/fog/aws/requests/storage/head_object.rb +++ b/lib/fog/aws/requests/storage/head_object.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Get headers for an object from S3 diff --git a/lib/fog/aws/requests/storage/head_object_url.rb b/lib/fog/aws/requests/storage/head_object_url.rb index 3b85a02c2..346748d02 100644 --- a/lib/fog/aws/requests/storage/head_object_url.rb +++ b/lib/fog/aws/requests/storage/head_object_url.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS module HeadObjectUrl def head_object_url(bucket_name, object_name, expires, options = {}) diff --git a/lib/fog/aws/requests/storage/initiate_multipart_upload.rb b/lib/fog/aws/requests/storage/initiate_multipart_upload.rb index f824c20f5..80973cad3 100644 --- a/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/initiate_multipart_upload.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/initiate_multipart_upload' diff --git a/lib/fog/aws/requests/storage/list_multipart_uploads.rb b/lib/fog/aws/requests/storage/list_multipart_uploads.rb index a5c332e4b..d6f51ea39 100644 --- a/lib/fog/aws/requests/storage/list_multipart_uploads.rb +++ b/lib/fog/aws/requests/storage/list_multipart_uploads.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/list_multipart_uploads' diff --git a/lib/fog/aws/requests/storage/list_parts.rb b/lib/fog/aws/requests/storage/list_parts.rb index 74f0ce5a1..9b3e82b94 100644 --- a/lib/fog/aws/requests/storage/list_parts.rb +++ b/lib/fog/aws/requests/storage/list_parts.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/parsers/storage/list_parts' diff --git a/lib/fog/aws/requests/storage/post_object_hidden_fields.rb b/lib/fog/aws/requests/storage/post_object_hidden_fields.rb index 177615fc7..a3dfcf2a6 100644 --- a/lib/fog/aws/requests/storage/post_object_hidden_fields.rb +++ b/lib/fog/aws/requests/storage/post_object_hidden_fields.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS module PostObjectHiddenFields # Get a hash of hidden fields for form uploading to S3, in the form {:field_name => :field_value} diff --git a/lib/fog/aws/requests/storage/post_object_restore.rb b/lib/fog/aws/requests/storage/post_object_restore.rb index 84a3cf1e3..eeffcbc93 100644 --- a/lib/fog/aws/requests/storage/post_object_restore.rb +++ b/lib/fog/aws/requests/storage/post_object_restore.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Restore an object from Glacier to its original S3 path diff --git a/lib/fog/aws/requests/storage/put_bucket.rb b/lib/fog/aws/requests/storage/put_bucket.rb index 87f4c2888..de25e4754 100644 --- a/lib/fog/aws/requests/storage/put_bucket.rb +++ b/lib/fog/aws/requests/storage/put_bucket.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Create an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_bucket_acl.rb b/lib/fog/aws/requests/storage/put_bucket_acl.rb index 67050a897..d25f6096b 100644 --- a/lib/fog/aws/requests/storage/put_bucket_acl.rb +++ b/lib/fog/aws/requests/storage/put_bucket_acl.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/requests/storage/acl_utils' diff --git a/lib/fog/aws/requests/storage/put_bucket_cors.rb b/lib/fog/aws/requests/storage/put_bucket_cors.rb index d71e3852d..60da58675 100644 --- a/lib/fog/aws/requests/storage/put_bucket_cors.rb +++ b/lib/fog/aws/requests/storage/put_bucket_cors.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/requests/storage/cors_utils' diff --git a/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb b/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb index 3a5f61837..025072e82 100644 --- a/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +++ b/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Change lifecycle configuration for an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_bucket_logging.rb b/lib/fog/aws/requests/storage/put_bucket_logging.rb index 50a387b48..a6536d6fb 100644 --- a/lib/fog/aws/requests/storage/put_bucket_logging.rb +++ b/lib/fog/aws/requests/storage/put_bucket_logging.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Change logging status for an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_bucket_notification.rb b/lib/fog/aws/requests/storage/put_bucket_notification.rb index 22f7b3143..e34aa72f7 100644 --- a/lib/fog/aws/requests/storage/put_bucket_notification.rb +++ b/lib/fog/aws/requests/storage/put_bucket_notification.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Change notification configuration for an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_bucket_policy.rb b/lib/fog/aws/requests/storage/put_bucket_policy.rb index 35c1f720d..ac034ed6f 100644 --- a/lib/fog/aws/requests/storage/put_bucket_policy.rb +++ b/lib/fog/aws/requests/storage/put_bucket_policy.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Change bucket policy for an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_bucket_tagging.rb b/lib/fog/aws/requests/storage/put_bucket_tagging.rb index ede19fe25..c0db76f06 100644 --- a/lib/fog/aws/requests/storage/put_bucket_tagging.rb +++ b/lib/fog/aws/requests/storage/put_bucket_tagging.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Change tag set for an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_bucket_versioning.rb b/lib/fog/aws/requests/storage/put_bucket_versioning.rb index deb1f1188..c8dee0dce 100644 --- a/lib/fog/aws/requests/storage/put_bucket_versioning.rb +++ b/lib/fog/aws/requests/storage/put_bucket_versioning.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Change versioning status for an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_bucket_website.rb b/lib/fog/aws/requests/storage/put_bucket_website.rb index 4feebe6b7..a18c9ba9b 100644 --- a/lib/fog/aws/requests/storage/put_bucket_website.rb +++ b/lib/fog/aws/requests/storage/put_bucket_website.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Change website configuration for an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_object.rb b/lib/fog/aws/requests/storage/put_object.rb index e5ce65bb8..997d14f22 100644 --- a/lib/fog/aws/requests/storage/put_object.rb +++ b/lib/fog/aws/requests/storage/put_object.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Create an object in an S3 bucket diff --git a/lib/fog/aws/requests/storage/put_object_acl.rb b/lib/fog/aws/requests/storage/put_object_acl.rb index eec630e3e..23a7346a1 100644 --- a/lib/fog/aws/requests/storage/put_object_acl.rb +++ b/lib/fog/aws/requests/storage/put_object_acl.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real require 'fog/aws/requests/storage/acl_utils' diff --git a/lib/fog/aws/requests/storage/put_object_url.rb b/lib/fog/aws/requests/storage/put_object_url.rb index b0ea262c2..0275cb7ee 100644 --- a/lib/fog/aws/requests/storage/put_object_url.rb +++ b/lib/fog/aws/requests/storage/put_object_url.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS module PutObjectUrl def put_object_url(bucket_name, object_name, expires, headers = {}, options = {}) diff --git a/lib/fog/aws/requests/storage/put_request_payment.rb b/lib/fog/aws/requests/storage/put_request_payment.rb index 5126808e2..fac417866 100644 --- a/lib/fog/aws/requests/storage/put_request_payment.rb +++ b/lib/fog/aws/requests/storage/put_request_payment.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Change who pays for requests to an S3 bucket diff --git a/lib/fog/aws/requests/storage/shared_mock_methods.rb b/lib/fog/aws/requests/storage/shared_mock_methods.rb index 5038330e7..e4da701f3 100644 --- a/lib/fog/aws/requests/storage/shared_mock_methods.rb +++ b/lib/fog/aws/requests/storage/shared_mock_methods.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS module SharedMockMethods def define_mock_acl(bucket_name, object_name, options) diff --git a/lib/fog/aws/requests/storage/sync_clock.rb b/lib/fog/aws/requests/storage/sync_clock.rb index 669041288..294e02ec9 100644 --- a/lib/fog/aws/requests/storage/sync_clock.rb +++ b/lib/fog/aws/requests/storage/sync_clock.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Sync clock against S3 to avoid skew errors diff --git a/lib/fog/aws/requests/storage/upload_part.rb b/lib/fog/aws/requests/storage/upload_part.rb index 60486355d..f175a5784 100644 --- a/lib/fog/aws/requests/storage/upload_part.rb +++ b/lib/fog/aws/requests/storage/upload_part.rb @@ -1,5 +1,5 @@ module Fog - module Storage + module AWS class AWS class Real # Upload a part for a multipart upload From d0a52e2da22353f1c68438da86a38e3c49c29aab Mon Sep 17 00:00:00 2001 From: sue445 Date: Sun, 16 Sep 2018 17:30:40 +0900 Subject: [PATCH 11/13] git grep -l "class AWS" -- lib/fog/aws/requests/storage/ | xargs sed -i "" "s/class AWS/class Storage/g" --- lib/fog/aws/requests/storage/abort_multipart_upload.rb | 2 +- lib/fog/aws/requests/storage/acl_utils.rb | 2 +- lib/fog/aws/requests/storage/complete_multipart_upload.rb | 2 +- lib/fog/aws/requests/storage/copy_object.rb | 2 +- lib/fog/aws/requests/storage/cors_utils.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_cors.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_policy.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_tagging.rb | 2 +- lib/fog/aws/requests/storage/delete_bucket_website.rb | 2 +- lib/fog/aws/requests/storage/delete_multiple_objects.rb | 2 +- lib/fog/aws/requests/storage/delete_object.rb | 2 +- lib/fog/aws/requests/storage/delete_object_url.rb | 2 +- lib/fog/aws/requests/storage/get_bucket.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_acl.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_cors.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_lifecycle.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_location.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_logging.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_notification.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_object_versions.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_policy.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_tagging.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_versioning.rb | 2 +- lib/fog/aws/requests/storage/get_bucket_website.rb | 2 +- lib/fog/aws/requests/storage/get_object.rb | 2 +- lib/fog/aws/requests/storage/get_object_acl.rb | 2 +- lib/fog/aws/requests/storage/get_object_http_url.rb | 2 +- lib/fog/aws/requests/storage/get_object_https_url.rb | 2 +- lib/fog/aws/requests/storage/get_object_torrent.rb | 2 +- lib/fog/aws/requests/storage/get_object_url.rb | 2 +- lib/fog/aws/requests/storage/get_request_payment.rb | 2 +- lib/fog/aws/requests/storage/get_service.rb | 2 +- lib/fog/aws/requests/storage/head_bucket.rb | 2 +- lib/fog/aws/requests/storage/head_object.rb | 2 +- lib/fog/aws/requests/storage/head_object_url.rb | 2 +- lib/fog/aws/requests/storage/initiate_multipart_upload.rb | 2 +- lib/fog/aws/requests/storage/list_multipart_uploads.rb | 2 +- lib/fog/aws/requests/storage/list_parts.rb | 2 +- lib/fog/aws/requests/storage/post_object_hidden_fields.rb | 2 +- lib/fog/aws/requests/storage/post_object_restore.rb | 2 +- lib/fog/aws/requests/storage/put_bucket.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_acl.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_cors.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_lifecycle.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_logging.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_notification.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_policy.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_tagging.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_versioning.rb | 2 +- lib/fog/aws/requests/storage/put_bucket_website.rb | 2 +- lib/fog/aws/requests/storage/put_object.rb | 2 +- lib/fog/aws/requests/storage/put_object_acl.rb | 2 +- lib/fog/aws/requests/storage/put_object_url.rb | 2 +- lib/fog/aws/requests/storage/put_request_payment.rb | 2 +- lib/fog/aws/requests/storage/shared_mock_methods.rb | 2 +- lib/fog/aws/requests/storage/sync_clock.rb | 2 +- lib/fog/aws/requests/storage/upload_part.rb | 2 +- 59 files changed, 59 insertions(+), 59 deletions(-) diff --git a/lib/fog/aws/requests/storage/abort_multipart_upload.rb b/lib/fog/aws/requests/storage/abort_multipart_upload.rb index 68fbf561f..fc3644004 100644 --- a/lib/fog/aws/requests/storage/abort_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/abort_multipart_upload.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # # Abort a multipart upload diff --git a/lib/fog/aws/requests/storage/acl_utils.rb b/lib/fog/aws/requests/storage/acl_utils.rb index cb0ebac2b..84a033920 100644 --- a/lib/fog/aws/requests/storage/acl_utils.rb +++ b/lib/fog/aws/requests/storage/acl_utils.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage require 'fog/aws/parsers/storage/access_control_list' private diff --git a/lib/fog/aws/requests/storage/complete_multipart_upload.rb b/lib/fog/aws/requests/storage/complete_multipart_upload.rb index f12cecb3c..6e8b4aa6e 100644 --- a/lib/fog/aws/requests/storage/complete_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/complete_multipart_upload.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/complete_multipart_upload' diff --git a/lib/fog/aws/requests/storage/copy_object.rb b/lib/fog/aws/requests/storage/copy_object.rb index 0c3340dee..4ae10f0b6 100644 --- a/lib/fog/aws/requests/storage/copy_object.rb +++ b/lib/fog/aws/requests/storage/copy_object.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/copy_object' diff --git a/lib/fog/aws/requests/storage/cors_utils.rb b/lib/fog/aws/requests/storage/cors_utils.rb index c94ac7e43..35cc38bc7 100644 --- a/lib/fog/aws/requests/storage/cors_utils.rb +++ b/lib/fog/aws/requests/storage/cors_utils.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage require 'fog/aws/parsers/storage/cors_configuration' private diff --git a/lib/fog/aws/requests/storage/delete_bucket.rb b/lib/fog/aws/requests/storage/delete_bucket.rb index 7d18f8d17..dac053652 100644 --- a/lib/fog/aws/requests/storage/delete_bucket.rb +++ b/lib/fog/aws/requests/storage/delete_bucket.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Delete an S3 bucket # diff --git a/lib/fog/aws/requests/storage/delete_bucket_cors.rb b/lib/fog/aws/requests/storage/delete_bucket_cors.rb index d1faa450b..ee949e479 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_cors.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_cors.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Deletes the cors configuration information set for the bucket. # diff --git a/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb b/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb index f47cb5138..97c6d609a 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_lifecycle.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Delete lifecycle configuration for a bucket # diff --git a/lib/fog/aws/requests/storage/delete_bucket_policy.rb b/lib/fog/aws/requests/storage/delete_bucket_policy.rb index 3af7e3333..355d7fd4f 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_policy.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_policy.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Delete policy for a bucket # diff --git a/lib/fog/aws/requests/storage/delete_bucket_tagging.rb b/lib/fog/aws/requests/storage/delete_bucket_tagging.rb index 1b1f5b6e7..e929220ce 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_tagging.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_tagging.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Delete tagging for a bucket # diff --git a/lib/fog/aws/requests/storage/delete_bucket_website.rb b/lib/fog/aws/requests/storage/delete_bucket_website.rb index d5bb66630..437037c90 100644 --- a/lib/fog/aws/requests/storage/delete_bucket_website.rb +++ b/lib/fog/aws/requests/storage/delete_bucket_website.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Delete website configuration for a bucket # diff --git a/lib/fog/aws/requests/storage/delete_multiple_objects.rb b/lib/fog/aws/requests/storage/delete_multiple_objects.rb index 00c0239f6..7b79d3750 100644 --- a/lib/fog/aws/requests/storage/delete_multiple_objects.rb +++ b/lib/fog/aws/requests/storage/delete_multiple_objects.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/delete_multiple_objects' diff --git a/lib/fog/aws/requests/storage/delete_object.rb b/lib/fog/aws/requests/storage/delete_object.rb index ea04059ed..0e416eea7 100644 --- a/lib/fog/aws/requests/storage/delete_object.rb +++ b/lib/fog/aws/requests/storage/delete_object.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Delete an object from S3 # diff --git a/lib/fog/aws/requests/storage/delete_object_url.rb b/lib/fog/aws/requests/storage/delete_object_url.rb index 860a39d60..57580ecdf 100644 --- a/lib/fog/aws/requests/storage/delete_object_url.rb +++ b/lib/fog/aws/requests/storage/delete_object_url.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage module DeleteObjectUrl def delete_object_url(bucket_name, object_name, expires, options = {}) unless bucket_name diff --git a/lib/fog/aws/requests/storage/get_bucket.rb b/lib/fog/aws/requests/storage/get_bucket.rb index 8cbd2a32b..5f4ab5095 100644 --- a/lib/fog/aws/requests/storage/get_bucket.rb +++ b/lib/fog/aws/requests/storage/get_bucket.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket' diff --git a/lib/fog/aws/requests/storage/get_bucket_acl.rb b/lib/fog/aws/requests/storage/get_bucket_acl.rb index 62910e213..8213fba16 100644 --- a/lib/fog/aws/requests/storage/get_bucket_acl.rb +++ b/lib/fog/aws/requests/storage/get_bucket_acl.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/access_control_list' diff --git a/lib/fog/aws/requests/storage/get_bucket_cors.rb b/lib/fog/aws/requests/storage/get_bucket_cors.rb index 5f2aaf74b..f3a4db72b 100644 --- a/lib/fog/aws/requests/storage/get_bucket_cors.rb +++ b/lib/fog/aws/requests/storage/get_bucket_cors.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/cors_configuration' diff --git a/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb b/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb index cbf640697..882ecd273 100644 --- a/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb +++ b/lib/fog/aws/requests/storage/get_bucket_lifecycle.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket_lifecycle' diff --git a/lib/fog/aws/requests/storage/get_bucket_location.rb b/lib/fog/aws/requests/storage/get_bucket_location.rb index 98706d4e4..e3441de4e 100644 --- a/lib/fog/aws/requests/storage/get_bucket_location.rb +++ b/lib/fog/aws/requests/storage/get_bucket_location.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket_location' diff --git a/lib/fog/aws/requests/storage/get_bucket_logging.rb b/lib/fog/aws/requests/storage/get_bucket_logging.rb index 0710cb899..d3b4d9165 100644 --- a/lib/fog/aws/requests/storage/get_bucket_logging.rb +++ b/lib/fog/aws/requests/storage/get_bucket_logging.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket_logging' diff --git a/lib/fog/aws/requests/storage/get_bucket_notification.rb b/lib/fog/aws/requests/storage/get_bucket_notification.rb index 5184c676d..24dab6891 100644 --- a/lib/fog/aws/requests/storage/get_bucket_notification.rb +++ b/lib/fog/aws/requests/storage/get_bucket_notification.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket_notification' diff --git a/lib/fog/aws/requests/storage/get_bucket_object_versions.rb b/lib/fog/aws/requests/storage/get_bucket_object_versions.rb index 8f0902311..466c698df 100644 --- a/lib/fog/aws/requests/storage/get_bucket_object_versions.rb +++ b/lib/fog/aws/requests/storage/get_bucket_object_versions.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket_object_versions' diff --git a/lib/fog/aws/requests/storage/get_bucket_policy.rb b/lib/fog/aws/requests/storage/get_bucket_policy.rb index 2d004a1ab..73bafef17 100644 --- a/lib/fog/aws/requests/storage/get_bucket_policy.rb +++ b/lib/fog/aws/requests/storage/get_bucket_policy.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Get bucket policy for an S3 bucket # diff --git a/lib/fog/aws/requests/storage/get_bucket_tagging.rb b/lib/fog/aws/requests/storage/get_bucket_tagging.rb index 324cf4ca6..9b5e36278 100644 --- a/lib/fog/aws/requests/storage/get_bucket_tagging.rb +++ b/lib/fog/aws/requests/storage/get_bucket_tagging.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket_tagging' diff --git a/lib/fog/aws/requests/storage/get_bucket_versioning.rb b/lib/fog/aws/requests/storage/get_bucket_versioning.rb index 946f0c4a0..2610a4c72 100644 --- a/lib/fog/aws/requests/storage/get_bucket_versioning.rb +++ b/lib/fog/aws/requests/storage/get_bucket_versioning.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket_versioning' diff --git a/lib/fog/aws/requests/storage/get_bucket_website.rb b/lib/fog/aws/requests/storage/get_bucket_website.rb index 16790ee52..455f75a3e 100644 --- a/lib/fog/aws/requests/storage/get_bucket_website.rb +++ b/lib/fog/aws/requests/storage/get_bucket_website.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_bucket_website' diff --git a/lib/fog/aws/requests/storage/get_object.rb b/lib/fog/aws/requests/storage/get_object.rb index 89308c397..39cff00f3 100644 --- a/lib/fog/aws/requests/storage/get_object.rb +++ b/lib/fog/aws/requests/storage/get_object.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Get an object from S3 # diff --git a/lib/fog/aws/requests/storage/get_object_acl.rb b/lib/fog/aws/requests/storage/get_object_acl.rb index f782cd506..a5aee8093 100644 --- a/lib/fog/aws/requests/storage/get_object_acl.rb +++ b/lib/fog/aws/requests/storage/get_object_acl.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/access_control_list' diff --git a/lib/fog/aws/requests/storage/get_object_http_url.rb b/lib/fog/aws/requests/storage/get_object_http_url.rb index d00946e0c..119849d5c 100644 --- a/lib/fog/aws/requests/storage/get_object_http_url.rb +++ b/lib/fog/aws/requests/storage/get_object_http_url.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage module GetObjectHttpUrl def get_object_http_url(bucket_name, object_name, expires, options = {}) get_object_url(bucket_name, object_name, expires, options.merge(:scheme => 'http')) diff --git a/lib/fog/aws/requests/storage/get_object_https_url.rb b/lib/fog/aws/requests/storage/get_object_https_url.rb index 1db402cf9..363fdc598 100644 --- a/lib/fog/aws/requests/storage/get_object_https_url.rb +++ b/lib/fog/aws/requests/storage/get_object_https_url.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage module GetObjectHttpsUrl def get_object_https_url(bucket_name, object_name, expires, options = {}) get_object_url(bucket_name, object_name, expires, options.merge(:scheme => 'https')) diff --git a/lib/fog/aws/requests/storage/get_object_torrent.rb b/lib/fog/aws/requests/storage/get_object_torrent.rb index efe07d620..1e7e64a00 100644 --- a/lib/fog/aws/requests/storage/get_object_torrent.rb +++ b/lib/fog/aws/requests/storage/get_object_torrent.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Get torrent for an S3 object # diff --git a/lib/fog/aws/requests/storage/get_object_url.rb b/lib/fog/aws/requests/storage/get_object_url.rb index 980fecaa8..106ae80bb 100644 --- a/lib/fog/aws/requests/storage/get_object_url.rb +++ b/lib/fog/aws/requests/storage/get_object_url.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage module GetObjectUrl def get_object_url(bucket_name, object_name, expires, options = {}) unless bucket_name diff --git a/lib/fog/aws/requests/storage/get_request_payment.rb b/lib/fog/aws/requests/storage/get_request_payment.rb index 35d396b50..5b939d8d0 100644 --- a/lib/fog/aws/requests/storage/get_request_payment.rb +++ b/lib/fog/aws/requests/storage/get_request_payment.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_request_payment' diff --git a/lib/fog/aws/requests/storage/get_service.rb b/lib/fog/aws/requests/storage/get_service.rb index 3df989819..3979e016e 100644 --- a/lib/fog/aws/requests/storage/get_service.rb +++ b/lib/fog/aws/requests/storage/get_service.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/get_service' diff --git a/lib/fog/aws/requests/storage/head_bucket.rb b/lib/fog/aws/requests/storage/head_bucket.rb index 7ca8fb50e..68c1b79bb 100644 --- a/lib/fog/aws/requests/storage/head_bucket.rb +++ b/lib/fog/aws/requests/storage/head_bucket.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Get headers for an S3 bucket, used to verify if it exists and if you have permission to access it # diff --git a/lib/fog/aws/requests/storage/head_object.rb b/lib/fog/aws/requests/storage/head_object.rb index 040fba8ad..91b9daed5 100644 --- a/lib/fog/aws/requests/storage/head_object.rb +++ b/lib/fog/aws/requests/storage/head_object.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Get headers for an object from S3 # diff --git a/lib/fog/aws/requests/storage/head_object_url.rb b/lib/fog/aws/requests/storage/head_object_url.rb index 346748d02..5af598612 100644 --- a/lib/fog/aws/requests/storage/head_object_url.rb +++ b/lib/fog/aws/requests/storage/head_object_url.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage module HeadObjectUrl def head_object_url(bucket_name, object_name, expires, options = {}) unless bucket_name diff --git a/lib/fog/aws/requests/storage/initiate_multipart_upload.rb b/lib/fog/aws/requests/storage/initiate_multipart_upload.rb index 80973cad3..b30326b38 100644 --- a/lib/fog/aws/requests/storage/initiate_multipart_upload.rb +++ b/lib/fog/aws/requests/storage/initiate_multipart_upload.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/initiate_multipart_upload' diff --git a/lib/fog/aws/requests/storage/list_multipart_uploads.rb b/lib/fog/aws/requests/storage/list_multipart_uploads.rb index d6f51ea39..8fcb3bab6 100644 --- a/lib/fog/aws/requests/storage/list_multipart_uploads.rb +++ b/lib/fog/aws/requests/storage/list_multipart_uploads.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/list_multipart_uploads' diff --git a/lib/fog/aws/requests/storage/list_parts.rb b/lib/fog/aws/requests/storage/list_parts.rb index 9b3e82b94..326f222f9 100644 --- a/lib/fog/aws/requests/storage/list_parts.rb +++ b/lib/fog/aws/requests/storage/list_parts.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/parsers/storage/list_parts' diff --git a/lib/fog/aws/requests/storage/post_object_hidden_fields.rb b/lib/fog/aws/requests/storage/post_object_hidden_fields.rb index a3dfcf2a6..da7fded8e 100644 --- a/lib/fog/aws/requests/storage/post_object_hidden_fields.rb +++ b/lib/fog/aws/requests/storage/post_object_hidden_fields.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage module PostObjectHiddenFields # Get a hash of hidden fields for form uploading to S3, in the form {:field_name => :field_value} # Form should look like:
diff --git a/lib/fog/aws/requests/storage/post_object_restore.rb b/lib/fog/aws/requests/storage/post_object_restore.rb index eeffcbc93..9b9b05d75 100644 --- a/lib/fog/aws/requests/storage/post_object_restore.rb +++ b/lib/fog/aws/requests/storage/post_object_restore.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Restore an object from Glacier to its original S3 path # diff --git a/lib/fog/aws/requests/storage/put_bucket.rb b/lib/fog/aws/requests/storage/put_bucket.rb index de25e4754..b5e7a8acc 100644 --- a/lib/fog/aws/requests/storage/put_bucket.rb +++ b/lib/fog/aws/requests/storage/put_bucket.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Create an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_bucket_acl.rb b/lib/fog/aws/requests/storage/put_bucket_acl.rb index d25f6096b..586e31fd4 100644 --- a/lib/fog/aws/requests/storage/put_bucket_acl.rb +++ b/lib/fog/aws/requests/storage/put_bucket_acl.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/requests/storage/acl_utils' diff --git a/lib/fog/aws/requests/storage/put_bucket_cors.rb b/lib/fog/aws/requests/storage/put_bucket_cors.rb index 60da58675..854107837 100644 --- a/lib/fog/aws/requests/storage/put_bucket_cors.rb +++ b/lib/fog/aws/requests/storage/put_bucket_cors.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/requests/storage/cors_utils' diff --git a/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb b/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb index 025072e82..6da814b6d 100644 --- a/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb +++ b/lib/fog/aws/requests/storage/put_bucket_lifecycle.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Change lifecycle configuration for an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_bucket_logging.rb b/lib/fog/aws/requests/storage/put_bucket_logging.rb index a6536d6fb..0903555c7 100644 --- a/lib/fog/aws/requests/storage/put_bucket_logging.rb +++ b/lib/fog/aws/requests/storage/put_bucket_logging.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Change logging status for an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_bucket_notification.rb b/lib/fog/aws/requests/storage/put_bucket_notification.rb index e34aa72f7..70f6e9910 100644 --- a/lib/fog/aws/requests/storage/put_bucket_notification.rb +++ b/lib/fog/aws/requests/storage/put_bucket_notification.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Change notification configuration for an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_bucket_policy.rb b/lib/fog/aws/requests/storage/put_bucket_policy.rb index ac034ed6f..7b6fe34d7 100644 --- a/lib/fog/aws/requests/storage/put_bucket_policy.rb +++ b/lib/fog/aws/requests/storage/put_bucket_policy.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Change bucket policy for an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_bucket_tagging.rb b/lib/fog/aws/requests/storage/put_bucket_tagging.rb index c0db76f06..83f8f582d 100644 --- a/lib/fog/aws/requests/storage/put_bucket_tagging.rb +++ b/lib/fog/aws/requests/storage/put_bucket_tagging.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Change tag set for an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_bucket_versioning.rb b/lib/fog/aws/requests/storage/put_bucket_versioning.rb index c8dee0dce..779e211bb 100644 --- a/lib/fog/aws/requests/storage/put_bucket_versioning.rb +++ b/lib/fog/aws/requests/storage/put_bucket_versioning.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Change versioning status for an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_bucket_website.rb b/lib/fog/aws/requests/storage/put_bucket_website.rb index a18c9ba9b..4d009d69a 100644 --- a/lib/fog/aws/requests/storage/put_bucket_website.rb +++ b/lib/fog/aws/requests/storage/put_bucket_website.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Change website configuration for an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_object.rb b/lib/fog/aws/requests/storage/put_object.rb index 997d14f22..94c331a87 100644 --- a/lib/fog/aws/requests/storage/put_object.rb +++ b/lib/fog/aws/requests/storage/put_object.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Create an object in an S3 bucket # diff --git a/lib/fog/aws/requests/storage/put_object_acl.rb b/lib/fog/aws/requests/storage/put_object_acl.rb index 23a7346a1..890e0c46b 100644 --- a/lib/fog/aws/requests/storage/put_object_acl.rb +++ b/lib/fog/aws/requests/storage/put_object_acl.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real require 'fog/aws/requests/storage/acl_utils' diff --git a/lib/fog/aws/requests/storage/put_object_url.rb b/lib/fog/aws/requests/storage/put_object_url.rb index 0275cb7ee..de1bfb333 100644 --- a/lib/fog/aws/requests/storage/put_object_url.rb +++ b/lib/fog/aws/requests/storage/put_object_url.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage module PutObjectUrl def put_object_url(bucket_name, object_name, expires, headers = {}, options = {}) unless bucket_name diff --git a/lib/fog/aws/requests/storage/put_request_payment.rb b/lib/fog/aws/requests/storage/put_request_payment.rb index fac417866..d2837d1b6 100644 --- a/lib/fog/aws/requests/storage/put_request_payment.rb +++ b/lib/fog/aws/requests/storage/put_request_payment.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Change who pays for requests to an S3 bucket # diff --git a/lib/fog/aws/requests/storage/shared_mock_methods.rb b/lib/fog/aws/requests/storage/shared_mock_methods.rb index e4da701f3..077ef23c8 100644 --- a/lib/fog/aws/requests/storage/shared_mock_methods.rb +++ b/lib/fog/aws/requests/storage/shared_mock_methods.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage module SharedMockMethods def define_mock_acl(bucket_name, object_name, options) acl = options['x-amz-acl'] || 'private' diff --git a/lib/fog/aws/requests/storage/sync_clock.rb b/lib/fog/aws/requests/storage/sync_clock.rb index 294e02ec9..aad5d3bec 100644 --- a/lib/fog/aws/requests/storage/sync_clock.rb +++ b/lib/fog/aws/requests/storage/sync_clock.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Sync clock against S3 to avoid skew errors # diff --git a/lib/fog/aws/requests/storage/upload_part.rb b/lib/fog/aws/requests/storage/upload_part.rb index f175a5784..dfcb49af7 100644 --- a/lib/fog/aws/requests/storage/upload_part.rb +++ b/lib/fog/aws/requests/storage/upload_part.rb @@ -1,6 +1,6 @@ module Fog module AWS - class AWS + class Storage class Real # Upload a part for a multipart upload # From 44f7db83d4067b1741e60538f68ddb43b2cef60b Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:15:24 +0900 Subject: [PATCH 12/13] Deprecate Storage::AWS --- lib/fog/aws/storage.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/fog/aws/storage.rb b/lib/fog/aws/storage.rb index a2bab86d4..5e432de2e 100644 --- a/lib/fog/aws/storage.rb +++ b/lib/fog/aws/storage.rb @@ -764,4 +764,17 @@ DATA end end end + + # @deprecated + module Storage + # @deprecated + class AWS < Fog::AWS::Storage + # @deprecated + # @overrides Fog::Service.new (from the fog-core gem) + def self.new(*) + Fog::Logger.deprecation 'Fog::Storage::AWS is deprecated, please use Fog::AWS::Storage.' + super + end + end + end end From 681547418667a35413d8127824cfb2fb94d903f0 Mon Sep 17 00:00:00 2001 From: sue445 Date: Fri, 14 Sep 2018 23:53:52 +0900 Subject: [PATCH 13/13] Fixed: uninitialized constant Fog::AWS::DEFAULT_REGION (NameError) --- lib/fog/aws/models/storage/directory.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/aws/models/storage/directory.rb b/lib/fog/aws/models/storage/directory.rb index 26ac1ee8f..cc30672f7 100644 --- a/lib/fog/aws/models/storage/directory.rb +++ b/lib/fog/aws/models/storage/directory.rb @@ -31,7 +31,7 @@ module Fog end def location - @location ||= (bucket_location || AWS::DEFAULT_REGION) + @location ||= (bucket_location || Storage::DEFAULT_REGION) end # NOTE: you can't change the region once the bucket is created