From 6411add3f1a5aae5f2e0dcd73cd842500d21e9fd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 18 Apr 2011 15:53:08 -0700 Subject: documentation cleanup/reduction Don't clutter up our RDoc/website with things that users of Unicorn don't need to see. This should make user-relevant documentation easier to find, especially since Unicorn is NOT intended to be an API. --- lib/unicorn.rb | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'lib/unicorn.rb') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 7891d67..8a5fdcc 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -5,10 +5,27 @@ require 'stringio' require 'rack' require 'kgio' +# :stopdoc: # Unicorn module containing all of the classes (include C extensions) for # running a Unicorn web server. It contains a minimalist HTTP server with just # enough functionality to service web application requests fast as possible. +# :startdoc: + +# \Unicorn exposes very little of an user-visible API and most of its +# internals are subject to change. \Unicorn is designed to host Rack +# applications, so applications should be written against the Rack SPEC +# and not \Unicorn internals. module Unicorn + + # Raised inside TeeInput when a client closes the socket inside the + # application dispatch. This is always raised with an empty backtrace + # since there is nothing in the application stack that is responsible + # for client shutdowns/disconnects. This exception is visible to Rack + # applications unless PrereadInput middleware is loaded. + class ClientShutdown < EOFError + end + + # :stopdoc: def self.run(app, options = {}) Unicorn::HttpServer.new(app, options).start.join end @@ -63,14 +80,9 @@ module Unicorn Unicorn::SocketHelper.sock_name(io) end end + # :startdoc: end - -# raised inside TeeInput when a client closes the socket inside the -# application dispatch. This is always raised with an empty backtrace -# since there is nothing in the application stack that is responsible -# for client shutdowns/disconnects. -class Unicorn::ClientShutdown < EOFError; end - +# :enddoc: require 'unicorn/const' require 'unicorn/socket_helper' require 'unicorn/stream_input' -- cgit v1.2.3-24-ge0c7