Sha256: 921b1c4a70dab98c61825ccb33de1b385e47ad7ec3536402149d3303367f5ba9

Contents?: true

Size: 1.25 KB

Versions: 99

Compression:

Stored size: 1.25 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

99 entries across 99 versions & 17 rubygems

Version Path
fog-maestrodev-1.20.0.20140305101839 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/aws/requests/sqs/delete_queue.rb
fog-1.20.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/aws/requests/sqs/delete_queue.rb
fog-1.19.0 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/aws/requests/sqs/delete_queue.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/aws/requests/sqs/delete_queue.rb