mongrel 0.3.13 → 0.3.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -1
- data/bin/mongrel_rails +1 -1
- data/doc/rdoc/classes/Mongrel.html +1 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +49 -49
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +11 -21
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000099.html +34 -14
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000100.html +21 -12
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +14 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +12 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +5 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +5 -6
- data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000088.html → CGIWrapper.src/M000105.html} +5 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +19 -0
- data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
- data/doc/rdoc/classes/Mongrel/Camping.src/{M000046.html → M000047.html} +0 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +5 -38
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +51 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +65 -65
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +11 -29
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +29 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +5 -9
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +9 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +11 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000038.html +7 -12
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +12 -37
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +50 -0
- data/doc/rdoc/classes/Mongrel/Configurator.html +143 -107
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +16 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +18 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +7 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +7 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +10 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +5 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +21 -17
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +6 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +17 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +20 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +5 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +11 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +6 -12
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +9 -22
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +12 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +5 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +22 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +33 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +6 -1
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +10 -10
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000094.html → M000096.html} +5 -5
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000095.html → M000097.html} +14 -14
- data/doc/rdoc/classes/Mongrel/DirHandler.html +31 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +8 -30
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +30 -29
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +29 -50
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +50 -26
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +26 -5
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +18 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000125.html → M000128.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000126.html → M000129.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000070.html +5 -5
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000071.html +18 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +31 -9
- data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000089.html → HttpHandler.src/M000076.html} +4 -5
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000075.html → M000077.html} +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +30 -15
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +4 -6
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +6 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +17 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000050.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +7 -37
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +37 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000049.html → M000056.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +20 -20
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000130.html → M000135.html} +38 -38
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000131.html → M000136.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000132.html → M000137.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000133.html → M000138.html} +18 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +61 -61
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +12 -12
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +7 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +12 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +9 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +9 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +9 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +18 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +8 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +7 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +20 -0
- data/doc/rdoc/classes/Mongrel/{HeaderOut.src/M000069.html → HttpResponse.src/M000089.html} +5 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.html +38 -38
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +12 -70
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +76 -13
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +13 -50
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +50 -21
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +20 -4
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +5 -9
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +22 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +15 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000041.html +26 -12
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +12 -13
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +26 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +15 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +9 -38
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +38 -10
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +23 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.html +187 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000133.html +22 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000134.html +27 -0
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +16 -16
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000127.html → M000130.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000128.html → M000131.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000129.html → M000132.html} +4 -4
- data/doc/rdoc/classes/Mongrel/StatusHandler.html +20 -20
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +5 -11
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +11 -29
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +29 -7
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +20 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +30 -30
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000090.html +5 -26
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +5 -38
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +18 -15
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +25 -57
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +36 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000095.html +83 -0
- data/doc/rdoc/classes/RequestLog/Access.html +5 -5
- data/doc/rdoc/classes/RequestLog/Access.src/{M000134.html → M000139.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Files.html +5 -5
- data/doc/rdoc/classes/RequestLog/Files.src/{M000135.html → M000140.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000137.html → M000142.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Params.html +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/{M000138.html → M000143.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.src/{M000136.html → M000141.html} +0 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel_rb.html +1 -1
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +124 -119
- data/examples/simpletest.rb +2 -0
- data/ext/http11/http11.c +1 -1
- data/lib/mongrel.rb +30 -5
- data/lib/mongrel/handlers.rb +57 -2
- data/test/test_redirect_handler.rb +40 -0
- metadata +47 -38
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000096.html +0 -24
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000097.html +0 -47
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000047.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000037.html +0 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +0 -29
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +0 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +0 -21
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +0 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000040.html +0 -39
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000043.html +0 -22
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +0 -18
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
2
|
+
<!DOCTYPE html
|
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
5
|
+
|
|
6
|
+
<html>
|
|
7
|
+
<head>
|
|
8
|
+
<title>run (Mongrel::Command::Registry)</title>
|
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
|
10
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
|
11
|
+
</head>
|
|
12
|
+
<body class="standalone-code">
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 182</span>
|
|
14
|
+
182: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">args</span>)
|
|
15
|
+
183: <span class="ruby-comment cmt"># find the command</span>
|
|
16
|
+
184: <span class="ruby-identifier">cmd_name</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">shift</span>
|
|
17
|
+
185:
|
|
18
|
+
186: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">cmd_name</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">cmd_name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"?"</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">cmd_name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"help"</span>
|
|
19
|
+
187: <span class="ruby-identifier">print_command_list</span>
|
|
20
|
+
188: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
|
21
|
+
189: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">cmd_name</span> <span class="ruby-operator">==</span> <span class="ruby-value str">"--version"</span>
|
|
22
|
+
190: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"Mongrel Web Server #{Mongrel::Const::MONGREL_VERSION}"</span>
|
|
23
|
+
191: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
|
24
|
+
192: <span class="ruby-keyword kw">end</span>
|
|
25
|
+
193:
|
|
26
|
+
194: <span class="ruby-comment cmt"># command exists, set it up and validate it</span>
|
|
27
|
+
195: <span class="ruby-keyword kw">begin</span>
|
|
28
|
+
196: <span class="ruby-identifier">command</span> = <span class="ruby-constant">GemPlugin</span><span class="ruby-operator">::</span><span class="ruby-constant">Manager</span>.<span class="ruby-identifier">instance</span>.<span class="ruby-identifier">create</span>(<span class="ruby-node">"/commands/#{cmd_name}"</span>, <span class="ruby-identifier">:argv</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">args</span>)
|
|
29
|
+
197: <span class="ruby-keyword kw">rescue</span>
|
|
30
|
+
198: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"INVALID COMMAND: #$!"</span>
|
|
31
|
+
199: <span class="ruby-identifier">print_command_list</span>
|
|
32
|
+
200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
33
|
+
201: <span class="ruby-keyword kw">end</span>
|
|
34
|
+
202:
|
|
35
|
+
203: <span class="ruby-comment cmt"># Normally the command is NOT valid right after being created</span>
|
|
36
|
+
204: <span class="ruby-comment cmt"># but sometimes (like with -h or -v) there's no further processing</span>
|
|
37
|
+
205: <span class="ruby-comment cmt"># needed so the command is already valid so we can skip it.</span>
|
|
38
|
+
206: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">command</span>.<span class="ruby-identifier">done_validating</span>
|
|
39
|
+
207: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-identifier">command</span>.<span class="ruby-identifier">validate</span>
|
|
40
|
+
208: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#{cmd_name} reported an error. Use mongrel_rails #{cmd_name} -h to get help."</span>
|
|
41
|
+
209: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
|
42
|
+
210: <span class="ruby-keyword kw">else</span>
|
|
43
|
+
211: <span class="ruby-identifier">command</span>.<span class="ruby-identifier">run</span>
|
|
44
|
+
212: <span class="ruby-keyword kw">end</span>
|
|
45
|
+
213: <span class="ruby-keyword kw">end</span>
|
|
46
|
+
214:
|
|
47
|
+
215: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
|
48
|
+
216: <span class="ruby-keyword kw">end</span></pre>
|
|
49
|
+
</body>
|
|
50
|
+
</html>
|
|
@@ -106,7 +106,7 @@ just a hash of default parameters that all server or uri calls receive.
|
|
|
106
106
|
</p>
|
|
107
107
|
<p>
|
|
108
108
|
When you are inside the block after <a
|
|
109
|
-
href="Configurator.html#
|
|
109
|
+
href="Configurator.html#M000107">Mongrel::Configurator.new</a> you can
|
|
110
110
|
simply call functions that are part of <a
|
|
111
111
|
href="Configurator.html">Configurator</a> (like server, uri, daemonize,
|
|
112
112
|
etc) without having to refer to anything else. You can also call these
|
|
@@ -132,26 +132,27 @@ want. These are kept in a map config.listeners so you can get to them.
|
|
|
132
132
|
<h3 class="section-bar">Methods</h3>
|
|
133
133
|
|
|
134
134
|
<div class="name-list">
|
|
135
|
-
<a href="#
|
|
136
|
-
<a href="#
|
|
137
|
-
<a href="#
|
|
138
|
-
<a href="#
|
|
139
|
-
<a href="#
|
|
140
|
-
<a href="#
|
|
141
|
-
<a href="#
|
|
142
|
-
<a href="#
|
|
143
|
-
<a href="#
|
|
144
|
-
<a href="#
|
|
145
|
-
<a href="#
|
|
146
|
-
<a href="#
|
|
147
|
-
<a href="#
|
|
148
|
-
<a href="#
|
|
149
|
-
<a href="#
|
|
150
|
-
<a href="#
|
|
151
|
-
<a href="#
|
|
152
|
-
<a href="#
|
|
153
|
-
<a href="#
|
|
154
|
-
<a href="#
|
|
135
|
+
<a href="#M000108">change_privilege</a>
|
|
136
|
+
<a href="#M000111">cloaker</a>
|
|
137
|
+
<a href="#M000110">cloaking_class</a>
|
|
138
|
+
<a href="#M000115">daemonize</a>
|
|
139
|
+
<a href="#M000124">debug</a>
|
|
140
|
+
<a href="#M000123">join</a>
|
|
141
|
+
<a href="#M000113">listener</a>
|
|
142
|
+
<a href="#M000118">load_mime_map</a>
|
|
143
|
+
<a href="#M000116">load_plugins</a>
|
|
144
|
+
<a href="#M000117">load_yaml</a>
|
|
145
|
+
<a href="#M000127">log</a>
|
|
146
|
+
<a href="#M000107">new</a>
|
|
147
|
+
<a href="#M000119">plugin</a>
|
|
148
|
+
<a href="#M000120">redirect</a>
|
|
149
|
+
<a href="#M000112">resolve_defaults</a>
|
|
150
|
+
<a href="#M000121">run</a>
|
|
151
|
+
<a href="#M000125">run_config</a>
|
|
152
|
+
<a href="#M000126">setup_signals</a>
|
|
153
|
+
<a href="#M000122">stop</a>
|
|
154
|
+
<a href="#M000114">uri</a>
|
|
155
|
+
<a href="#M000109">write_pid_file</a>
|
|
155
156
|
</div>
|
|
156
157
|
</div>
|
|
157
158
|
|
|
@@ -196,12 +197,12 @@ want. These are kept in a map config.listeners so you can get to them.
|
|
|
196
197
|
<div id="methods">
|
|
197
198
|
<h3 class="section-bar">Public Class methods</h3>
|
|
198
199
|
|
|
199
|
-
<div id="method-
|
|
200
|
-
<a name="
|
|
200
|
+
<div id="method-M000107" class="method-detail">
|
|
201
|
+
<a name="M000107"></a>
|
|
201
202
|
|
|
202
203
|
<div class="method-heading">
|
|
203
|
-
<a href="Configurator.src/
|
|
204
|
-
onclick="popupCode('Configurator.src/
|
|
204
|
+
<a href="Configurator.src/M000107.html" target="Code" class="method-signature"
|
|
205
|
+
onclick="popupCode('Configurator.src/M000107.html');return false;">
|
|
205
206
|
<span class="method-name">new</span><span class="method-args">(defaults={}, &blk)</span>
|
|
206
207
|
</a>
|
|
207
208
|
</div>
|
|
@@ -215,12 +216,12 @@ You pass in initial defaults and then a block to continue configuring.
|
|
|
215
216
|
|
|
216
217
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
217
218
|
|
|
218
|
-
<div id="method-
|
|
219
|
-
<a name="
|
|
219
|
+
<div id="method-M000108" class="method-detail">
|
|
220
|
+
<a name="M000108"></a>
|
|
220
221
|
|
|
221
222
|
<div class="method-heading">
|
|
222
|
-
<a href="Configurator.src/
|
|
223
|
-
onclick="popupCode('Configurator.src/
|
|
223
|
+
<a href="Configurator.src/M000108.html" target="Code" class="method-signature"
|
|
224
|
+
onclick="popupCode('Configurator.src/M000108.html');return false;">
|
|
224
225
|
<span class="method-name">change_privilege</span><span class="method-args">(user, group)</span>
|
|
225
226
|
</a>
|
|
226
227
|
</div>
|
|
@@ -232,12 +233,12 @@ Change privilege of the process to specified user and group.
|
|
|
232
233
|
</div>
|
|
233
234
|
</div>
|
|
234
235
|
|
|
235
|
-
<div id="method-
|
|
236
|
-
<a name="
|
|
236
|
+
<div id="method-M000111" class="method-detail">
|
|
237
|
+
<a name="M000111"></a>
|
|
237
238
|
|
|
238
239
|
<div class="method-heading">
|
|
239
|
-
<a href="Configurator.src/
|
|
240
|
-
onclick="popupCode('Configurator.src/
|
|
240
|
+
<a href="Configurator.src/M000111.html" target="Code" class="method-signature"
|
|
241
|
+
onclick="popupCode('Configurator.src/M000111.html');return false;">
|
|
241
242
|
<span class="method-name">cloaker</span><span class="method-args">(&blk)</span>
|
|
242
243
|
</a>
|
|
243
244
|
</div>
|
|
@@ -249,12 +250,12 @@ Do not call this. You were warned.
|
|
|
249
250
|
</div>
|
|
250
251
|
</div>
|
|
251
252
|
|
|
252
|
-
<div id="method-
|
|
253
|
-
<a name="
|
|
253
|
+
<div id="method-M000110" class="method-detail">
|
|
254
|
+
<a name="M000110"></a>
|
|
254
255
|
|
|
255
256
|
<div class="method-heading">
|
|
256
|
-
<a href="Configurator.src/
|
|
257
|
-
onclick="popupCode('Configurator.src/
|
|
257
|
+
<a href="Configurator.src/M000110.html" target="Code" class="method-signature"
|
|
258
|
+
onclick="popupCode('Configurator.src/M000110.html');return false;">
|
|
258
259
|
<span class="method-name">cloaking_class</span><span class="method-args">()</span>
|
|
259
260
|
</a>
|
|
260
261
|
</div>
|
|
@@ -266,12 +267,12 @@ generates a class for cloaking the current self and making the DSL nicer
|
|
|
266
267
|
</div>
|
|
267
268
|
</div>
|
|
268
269
|
|
|
269
|
-
<div id="method-
|
|
270
|
-
<a name="
|
|
270
|
+
<div id="method-M000115" class="method-detail">
|
|
271
|
+
<a name="M000115"></a>
|
|
271
272
|
|
|
272
273
|
<div class="method-heading">
|
|
273
|
-
<a href="Configurator.src/
|
|
274
|
-
onclick="popupCode('Configurator.src/
|
|
274
|
+
<a href="Configurator.src/M000115.html" target="Code" class="method-signature"
|
|
275
|
+
onclick="popupCode('Configurator.src/M000115.html');return false;">
|
|
275
276
|
<span class="method-name">daemonize</span><span class="method-args">(options={})</span>
|
|
276
277
|
</a>
|
|
277
278
|
</div>
|
|
@@ -304,12 +305,12 @@ gem/library if NOT win32.
|
|
|
304
305
|
</div>
|
|
305
306
|
</div>
|
|
306
307
|
|
|
307
|
-
<div id="method-
|
|
308
|
-
<a name="
|
|
308
|
+
<div id="method-M000124" class="method-detail">
|
|
309
|
+
<a name="M000124"></a>
|
|
309
310
|
|
|
310
311
|
<div class="method-heading">
|
|
311
|
-
<a href="Configurator.src/
|
|
312
|
-
onclick="popupCode('Configurator.src/
|
|
312
|
+
<a href="Configurator.src/M000124.html" target="Code" class="method-signature"
|
|
313
|
+
onclick="popupCode('Configurator.src/M000124.html');return false;">
|
|
313
314
|
<span class="method-name">debug</span><span class="method-args">(location, what = [:object, :rails, :files, :threads, :params])</span>
|
|
314
315
|
</a>
|
|
315
316
|
</div>
|
|
@@ -323,17 +324,28 @@ href="Rails.html">Rails</a> applications that are either slow or become
|
|
|
323
324
|
unresponsive after a little while.
|
|
324
325
|
</p>
|
|
325
326
|
<p>
|
|
326
|
-
|
|
327
|
+
You can pass an extra parameter <b>what</b> to indicate what you want to
|
|
328
|
+
debug. For example, if you just want to dump rails stuff then do:
|
|
329
|
+
</p>
|
|
330
|
+
<pre>
|
|
331
|
+
debug "/", what = [:rails]
|
|
332
|
+
</pre>
|
|
333
|
+
<p>
|
|
334
|
+
And it will only produce the log/mongrel_debug/rails.log file. Available
|
|
335
|
+
options are: :object, :railes, :files, :threads, :params
|
|
336
|
+
</p>
|
|
337
|
+
<p>
|
|
338
|
+
NOTE: Use [:files] to get acccesses dumped to stderr like with WEBrick.
|
|
327
339
|
</p>
|
|
328
340
|
</div>
|
|
329
341
|
</div>
|
|
330
342
|
|
|
331
|
-
<div id="method-
|
|
332
|
-
<a name="
|
|
343
|
+
<div id="method-M000123" class="method-detail">
|
|
344
|
+
<a name="M000123"></a>
|
|
333
345
|
|
|
334
346
|
<div class="method-heading">
|
|
335
|
-
<a href="Configurator.src/
|
|
336
|
-
onclick="popupCode('Configurator.src/
|
|
347
|
+
<a href="Configurator.src/M000123.html" target="Code" class="method-signature"
|
|
348
|
+
onclick="popupCode('Configurator.src/M000123.html');return false;">
|
|
337
349
|
<span class="method-name">join</span><span class="method-args">()</span>
|
|
338
350
|
</a>
|
|
339
351
|
</div>
|
|
@@ -347,12 +359,12 @@ In otherwords do it like: config.join.
|
|
|
347
359
|
</div>
|
|
348
360
|
</div>
|
|
349
361
|
|
|
350
|
-
<div id="method-
|
|
351
|
-
<a name="
|
|
362
|
+
<div id="method-M000113" class="method-detail">
|
|
363
|
+
<a name="M000113"></a>
|
|
352
364
|
|
|
353
365
|
<div class="method-heading">
|
|
354
|
-
<a href="Configurator.src/
|
|
355
|
-
onclick="popupCode('Configurator.src/
|
|
366
|
+
<a href="Configurator.src/M000113.html" target="Code" class="method-signature"
|
|
367
|
+
onclick="popupCode('Configurator.src/M000113.html');return false;">
|
|
356
368
|
<span class="method-name">listener</span><span class="method-args">(options={},&blk)</span>
|
|
357
369
|
</a>
|
|
358
370
|
</div>
|
|
@@ -360,10 +372,10 @@ In otherwords do it like: config.join.
|
|
|
360
372
|
<div class="method-description">
|
|
361
373
|
<p>
|
|
362
374
|
Starts a listener block. This is the only one that actually takes a block
|
|
363
|
-
and then you make <a href="Configurator.html#
|
|
375
|
+
and then you make <a href="Configurator.html#M000114">Configurator.uri</a>
|
|
364
376
|
calls in order to setup your URIs and handlers. If you write your Handlers
|
|
365
377
|
as GemPlugins then you can use <a
|
|
366
|
-
href="Configurator.html#
|
|
378
|
+
href="Configurator.html#M000116">load_plugins</a> and plugin to load them.
|
|
367
379
|
</p>
|
|
368
380
|
<p>
|
|
369
381
|
It expects the following options (or defaults):
|
|
@@ -387,12 +399,12 @@ It expects the following options (or defaults):
|
|
|
387
399
|
</div>
|
|
388
400
|
</div>
|
|
389
401
|
|
|
390
|
-
<div id="method-
|
|
391
|
-
<a name="
|
|
402
|
+
<div id="method-M000118" class="method-detail">
|
|
403
|
+
<a name="M000118"></a>
|
|
392
404
|
|
|
393
405
|
<div class="method-heading">
|
|
394
|
-
<a href="Configurator.src/
|
|
395
|
-
onclick="popupCode('Configurator.src/
|
|
406
|
+
<a href="Configurator.src/M000118.html" target="Code" class="method-signature"
|
|
407
|
+
onclick="popupCode('Configurator.src/M000118.html');return false;">
|
|
396
408
|
<span class="method-name">load_mime_map</span><span class="method-args">(file, mime={})</span>
|
|
397
409
|
</a>
|
|
398
410
|
</div>
|
|
@@ -409,12 +421,12 @@ MIME types map is organized.
|
|
|
409
421
|
</div>
|
|
410
422
|
</div>
|
|
411
423
|
|
|
412
|
-
<div id="method-
|
|
413
|
-
<a name="
|
|
424
|
+
<div id="method-M000116" class="method-detail">
|
|
425
|
+
<a name="M000116"></a>
|
|
414
426
|
|
|
415
427
|
<div class="method-heading">
|
|
416
|
-
<a href="Configurator.src/
|
|
417
|
-
onclick="popupCode('Configurator.src/
|
|
428
|
+
<a href="Configurator.src/M000116.html" target="Code" class="method-signature"
|
|
429
|
+
onclick="popupCode('Configurator.src/M000116.html');return false;">
|
|
418
430
|
<span class="method-name">load_plugins</span><span class="method-args">(options={})</span>
|
|
419
431
|
</a>
|
|
420
432
|
</div>
|
|
@@ -429,12 +441,12 @@ determining the dependencies.
|
|
|
429
441
|
</div>
|
|
430
442
|
</div>
|
|
431
443
|
|
|
432
|
-
<div id="method-
|
|
433
|
-
<a name="
|
|
444
|
+
<div id="method-M000117" class="method-detail">
|
|
445
|
+
<a name="M000117"></a>
|
|
434
446
|
|
|
435
447
|
<div class="method-heading">
|
|
436
|
-
<a href="Configurator.src/
|
|
437
|
-
onclick="popupCode('Configurator.src/
|
|
448
|
+
<a href="Configurator.src/M000117.html" target="Code" class="method-signature"
|
|
449
|
+
onclick="popupCode('Configurator.src/M000117.html');return false;">
|
|
438
450
|
<span class="method-name">load_yaml</span><span class="method-args">(file, default={})</span>
|
|
439
451
|
</a>
|
|
440
452
|
</div>
|
|
@@ -446,12 +458,12 @@ Easy way to load a YAML file and apply default settings.
|
|
|
446
458
|
</div>
|
|
447
459
|
</div>
|
|
448
460
|
|
|
449
|
-
<div id="method-
|
|
450
|
-
<a name="
|
|
461
|
+
<div id="method-M000127" class="method-detail">
|
|
462
|
+
<a name="M000127"></a>
|
|
451
463
|
|
|
452
464
|
<div class="method-heading">
|
|
453
|
-
<a href="Configurator.src/
|
|
454
|
-
onclick="popupCode('Configurator.src/
|
|
465
|
+
<a href="Configurator.src/M000127.html" target="Code" class="method-signature"
|
|
466
|
+
onclick="popupCode('Configurator.src/M000127.html');return false;">
|
|
455
467
|
<span class="method-name">log</span><span class="method-args">(msg)</span>
|
|
456
468
|
</a>
|
|
457
469
|
</div>
|
|
@@ -463,12 +475,12 @@ Logs a simple message to STDERR (or the mongrel log if in daemon mode).
|
|
|
463
475
|
</div>
|
|
464
476
|
</div>
|
|
465
477
|
|
|
466
|
-
<div id="method-
|
|
467
|
-
<a name="
|
|
478
|
+
<div id="method-M000119" class="method-detail">
|
|
479
|
+
<a name="M000119"></a>
|
|
468
480
|
|
|
469
481
|
<div class="method-heading">
|
|
470
|
-
<a href="Configurator.src/
|
|
471
|
-
onclick="popupCode('Configurator.src/
|
|
482
|
+
<a href="Configurator.src/M000119.html" target="Code" class="method-signature"
|
|
483
|
+
onclick="popupCode('Configurator.src/M000119.html');return false;">
|
|
472
484
|
<span class="method-name">plugin</span><span class="method-args">(name, options={})</span>
|
|
473
485
|
</a>
|
|
474
486
|
</div>
|
|
@@ -482,12 +494,36 @@ to passing them in.
|
|
|
482
494
|
</div>
|
|
483
495
|
</div>
|
|
484
496
|
|
|
485
|
-
<div id="method-
|
|
486
|
-
<a name="
|
|
497
|
+
<div id="method-M000120" class="method-detail">
|
|
498
|
+
<a name="M000120"></a>
|
|
487
499
|
|
|
488
500
|
<div class="method-heading">
|
|
489
|
-
<a href="Configurator.src/
|
|
490
|
-
onclick="popupCode('Configurator.src/
|
|
501
|
+
<a href="Configurator.src/M000120.html" target="Code" class="method-signature"
|
|
502
|
+
onclick="popupCode('Configurator.src/M000120.html');return false;">
|
|
503
|
+
<span class="method-name">redirect</span><span class="method-args">(from, pattern, replacement = nil, &block)</span>
|
|
504
|
+
</a>
|
|
505
|
+
</div>
|
|
506
|
+
|
|
507
|
+
<div class="method-description">
|
|
508
|
+
<p>
|
|
509
|
+
Let’s you do redirects easily as described in <a
|
|
510
|
+
href="RedirectHandler.html">Mongrel::RedirectHandler</a>. You use it inside
|
|
511
|
+
the configurator like this:
|
|
512
|
+
</p>
|
|
513
|
+
<pre>
|
|
514
|
+
redirect("/test", "/to/there") # simple
|
|
515
|
+
redirect("/to", /t/, 'w') # regexp
|
|
516
|
+
redirect("/hey", /(w+)/) {|match| ...} # block
|
|
517
|
+
</pre>
|
|
518
|
+
</div>
|
|
519
|
+
</div>
|
|
520
|
+
|
|
521
|
+
<div id="method-M000112" class="method-detail">
|
|
522
|
+
<a name="M000112"></a>
|
|
523
|
+
|
|
524
|
+
<div class="method-heading">
|
|
525
|
+
<a href="Configurator.src/M000112.html" target="Code" class="method-signature"
|
|
526
|
+
onclick="popupCode('Configurator.src/M000112.html');return false;">
|
|
491
527
|
<span class="method-name">resolve_defaults</span><span class="method-args">(options)</span>
|
|
492
528
|
</a>
|
|
493
529
|
</div>
|
|
@@ -500,12 +536,12 @@ used internally.
|
|
|
500
536
|
</div>
|
|
501
537
|
</div>
|
|
502
538
|
|
|
503
|
-
<div id="method-
|
|
504
|
-
<a name="
|
|
539
|
+
<div id="method-M000121" class="method-detail">
|
|
540
|
+
<a name="M000121"></a>
|
|
505
541
|
|
|
506
542
|
<div class="method-heading">
|
|
507
|
-
<a href="Configurator.src/
|
|
508
|
-
onclick="popupCode('Configurator.src/
|
|
543
|
+
<a href="Configurator.src/M000121.html" target="Code" class="method-signature"
|
|
544
|
+
onclick="popupCode('Configurator.src/M000121.html');return false;">
|
|
509
545
|
<span class="method-name">run</span><span class="method-args">()</span>
|
|
510
546
|
</a>
|
|
511
547
|
</div>
|
|
@@ -514,18 +550,18 @@ used internally.
|
|
|
514
550
|
<p>
|
|
515
551
|
Works like a meta run method which goes through all the configured
|
|
516
552
|
listeners. Use the <a
|
|
517
|
-
href="Configurator.html#
|
|
553
|
+
href="Configurator.html#M000123">Configurator.join</a> method to prevent
|
|
518
554
|
Ruby from exiting until each one is done.
|
|
519
555
|
</p>
|
|
520
556
|
</div>
|
|
521
557
|
</div>
|
|
522
558
|
|
|
523
|
-
<div id="method-
|
|
524
|
-
<a name="
|
|
559
|
+
<div id="method-M000125" class="method-detail">
|
|
560
|
+
<a name="M000125"></a>
|
|
525
561
|
|
|
526
562
|
<div class="method-heading">
|
|
527
|
-
<a href="Configurator.src/
|
|
528
|
-
onclick="popupCode('Configurator.src/
|
|
563
|
+
<a href="Configurator.src/M000125.html" target="Code" class="method-signature"
|
|
564
|
+
onclick="popupCode('Configurator.src/M000125.html');return false;">
|
|
529
565
|
<span class="method-name">run_config</span><span class="method-args">(script)</span>
|
|
530
566
|
</a>
|
|
531
567
|
</div>
|
|
@@ -541,12 +577,12 @@ href="Configurator.html">Configurator</a> statements.
|
|
|
541
577
|
</div>
|
|
542
578
|
</div>
|
|
543
579
|
|
|
544
|
-
<div id="method-
|
|
545
|
-
<a name="
|
|
580
|
+
<div id="method-M000126" class="method-detail">
|
|
581
|
+
<a name="M000126"></a>
|
|
546
582
|
|
|
547
583
|
<div class="method-heading">
|
|
548
|
-
<a href="Configurator.src/
|
|
549
|
-
onclick="popupCode('Configurator.src/
|
|
584
|
+
<a href="Configurator.src/M000126.html" target="Code" class="method-signature"
|
|
585
|
+
onclick="popupCode('Configurator.src/M000126.html');return false;">
|
|
550
586
|
<span class="method-name">setup_signals</span><span class="method-args">(options={})</span>
|
|
551
587
|
</a>
|
|
552
588
|
</div>
|
|
@@ -559,7 +595,7 @@ since this is typically framework specific.
|
|
|
559
595
|
</p>
|
|
560
596
|
<p>
|
|
561
597
|
Requires a :pid_file option given to <a
|
|
562
|
-
href="Configurator.html#
|
|
598
|
+
href="Configurator.html#M000107">Configurator.new</a> to indicate a file to
|
|
563
599
|
delete. It sets the MongrelConfig.needs_restart attribute if the start
|
|
564
600
|
command should reload. It’s up to you to detect this and do whatever
|
|
565
601
|
is needed for a "restart".
|
|
@@ -570,12 +606,12 @@ This command is safely ignored if the platform is win32 (with a warning)
|
|
|
570
606
|
</div>
|
|
571
607
|
</div>
|
|
572
608
|
|
|
573
|
-
<div id="method-
|
|
574
|
-
<a name="
|
|
609
|
+
<div id="method-M000122" class="method-detail">
|
|
610
|
+
<a name="M000122"></a>
|
|
575
611
|
|
|
576
612
|
<div class="method-heading">
|
|
577
|
-
<a href="Configurator.src/
|
|
578
|
-
onclick="popupCode('Configurator.src/
|
|
613
|
+
<a href="Configurator.src/M000122.html" target="Code" class="method-signature"
|
|
614
|
+
onclick="popupCode('Configurator.src/M000122.html');return false;">
|
|
579
615
|
<span class="method-name">stop</span><span class="method-args">(needs_restart=false, unlink_pid_file=true)</span>
|
|
580
616
|
</a>
|
|
581
617
|
</div>
|
|
@@ -589,12 +625,12 @@ restart and that the pid file should be unlinked on exit.
|
|
|
589
625
|
</div>
|
|
590
626
|
</div>
|
|
591
627
|
|
|
592
|
-
<div id="method-
|
|
593
|
-
<a name="
|
|
628
|
+
<div id="method-M000114" class="method-detail">
|
|
629
|
+
<a name="M000114"></a>
|
|
594
630
|
|
|
595
631
|
<div class="method-heading">
|
|
596
|
-
<a href="Configurator.src/
|
|
597
|
-
onclick="popupCode('Configurator.src/
|
|
632
|
+
<a href="Configurator.src/M000114.html" target="Code" class="method-signature"
|
|
633
|
+
onclick="popupCode('Configurator.src/M000114.html');return false;">
|
|
598
634
|
<span class="method-name">uri</span><span class="method-args">(location, options={})</span>
|
|
599
635
|
</a>
|
|
600
636
|
</div>
|
|
@@ -602,7 +638,7 @@ restart and that the pid file should be unlinked on exit.
|
|
|
602
638
|
<div class="method-description">
|
|
603
639
|
<p>
|
|
604
640
|
Called inside a <a
|
|
605
|
-
href="Configurator.html#
|
|
641
|
+
href="Configurator.html#M000113">Configurator.listener</a> block in order
|
|
606
642
|
to add URI->handler mappings for that listener. Use this as many times
|
|
607
643
|
as you like. It expects the following options or defaults:
|
|
608
644
|
</p>
|
|
@@ -619,12 +655,12 @@ handler.
|
|
|
619
655
|
</div>
|
|
620
656
|
</div>
|
|
621
657
|
|
|
622
|
-
<div id="method-
|
|
623
|
-
<a name="
|
|
658
|
+
<div id="method-M000109" class="method-detail">
|
|
659
|
+
<a name="M000109"></a>
|
|
624
660
|
|
|
625
661
|
<div class="method-heading">
|
|
626
|
-
<a href="Configurator.src/
|
|
627
|
-
onclick="popupCode('Configurator.src/
|
|
662
|
+
<a href="Configurator.src/M000109.html" target="Code" class="method-signature"
|
|
663
|
+
onclick="popupCode('Configurator.src/M000109.html');return false;">
|
|
628
664
|
<span class="method-name">write_pid_file</span><span class="method-args">()</span>
|
|
629
665
|
</a>
|
|
630
666
|
</div>
|