Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Webmachine and Shotgun
task :shotgun do
require "rack"
require "shotgun"
class Shotgun::Loader
# assemble_app gets called inside the request worker
# after forking, so your_app will be loaded freshly
# for each request.
def assemble_app
require "webmachine/adapters/rack"
require "your_app"
Webmachine::Adapters::Rack.new(YourApp.new.application)
end
end
app = Rack::Builder.new do
use Shotgun::SkipFavicon
run Shotgun::Loader.allocate
end
%w{INT TERM QUIT}.each {|signal| trap(signal) { exit! } }
options = {:Host => "127.0.0.1", :Port => 3000}
Rack::Handler.get(:webrick).run(app, options)
end
@Asmod4n

https://gist.github.com/lgierth/4389220#file-rakefile-L12 should be:

Webmachine::Adapters::Rack.new(YourApp.new.application)
@lgierth
Owner

Thanks, updated it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.