lib/fog/aws/requests/cdn/delete_distribution.rb in fog-aws-3.2.0 vs lib/fog/aws/requests/cdn/delete_distribution.rb in fog-aws-3.3.0

- old
+ new

@@ -1,8 +1,8 @@ module Fog - module CDN - class AWS + module AWS + class CDN class Real # Delete a distribution from CloudFront. # # @param distribution_id [String] Id of distribution to delete. # @param etag [String] etag of that distribution from earlier get or put @@ -24,27 +24,27 @@ def delete_distribution(distribution_id, etag) distribution = self.data[:distributions][distribution_id] if distribution if distribution['ETag'] != etag - Fog::CDN::AWS::Mock.error(:invalid_if_match_version) + Fog::AWS::CDN::Mock.error(:invalid_if_match_version) end unless distribution['DistributionConfig']['CallerReference'] - Fog::CDN::AWS::Mock.error(:illegal_update) + Fog::AWS::CDN::Mock.error(:illegal_update) end if distribution['DistributionConfig']['Enabled'] - Fog::CDN::AWS::Mock.error(:distribution_not_disabled) + Fog::AWS::CDN::Mock.error(:distribution_not_disabled) end self.data[:distributions].delete(distribution_id) self.data[:invalidations].delete(distribution_id) response = Excon::Response.new response.status = 204 response.body = "x-amz-request-id: #{Fog::AWS::Mock.request_id}" response else - Fog::CDN::AWS::Mock.error(:no_such_distribution) + Fog::AWS::CDN::Mock.error(:no_such_distribution) end end end end end