Sha256: fb654366de887460ba80f7b2f3fcb0c62cc88af16d6ecabe7366ec5db39e3532

Contents?: true

Size: 290 Bytes

Versions: 56

Compression:

Stored size: 290 Bytes

Contents

use Rack::ContentLength

run lambda { |env|
  /\A100-continue\z/i =~ env['HTTP_EXPECT'] and return [ 100, {}, [] ]

  env['rack.input'].read
  nr = 1
  env["PATH_INFO"] =~ %r{/([\d\.]+)\z} and nr = $1.to_f

  Rainbows.sleep(nr)

  [ 200, {'Content-Type' => 'text/plain'}, [ "Hello\n" ] ]
}

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
rainbows-5.2.1 t/sleep.ru
rainbows-5.2.0 t/sleep.ru
rainbows-5.1.1 t/sleep.ru
rainbows-5.1.0 t/sleep.ru
rainbows-5.0.0.5.ge717 t/sleep.ru
rainbows-5.0.0 t/sleep.ru
rainbows-4.7.0 t/sleep.ru
rainbows-4.6.2 t/sleep.ru
rainbows-4.6.1 t/sleep.ru
rainbows-4.6.0.4.g4108 t/sleep.ru
rainbows-4.6.0 t/sleep.ru
rainbows-4.5.0 t/sleep.ru
rainbows-4.4.3 t/sleep.ru
rainbows-4.4.2 t/sleep.ru
rainbows-4.4.1.1.gd5c8c t/sleep.ru
rainbows-4.4.1 t/sleep.ru
rainbows-4.4.0 t/sleep.ru
rainbows-4.3.1 t/sleep.ru
rainbows-4.3.0 t/sleep.ru
rainbows-4.2.0 t/sleep.ru