Sha256: 3d3e7b285adea0c0221790eff6ec87a77215cde4ae8f4015b13f2ae636718d17

Contents?: true

Size: 1.19 KB

Versions: 98

Compression:

Stored size: 1.19 KB

Contents

module Fog
  module AWS
    class SQS
      class Real
        require 'fog/aws/parsers/sqs/basic'

        # Delete a queue
        #
        # ==== Parameters
        # * queue_url<~String> - Url of queue to delete
        #
        # ==== See Also
        # http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/APIReference/Query_QueryDeleteQueue.html
        #

        def delete_queue(queue_url)
          request({
            'Action' => 'DeleteQueue',
            :parser  => Fog::Parsers::AWS::SQS::Basic.new,
            :path    => path_from_queue_url(queue_url),
          })
        end
      end

      class Mock
        def delete_queue(queue_url)
          Excon::Response.new.tap do |response|
            if (queue = data[:queues][queue_url])
              response.status = 200

              data[:queues].delete(queue_url)

              response.body = {
                'ResponseMetadata' => {
                  'RequestId' => Fog::AWS::Mock.request_id
                }
              }
            else
              response.status = 404
              raise(Excon::Errors.status_error({:expects => 200}, response))
            end
          end
        end
      end
    end
  end
end

Version data entries

98 entries across 96 versions & 6 rubygems

Version Path
fog-aws-3.30.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.29.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.28.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.27.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.26.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.25.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.24.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.23.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.22.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.21.1 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.21.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.20.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.19.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.18.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.17.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.16.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.15.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.14.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.13.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-aws-3.12.0 lib/fog/aws/requests/sqs/delete_queue.rb