No commit activity in last 3 years
No release in over 3 years
Adds more server to Sinatra::Base#run! (part of BigBand).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.3.0

Runtime

~> 1.0
 Project Readme

Sinatra::MoreServer

Adds support for more web servers to Sinatra::Base#run!

Also, adds a helper method to ensure the server used from #run! supports async.callback, so all the fancy comet implementations work.

BigBand

Sinatra::MoreServer is part of the BigBand stack. Check it out if you are looking for other fancy Sinatra extensions.

Installation

gem install sinatra-more-server

Additional Servers

Out of the box, Sinatra supports:

Currently, this extensions adds support for:

Usage

Classic style:

require "sinatra"
require "sinatra/more_server"

Or in your own subclass:

require "sinatra/base"
require "sinatra/more_server"

class Foo < Sinatra::Base
  register Sinatra::MoreServer
end

Async only, please!

You use async.callback? Maybe via a library like async_sinatra or pusher? Then you might want to make sure we only use a server that supports it:

require "sinatra"
require "sinatra/more_server"

configure do
  has_async_callback!
end

As mentioned above, this will only have effect on running your script directly. However, in any other case, you will choose your server manually, anyway. (Hint: As far as I know, only thin- and rainbows!-based implementations support async.callback at the moment.)

Thanks

  • Graham Hughes for fixing it to work with Rack >= 1.2