# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rackup` gem. # Please instead update this file by running `bin/tapioca gem rackup`. # source://rackup//lib/rackup/handler.rb#6 module Rackup; end # *Handlers* connect web servers with Rack. # # Rackup includes Handlers for WEBrick and CGI. # # Handlers usually are activated by calling MyHandler.run(myapp). # A second optional hash can be passed to include server-specific # configuration. # # source://rackup//lib/rackup/handler.rb#14 module Rackup::Handler class << self # source://rackup//lib/rackup/handler.rb#30 def [](name); end # source://rackup//lib/rackup/handler.rb#84 def default; end # source://rackup//lib/rackup/handler.rb#40 def get(name); end # Select first available Rack handler given an `Array` of server names. # Raises `LoadError` if no handler was found. # # > pick ['puma', 'webrick'] # => Rackup::Handler::WEBrick # # @raise [LoadError] # # source://rackup//lib/rackup/handler.rb#69 def pick(server_names); end # Register a named handler class. # # source://rackup//lib/rackup/handler.rb#18 def register(name, klass); end # Transforms server-name constants to their canonical form as filenames, # then tries to require them but silences the LoadError if not found # # Naming convention: # # Foo # => 'foo' # FooBar # => 'foo_bar.rb' # FooBAR # => 'foobar.rb' # FOObar # => 'foobar.rb' # FOOBAR # => 'foobar.rb' # FooBarBaz # => 'foo_bar_baz.rb' # # source://rackup//lib/rackup/handler.rb#106 def require_handler(prefix, const_name); end end end # source://rackup//lib/rackup/handler.rb#59 Rackup::Handler::RACKUP_HANDLER = T.let(T.unsafe(nil), String) # source://rackup//lib/rackup/handler.rb#58 Rackup::Handler::RACK_HANDLER = T.let(T.unsafe(nil), String) # source://rackup//lib/rackup/handler.rb#61 Rackup::Handler::SERVER_NAMES = T.let(T.unsafe(nil), Array) # source://rackup//lib/rackup/server.rb#22 class Rackup::Server # Options may include: # * :app # a rack application to run (overrides :config and :builder) # * :builder # a string to evaluate a Rack::Builder from # * :config # a rackup configuration file path to load (.ru) # * :environment # this selects the middleware that will be wrapped around # your application. Default options available are: # - development: CommonLogger, ShowExceptions, and Lint # - deployment: CommonLogger # - none: no extra middleware # note: when the server is a cgi server, CommonLogger is not included. # * :server # choose a specific Rackup::Handler, e.g. cgi, fcgi, webrick # * :daemonize # if truthy, the server will daemonize itself (fork, detach, etc) # if :noclose, the server will not close STDOUT/STDERR # * :pid # path to write a pid file after daemonize # * :Host # the host address to bind to (used by supporting Rackup::Handler) # * :Port # the port to bind to (used by supporting Rackup::Handler) # * :AccessLog # webrick access log options (or supporting Rackup::Handler) # * :debug # turn on debug output ($DEBUG = true) # * :warn # turn on warnings ($-w = true) # * :include # add given paths to $LOAD_PATH # * :require # require the given libraries # # Additional options for profiling app initialization include: # * :heapfile # location for ObjectSpace.dump_all to write the output to # * :profile_file # location for CPU/Memory (StackProf) profile output (defaults to a tempfile) # * :profile_mode # StackProf profile mode (cpu|wall|object) # # @return [Server] a new instance of Server # # source://rackup//lib/rackup/server.rb#230 def initialize(options = T.unsafe(nil)); end # source://rackup//lib/rackup/server.rb#262 def app; end # source://rackup//lib/rackup/server.rb#248 def default_options; end # source://rackup//lib/rackup/server.rb#296 def middleware; end # source://rackup//lib/rackup/server.rb#243 def options; end # Sets the attribute options # # @param value the value to set the attribute options to. # # source://rackup//lib/rackup/server.rb#185 def options=(_arg0); end # source://rackup//lib/rackup/server.rb#344 def server; end # source://rackup//lib/rackup/server.rb#300 def start(&block); end private # source://rackup//lib/rackup/server.rb#413 def build_app(app); end # source://rackup//lib/rackup/server.rb#349 def build_app_and_options_from_config; end # source://rackup//lib/rackup/server.rb#395 def build_app_from_string; end # source://rackup//lib/rackup/server.rb#442 def check_pid!; end # source://rackup//lib/rackup/server.rb#427 def daemonize_app; end # source://rackup//lib/rackup/server.rb#456 def exit_with_pid(pid); end # source://rackup//lib/rackup/server.rb#357 def handle_profiling(heapfile, profile_mode, filename); end # source://rackup//lib/rackup/server.rb#385 def make_profile_name(filename); end # source://rackup//lib/rackup/server.rb#409 def opt_parser; end # source://rackup//lib/rackup/server.rb#399 def parse_options(args); end # source://rackup//lib/rackup/server.rb#423 def wrapped_app; end # source://rackup//lib/rackup/server.rb#434 def write_pid; end class << self # source://rackup//lib/rackup/server.rb#273 def default_middleware_by_environment; end # source://rackup//lib/rackup/server.rb#267 def logging_middleware; end # source://rackup//lib/rackup/server.rb#291 def middleware; end # Start a new rack server (like running rackup). This will parse ARGV and # provide standard ARGV rackup options, defaulting to load 'config.ru'. # # Providing an options hash will prevent ARGV parsing and will not include # any default options. # # This method can be used to very easily launch a CGI application, for # example: # # Rack::Server.start( # :app => lambda do |e| # [200, {'content-type' => 'text/html'}, ['hello world']] # end, # :server => 'cgi' # ) # # Further options available here are documented on Rack::Server#initialize # # source://rackup//lib/rackup/server.rb#181 def start(options = T.unsafe(nil)); end end end # source://rackup//lib/rackup/server.rb#23 class Rackup::Server::Options # source://rackup//lib/rackup/server.rb#143 def handler_opts(options); end # source://rackup//lib/rackup/server.rb#24 def parse!(args); end end # source://rackup//lib/rackup/version.rb#7 Rackup::VERSION = T.let(T.unsafe(nil), String)