File: dummy_app.rb

package info (click to toggle)
ruby-sinatra 4.2.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,944 kB
  • sloc: ruby: 17,702; sh: 25; makefile: 8
file content (9 lines) | stat: -rw-r--r-- 241 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

module DummyApp
  def self.call(env)
    Thread.current[:last_env] = env
    body = (env['REQUEST_METHOD'] == 'HEAD' ? '' : 'ok')
    [200, { 'content-type' => env['wants'] || 'text/plain' }, [body]]
  end
end