Sha256: acb46840808c51abf1a45a054b99565f9c80a4c49b555bc6cb2b40201fada94d

Contents?: true

Size: 406 Bytes

Versions: 15

Compression:

Stored size: 406 Bytes

Contents

require 'builder'
require 'securerandom'

module FakeSQS
  class Responder

    def call(name, &block)
      xml = Builder::XmlMarkup.new(:indent => 4)
      xml.tag! "#{name}Response" do
        if block
          xml.tag! "#{name}Result" do
            yield xml
          end
        end
        xml.ResponseMetadata do
          xml.RequestId SecureRandom.uuid
        end
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
fake_sqs-0.4.0 lib/fake_sqs/responder.rb
fake_sqs-0.3.1 lib/fake_sqs/responder.rb
fake_sqs-0.3.0 lib/fake_sqs/responder.rb
fake_sqs-0.2.0 lib/fake_sqs/responder.rb
fake_sqs-0.1.0 lib/fake_sqs/responder.rb
fake_sqs-0.0.11 lib/fake_sqs/responder.rb
fake_sqs-0.0.10 lib/fake_sqs/responder.rb
fake_sqs-0.0.9 lib/fake_sqs/responder.rb
fake_sqs-0.0.8 lib/fake_sqs/responder.rb
fake_sqs-0.0.7 lib/fake_sqs/responder.rb
fake_sqs-0.0.6 lib/fake_sqs/responder.rb
fake_sqs-0.0.5 lib/fake_sqs/responder.rb
fake_sqs-0.0.4 lib/fake_sqs/responder.rb
fake_sqs-0.0.3 lib/fake_sqs/responder.rb
fake_sqs-0.0.2 lib/fake_sqs/responder.rb