Sha256: 5ac9b98e8a2620b10926060315e687be006071c357acec0e6c9f09358ce1b4bc
Contents?: true
Size: 560 Bytes
Versions: 7
Compression:
Stored size: 560 Bytes
Contents
require 'sinatra/base' module FakeSQS class WebInterface < Sinatra::Base configure do use FakeSQS::CatchErrors, response: ErrorResponse end helpers do def action params.fetch("Action") end end get "/" do 200 end delete "/" do settings.api.reset 200 end put "/" do settings.api.expire 200 end post "/" do settings.api.call(action, params) end post "/:queue" do |queue| settings.api.call(action, queue, params) end end end
Version data entries
7 entries across 7 versions & 1 rubygems