doc/rdoc/classes/Mongrel/Configurator.html in mongrel-0.3.13.4 vs doc/rdoc/classes/Mongrel/Configurator.html in mongrel-1.0
- old
+ new
@@ -100,19 +100,22 @@
</pre>
<p>
This will setup a simple <a href="DirHandler.html">DirHandler</a> at the
current directory and load additional mime types from mimy.yaml. The :host
=> "127.0.0.1" is actually not specific to the servers but
-just a hash of default parameters that all server or uri calls receive.
+just a hash of default parameters that all server or <a
+href="Configurator.html#M000101">uri</a> calls receive.
</p>
<p>
When you are inside the block after <a
-href="Configurator.html#M000091">Mongrel::Configurator.new</a> you can
+href="Configurator.html#M000093">Mongrel::Configurator.new</a> you can
simply call functions that are part of <a
-href="Configurator.html">Configurator</a> (like server, uri, daemonize,
-etc) without having to refer to anything else. You can also call these
-functions on the resulting object directly for additional configuration.
+href="Configurator.html">Configurator</a> (like server, <a
+href="Configurator.html#M000101">uri</a>, <a
+href="Configurator.html#M000102">daemonize</a>, etc) without having to
+refer to anything else. You can also call these functions on the resulting
+object directly for additional configuration.
</p>
<p>
A major thing about <a href="Configurator.html">Configurator</a> is that it
actually lets you configure multiple listeners for any hosts and ports you
want. These are kept in a map config.listeners so you can get to them.
@@ -130,31 +133,32 @@
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
- <a href="#M000092">change_privilege</a>
- <a href="#M000095">cloaker</a>
- <a href="#M000094">cloaking_class</a>
- <a href="#M000099">daemonize</a>
- <a href="#M000108">debug</a>
- <a href="#M000107">join</a>
- <a href="#M000097">listener</a>
- <a href="#M000102">load_mime_map</a>
- <a href="#M000100">load_plugins</a>
- <a href="#M000101">load_yaml</a>
- <a href="#M000111">log</a>
- <a href="#M000091">new</a>
- <a href="#M000103">plugin</a>
- <a href="#M000104">redirect</a>
- <a href="#M000096">resolve_defaults</a>
- <a href="#M000105">run</a>
- <a href="#M000109">run_config</a>
- <a href="#M000110">setup_signals</a>
- <a href="#M000106">stop</a>
- <a href="#M000098">uri</a>
- <a href="#M000093">write_pid_file</a>
+ <a href="#M000094">change_privilege</a>
+ <a href="#M000098">cloaker</a>
+ <a href="#M000097">cloaking_class</a>
+ <a href="#M000102">daemonize</a>
+ <a href="#M000111">debug</a>
+ <a href="#M000110">join</a>
+ <a href="#M000100">listener</a>
+ <a href="#M000105">load_mime_map</a>
+ <a href="#M000103">load_plugins</a>
+ <a href="#M000104">load_yaml</a>
+ <a href="#M000114">log</a>
+ <a href="#M000093">new</a>
+ <a href="#M000106">plugin</a>
+ <a href="#M000107">redirect</a>
+ <a href="#M000095">remove_pid_file</a>
+ <a href="#M000099">resolve_defaults</a>
+ <a href="#M000108">run</a>
+ <a href="#M000112">run_config</a>
+ <a href="#M000113">setup_signals</a>
+ <a href="#M000109">stop</a>
+ <a href="#M000101">uri</a>
+ <a href="#M000096">write_pid_file</a>
</div>
</div>
</div>
@@ -195,16 +199,16 @@
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Class methods</h3>
- <div id="method-M000091" class="method-detail">
- <a name="M000091"></a>
+ <div id="method-M000093" class="method-detail">
+ <a name="M000093"></a>
<div class="method-heading">
- <a href="Configurator.src/M000091.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000091.html');return false;">
+ <a href="Configurator.src/M000093.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000093.html');return false;">
<span class="method-name">new</span><span class="method-args">(defaults={}, &blk)</span>
</a>
</div>
<div class="method-description">
@@ -214,16 +218,16 @@
</div>
</div>
<h3 class="section-bar">Public Instance methods</h3>
- <div id="method-M000092" class="method-detail">
- <a name="M000092"></a>
+ <div id="method-M000094" class="method-detail">
+ <a name="M000094"></a>
<div class="method-heading">
- <a href="Configurator.src/M000092.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000092.html');return false;">
+ <a href="Configurator.src/M000094.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000094.html');return false;">
<span class="method-name">change_privilege</span><span class="method-args">(user, group)</span>
</a>
</div>
<div class="method-description">
@@ -231,16 +235,16 @@
Change privilege of the process to specified user and group.
</p>
</div>
</div>
- <div id="method-M000095" class="method-detail">
- <a name="M000095"></a>
+ <div id="method-M000098" class="method-detail">
+ <a name="M000098"></a>
<div class="method-heading">
- <a href="Configurator.src/M000095.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000095.html');return false;">
+ <a href="Configurator.src/M000098.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000098.html');return false;">
<span class="method-name">cloaker</span><span class="method-args">(&blk)</span>
</a>
</div>
<div class="method-description">
@@ -248,16 +252,16 @@
Do not call this. You were warned.
</p>
</div>
</div>
- <div id="method-M000094" class="method-detail">
- <a name="M000094"></a>
+ <div id="method-M000097" class="method-detail">
+ <a name="M000097"></a>
<div class="method-heading">
- <a href="Configurator.src/M000094.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000094.html');return false;">
+ <a href="Configurator.src/M000097.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000097.html');return false;">
<span class="method-name">cloaking_class</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -265,16 +269,16 @@
generates a class for cloaking the current self and making the DSL nicer
</p>
</div>
</div>
- <div id="method-M000099" class="method-detail">
- <a name="M000099"></a>
+ <div id="method-M000102" class="method-detail">
+ <a name="M000102"></a>
<div class="method-heading">
- <a href="Configurator.src/M000099.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000099.html');return false;">
+ <a href="Configurator.src/M000102.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000102.html');return false;">
<span class="method-name">daemonize</span><span class="method-args">(options={})</span>
</a>
</div>
<div class="method-description">
@@ -303,51 +307,52 @@
gem/library if NOT win32.
</p>
</div>
</div>
- <div id="method-M000108" class="method-detail">
- <a name="M000108"></a>
+ <div id="method-M000111" class="method-detail">
+ <a name="M000111"></a>
<div class="method-heading">
- <a href="Configurator.src/M000108.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000108.html');return false;">
- <span class="method-name">debug</span><span class="method-args">(location, what = [:objects, :rails, :files, :threads, :params])</span>
+ <a href="Configurator.src/M000111.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000111.html');return false;">
+ <span class="method-name">debug</span><span class="method-args">(location, what = [:access, :files, :objects, :threads, :rails])</span>
</a>
</div>
<div class="method-description">
<p>
Calling this before you register your URIs to the given location will setup
-a set of handlers that log open files, objects, and the parameters for each
-request. This helps you track common problems found in <a
-href="Rails.html">Rails</a> applications that are either slow or become
-unresponsive after a little while.
+a set of handlers that <a href="Configurator.html#M000114">log</a> open
+files, objects, and the parameters for each request. This helps you track
+common problems found in <a href="Rails.html">Rails</a> applications that
+are either slow or become unresponsive after a little while.
</p>
<p>
-You can pass an extra parameter <b>what</b> to indicate what you want to
-debug. For example, if you just want to dump rails stuff then do:
+You can pass an extra parameter <b>what</b> to indicate what you want to <a
+href="Configurator.html#M000111">debug</a>. For example, if you just want
+to dump rails stuff then do:
</p>
<pre>
debug "/", what = [:rails]
</pre>
<p>
And it will only produce the log/mongrel_debug/rails.log file. Available
-options are: :objects, :rails, :files, :threads, :params
+options are: :access, :files, :objects, :threads, :rails
</p>
<p>
NOTE: Use [:files] to get accesses dumped to stderr like with WEBrick.
</p>
</div>
</div>
- <div id="method-M000107" class="method-detail">
- <a name="M000107"></a>
+ <div id="method-M000110" class="method-detail">
+ <a name="M000110"></a>
<div class="method-heading">
- <a href="Configurator.src/M000107.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000107.html');return false;">
+ <a href="Configurator.src/M000110.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000110.html');return false;">
<span class="method-name">join</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
@@ -357,27 +362,28 @@
In other words do it like: config.join.
</p>
</div>
</div>
- <div id="method-M000097" class="method-detail">
- <a name="M000097"></a>
+ <div id="method-M000100" class="method-detail">
+ <a name="M000100"></a>
<div class="method-heading">
- <a href="Configurator.src/M000097.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000097.html');return false;">
+ <a href="Configurator.src/M000100.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000100.html');return false;">
<span class="method-name">listener</span><span class="method-args">(options={},&blk)</span>
</a>
</div>
<div class="method-description">
<p>
-Starts a listener block. This is the only one that actually takes a block
-and then you make <a href="Configurator.html#M000098">Configurator.uri</a>
-calls in order to setup your URIs and handlers. If you write your Handlers
-as GemPlugins then you can use <a
-href="Configurator.html#M000100">load_plugins</a> and plugin to load them.
+Starts a <a href="Configurator.html#M000100">listener</a> block. This is
+the only one that actually takes a block and then you make <a
+href="Configurator.html#M000101">Configurator.uri</a> calls in order to
+setup your URIs and handlers. If you write your Handlers as GemPlugins then
+you can use <a href="Configurator.html#M000103">load_plugins</a> and <a
+href="Configurator.html#M000106">plugin</a> to load them.
</p>
<p>
It expects the following options (or defaults):
</p>
<ul>
@@ -403,16 +409,16 @@
</li>
</ul>
</div>
</div>
- <div id="method-M000102" class="method-detail">
- <a name="M000102"></a>
+ <div id="method-M000105" class="method-detail">
+ <a name="M000105"></a>
<div class="method-heading">
- <a href="Configurator.src/M000102.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000102.html');return false;">
+ <a href="Configurator.src/M000105.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000105.html');return false;">
<span class="method-name">load_mime_map</span><span class="method-args">(file, mime={})</span>
</a>
</div>
<div class="method-description">
@@ -425,16 +431,16 @@
MIME types map is organized.
</p>
</div>
</div>
- <div id="method-M000100" class="method-detail">
- <a name="M000100"></a>
+ <div id="method-M000103" class="method-detail">
+ <a name="M000103"></a>
<div class="method-heading">
- <a href="Configurator.src/M000100.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000100.html');return false;">
+ <a href="Configurator.src/M000103.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000103.html');return false;">
<span class="method-name">load_plugins</span><span class="method-args">(options={})</span>
</a>
</div>
<div class="method-description">
@@ -445,16 +451,16 @@
determining the dependencies.
</p>
</div>
</div>
- <div id="method-M000101" class="method-detail">
- <a name="M000101"></a>
+ <div id="method-M000104" class="method-detail">
+ <a name="M000104"></a>
<div class="method-heading">
- <a href="Configurator.src/M000101.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000101.html');return false;">
+ <a href="Configurator.src/M000104.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000104.html');return false;">
<span class="method-name">load_yaml</span><span class="method-args">(file, default={})</span>
</a>
</div>
<div class="method-description">
@@ -462,59 +468,60 @@
Easy way to load a YAML file and apply default settings.
</p>
</div>
</div>
- <div id="method-M000111" class="method-detail">
- <a name="M000111"></a>
+ <div id="method-M000114" class="method-detail">
+ <a name="M000114"></a>
<div class="method-heading">
- <a href="Configurator.src/M000111.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000111.html');return false;">
+ <a href="Configurator.src/M000114.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000114.html');return false;">
<span class="method-name">log</span><span class="method-args">(msg)</span>
</a>
</div>
<div class="method-description">
<p>
-Logs a simple message to STDERR (or the mongrel log if in daemon mode).
+Logs a simple message to STDERR (or the mongrel <a
+href="Configurator.html#M000114">log</a> if in daemon mode).
</p>
</div>
</div>
- <div id="method-M000103" class="method-detail">
- <a name="M000103"></a>
+ <div id="method-M000106" class="method-detail">
+ <a name="M000106"></a>
<div class="method-heading">
- <a href="Configurator.src/M000103.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000103.html');return false;">
+ <a href="Configurator.src/M000106.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000106.html');return false;">
<span class="method-name">plugin</span><span class="method-args">(name, options={})</span>
</a>
</div>
<div class="method-description">
<p>
-Loads and creates a plugin for you based on the given name and configured
-with the selected options. The options are merged with the defaults prior
-to passing them in.
+Loads and creates a <a href="Configurator.html#M000106">plugin</a> for you
+based on the given name and configured with the selected options. The
+options are merged with the defaults prior to passing them in.
</p>
</div>
</div>
- <div id="method-M000104" class="method-detail">
- <a name="M000104"></a>
+ <div id="method-M000107" class="method-detail">
+ <a name="M000107"></a>
<div class="method-heading">
- <a href="Configurator.src/M000104.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000104.html');return false;">
+ <a href="Configurator.src/M000107.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000107.html');return false;">
<span class="method-name">redirect</span><span class="method-args">(from, pattern, replacement = nil, &block)</span>
</a>
</div>
<div class="method-description">
<p>
-Let’s you do redirects easily as described in <a
+Lets you do redirects easily as described in <a
href="RedirectHandler.html">Mongrel::RedirectHandler</a>. You use it inside
the configurator like this:
</p>
<pre>
redirect("/test", "/to/there") # simple
@@ -522,16 +529,30 @@
redirect("/hey", /(w+)/) {|match| ...} # block
</pre>
</div>
</div>
- <div id="method-M000096" class="method-detail">
- <a name="M000096"></a>
+ <div id="method-M000095" class="method-detail">
+ <a name="M000095"></a>
<div class="method-heading">
- <a href="Configurator.src/M000096.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000096.html');return false;">
+ <a href="Configurator.src/M000095.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000095.html');return false;">
+ <span class="method-name">remove_pid_file</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ </div>
+ </div>
+
+ <div id="method-M000099" class="method-detail">
+ <a name="M000099"></a>
+
+ <div class="method-heading">
+ <a href="Configurator.src/M000099.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000099.html');return false;">
<span class="method-name">resolve_defaults</span><span class="method-args">(options)</span>
</a>
</div>
<div class="method-description">
@@ -540,36 +561,36 @@
used internally.
</p>
</div>
</div>
- <div id="method-M000105" class="method-detail">
- <a name="M000105"></a>
+ <div id="method-M000108" class="method-detail">
+ <a name="M000108"></a>
<div class="method-heading">
- <a href="Configurator.src/M000105.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000105.html');return false;">
+ <a href="Configurator.src/M000108.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000108.html');return false;">
<span class="method-name">run</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
-Works like a meta run method which goes through all the configured
-listeners. Use the <a
-href="Configurator.html#M000107">Configurator.join</a> method to prevent
+Works like a meta <a href="Configurator.html#M000108">run</a> method which
+goes through all the configured listeners. Use the <a
+href="Configurator.html#M000110">Configurator.join</a> method to prevent
Ruby from exiting until each one is done.
</p>
</div>
</div>
- <div id="method-M000109" class="method-detail">
- <a name="M000109"></a>
+ <div id="method-M000112" class="method-detail">
+ <a name="M000112"></a>
<div class="method-heading">
- <a href="Configurator.src/M000109.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000109.html');return false;">
+ <a href="Configurator.src/M000112.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000112.html');return false;">
<span class="method-name">run_config</span><span class="method-args">(script)</span>
</a>
</div>
<div class="method-description">
@@ -581,74 +602,76 @@
href="Configurator.html">Configurator</a> statements.
</p>
</div>
</div>
- <div id="method-M000110" class="method-detail">
- <a name="M000110"></a>
+ <div id="method-M000113" class="method-detail">
+ <a name="M000113"></a>
<div class="method-heading">
- <a href="Configurator.src/M000110.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000110.html');return false;">
+ <a href="Configurator.src/M000113.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000113.html');return false;">
<span class="method-name">setup_signals</span><span class="method-args">(options={})</span>
</a>
</div>
<div class="method-description">
<p>
Sets up the standard signal handlers that are used on most Ruby It only
-configures if the platform is not win32 and doesn’t do a HUP signal
+configures if the platform is not win32 and doesn‘t do a HUP signal
since this is typically framework specific.
</p>
<p>
Requires a :pid_file option given to <a
-href="Configurator.html#M000091">Configurator.new</a> to indicate a file to
+href="Configurator.html#M000093">Configurator.new</a> to indicate a file to
delete. It sets the MongrelConfig.needs_restart attribute if the start
-command should reload. It’s up to you to detect this and do whatever
+command should reload. It‘s up to you to detect this and do whatever
is needed for a "restart".
</p>
<p>
This command is safely ignored if the platform is win32 (with a warning)
</p>
</div>
</div>
- <div id="method-M000106" class="method-detail">
- <a name="M000106"></a>
+ <div id="method-M000109" class="method-detail">
+ <a name="M000109"></a>
<div class="method-heading">
- <a href="Configurator.src/M000106.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000106.html');return false;">
+ <a href="Configurator.src/M000109.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000109.html');return false;">
<span class="method-name">stop</span><span class="method-args">(needs_restart=false)</span>
</a>
</div>
<div class="method-description">
<p>
-Calls .stop on all the configured listeners so they stop processing
-requests (gracefully). By default it assumes that you don’t want to
+Calls .<a href="Configurator.html#M000109">stop</a> on all the configured
+listeners so they <a href="Configurator.html#M000109">stop</a> processing
+requests (gracefully). By default it assumes that you don‘t want to
restart.
</p>
</div>
</div>
- <div id="method-M000098" class="method-detail">
- <a name="M000098"></a>
+ <div id="method-M000101" class="method-detail">
+ <a name="M000101"></a>
<div class="method-heading">
- <a href="Configurator.src/M000098.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000098.html');return false;">
+ <a href="Configurator.src/M000101.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000101.html');return false;">
<span class="method-name">uri</span><span class="method-args">(location, options={})</span>
</a>
</div>
<div class="method-description">
<p>
Called inside a <a
-href="Configurator.html#M000097">Configurator.listener</a> block in order
-to add URI->handler mappings for that listener. Use this as many times
-as you like. It expects the following options or defaults:
+href="Configurator.html#M000100">Configurator.listener</a> block in order
+to add URI->handler mappings for that <a
+href="Configurator.html#M000100">listener</a>. Use this as many times as
+you like. It expects the following options or defaults:
</p>
<ul>
<li>:handler => <a href="HttpHandler.html">HttpHandler</a> — Handler
to use for this location.
@@ -659,22 +682,22 @@
</li>
</ul>
</div>
</div>
- <div id="method-M000093" class="method-detail">
- <a name="M000093"></a>
+ <div id="method-M000096" class="method-detail">
+ <a name="M000096"></a>
<div class="method-heading">
- <a href="Configurator.src/M000093.html" target="Code" class="method-signature"
- onclick="popupCode('Configurator.src/M000093.html');return false;">
+ <a href="Configurator.src/M000096.html" target="Code" class="method-signature"
+ onclick="popupCode('Configurator.src/M000096.html');return false;">
<span class="method-name">write_pid_file</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
-Writes the PID file but only if we’re on windows.
+Writes the PID file but only if we‘re on windows.
</p>
</div>
</div>
\ No newline at end of file