repo.or.cz
/
rainbows.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
avoid setting "rainbows.autochunk" by default
[rainbows.git]
/
t
/
async_sinatra.ru
blob
94a24b1203e222a21ae1bcff3fc4ba2289e7f2ef
1
# See http://github.com/raggi/async_sinatra
2
# gem install async_sinatra -v0.1.5
3
require 'sinatra/async'
4
5
class AsyncTest < Sinatra::Base
6
register Sinatra::Async
7
8
aget '/:n' do |n|
9
EM.add_timer(n.to_i) { body { "delayed for #{n} seconds\n" } }
10
end
11
end
12
13
run AsyncTest.new