mongrel 0.3.12.4 → 0.3.13
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +44 -33
- data/bin/mongrel_rails +67 -34
- data/doc/rdoc/classes/IO.html +10 -10
- data/doc/rdoc/classes/IO.src/{M000005.html → M000001.html} +5 -5
- data/doc/rdoc/classes/IO.src/{M000006.html → M000002.html} +5 -5
- data/doc/rdoc/classes/Kernel.html +10 -10
- data/doc/rdoc/classes/Kernel.src/{M000025.html → M000020.html} +5 -5
- data/doc/rdoc/classes/Kernel.src/M000021.html +23 -0
- data/doc/rdoc/classes/Mongrel.html +25 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +383 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000096.html +11 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000097.html +34 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +21 -6
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000093.html → M000099.html} +13 -13
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000094.html → M000100.html} +11 -11
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000095.html → M000101.html} +4 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +18 -0
- data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000084.html → CGIWrapper.src/M000103.html} +5 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +19 -0
- data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
- data/doc/rdoc/classes/Mongrel/Camping.src/M000046.html +22 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/{M000049.html → M000047.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +51 -0
- data/doc/rdoc/classes/Mongrel/Command.html +13 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +95 -50
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +24 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +42 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +9 -28
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +5 -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 +11 -9
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000037.html +20 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000040.html → M000038.html} +11 -11
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +37 -7
- data/doc/rdoc/classes/Mongrel/Configurator.html +651 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +16 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +18 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +7 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +7 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +10 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +5 -8
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +21 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +6 -15
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +17 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +20 -33
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +24 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +19 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +22 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +25 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +35 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +33 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +39 -7
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +181 -0
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000094.html +19 -0
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000095.html +28 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.html +48 -33
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +21 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +43 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +29 -7
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +50 -29
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +26 -27
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +5 -38
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +171 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000116.html → M000125.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000117.html → M000126.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +185 -0
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000072.html → M000069.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000073.html → M000070.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +170 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000074.html → M000075.html} +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +20 -10
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/{M000027.html → M000022.html} +5 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/{M000028.html → M000023.html} +3 -3
- data/doc/rdoc/classes/Mongrel/HttpParser.html +41 -36
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000056.html → M000049.html} +6 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000057.html → M000050.html} +7 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +7 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +37 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +5 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +6 -22
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +6 -5
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +239 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000130.html +52 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000119.html → M000131.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000120.html → M000132.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000121.html → M000133.html} +18 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +439 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +12 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +7 -12
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +12 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +9 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +9 -10
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +9 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +18 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +8 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +20 -0
- data/doc/rdoc/classes/Mongrel/{HttpServer.src/M000069.html → HttpResponse.src/M000085.html} +7 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +20 -0
- data/doc/rdoc/classes/Mongrel/{Configurator.src/M000101.html → HttpResponse.src/M000087.html} +5 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.html +68 -59
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +25 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +83 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +13 -11
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +50 -53
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +21 -11
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +5 -47
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +9 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +16 -16
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000040.html +39 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/{M000043.html → M000041.html} +11 -11
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +13 -22
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +17 -17
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000043.html +22 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +51 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +10 -9
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +211 -0
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000127.html +24 -0
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000128.html +24 -0
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000129.html +18 -0
- data/doc/rdoc/classes/{Class.html → Mongrel/StatusHandler.html} +42 -45
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +18 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +24 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +42 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +20 -0
- data/doc/rdoc/classes/Mongrel/StopServer.html +117 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +314 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000088.html +5 -23
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000089.html +5 -70
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000086.html → M000090.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000087.html → M000091.html} +0 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +36 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +83 -0
- data/doc/rdoc/classes/MongrelDbg.html +25 -25
- data/doc/rdoc/classes/MongrelDbg.src/{M000020.html → M000015.html} +5 -5
- data/doc/rdoc/classes/MongrelDbg.src/{M000021.html → M000016.html} +6 -6
- data/doc/rdoc/classes/MongrelDbg.src/{M000022.html → M000017.html} +8 -8
- data/doc/rdoc/classes/MongrelDbg.src/{M000023.html → M000018.html} +7 -7
- data/doc/rdoc/classes/MongrelDbg.src/{M000024.html → M000019.html} +4 -4
- data/doc/rdoc/classes/ObjectTracker.html +10 -40
- data/doc/rdoc/classes/ObjectTracker.src/M000013.html +27 -0
- data/doc/rdoc/classes/ObjectTracker.src/M000014.html +44 -0
- data/doc/rdoc/classes/RequestLog.html +115 -0
- data/doc/rdoc/classes/RequestLog/Access.html +151 -0
- data/doc/rdoc/classes/RequestLog/Access.src/{M000122.html → M000134.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Files.html +144 -0
- data/doc/rdoc/classes/RequestLog/Files.src/{M000123.html → M000135.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.html +144 -0
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000124.html → M000137.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Params.html +144 -0
- data/doc/rdoc/classes/RequestLog/Params.src/{M000125.html → M000138.html} +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.html +144 -0
- data/doc/rdoc/classes/RequestLog/Threads.src/M000136.html +34 -0
- data/doc/rdoc/classes/Stats.html +54 -36
- data/doc/rdoc/classes/Stats.src/{M000013.html → M000005.html} +6 -5
- data/doc/rdoc/classes/Stats.src/M000006.html +23 -0
- data/doc/rdoc/classes/Stats.src/M000007.html +26 -0
- data/doc/rdoc/classes/Stats.src/M000008.html +18 -0
- data/doc/rdoc/classes/Stats.src/M000009.html +5 -6
- data/doc/rdoc/classes/Stats.src/M000010.html +5 -10
- data/doc/rdoc/classes/Stats.src/M000011.html +10 -13
- data/doc/rdoc/classes/Stats.src/M000012.html +7 -5
- data/doc/rdoc/classes/TCPServer.html +9 -9
- data/doc/rdoc/classes/TCPServer.src/M000003.html +19 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/COPYING.html +1 -1
- data/doc/rdoc/files/LICENSE.html +1 -1
- data/doc/rdoc/files/README.html +1 -1
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/camping_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/cgi_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/command_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +3 -3
- data/doc/rdoc/files/lib/mongrel/init_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +28 -1
- data/doc/rdoc/files/lib/mongrel/stats_rb.html +21 -10
- data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +23 -4
- data/doc/rdoc/files/lib/mongrel_rb.html +33 -1
- data/doc/rdoc/fr_class_index.html +65 -0
- data/doc/rdoc/fr_file_index.html +40 -0
- data/doc/rdoc/fr_method_index.html +164 -0
- data/doc/rdoc/index.html +24 -0
- data/examples/camping/blog.rb +1 -1
- data/examples/camping/tepee.rb +4 -3
- data/examples/simpletest.rb +15 -14
- data/ext/http11/http11.c +52 -18
- data/ext/http11/http11_parser.c +194 -177
- data/ext/http11/http11_parser.h +23 -5
- data/lib/mongrel.rb +295 -134
- data/lib/mongrel/camping.rb +48 -6
- data/lib/mongrel/cgi.rb +20 -2
- data/lib/mongrel/command.rb +76 -27
- data/lib/mongrel/debug.rb +42 -13
- data/lib/mongrel/handlers.rb +218 -59
- data/lib/mongrel/init.rb +18 -0
- data/lib/mongrel/rails.rb +61 -44
- data/lib/mongrel/stats.rb +30 -2
- data/lib/mongrel/tcphack.rb +18 -0
- data/setup.rb +799 -574
- data/test/mime.yaml +3 -0
- data/test/mongrel.conf +1 -0
- data/test/test_command.rb +101 -0
- data/test/test_conditional.rb +124 -0
- data/test/test_configurator.rb +56 -22
- data/test/test_debug.rb +18 -2
- data/test/test_handlers.rb +105 -0
- data/test/test_http11.rb +27 -9
- data/test/test_response.rb +38 -0
- data/test/test_stats.rb +21 -2
- data/test/test_uriclassifier.rb +18 -0
- data/test/test_ws.rb +105 -19
- data/test/testhelp.rb +36 -0
- data/tools/rakehelp.rb +52 -46
- data/tools/trickletest.rb +37 -0
- metadata +127 -76
- data/doc/rdoc/classes/Class.src/M000001.html +0 -24
- data/doc/rdoc/classes/Class.src/M000002.html +0 -62
- data/doc/rdoc/classes/Class.src/M000003.html +0 -21
- data/doc/rdoc/classes/Class.src/M000004.html +0 -20
- data/doc/rdoc/classes/Kernel.src/M000026.html +0 -25
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000090.html +0 -24
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000091.html +0 -47
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000092.html +0 -34
- data/doc/rdoc/classes/Mongrel/Camping.src/M000048.html +0 -22
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +0 -27
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +0 -46
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +0 -24
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +0 -23
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +0 -32
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +0 -19
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +0 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +0 -40
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +0 -18
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000118.html +0 -28
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +0 -26
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +0 -22
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +0 -18
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +0 -32
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +0 -48
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +0 -23
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000085.html +0 -18
- data/doc/rdoc/classes/ObjectTracker.src/M000016.html +0 -22
- data/doc/rdoc/classes/ObjectTracker.src/M000017.html +0 -18
- data/doc/rdoc/classes/ObjectTracker.src/M000018.html +0 -18
- data/doc/rdoc/classes/ObjectTracker.src/M000019.html +0 -44
- data/doc/rdoc/classes/Stats.src/M000014.html +0 -19
- data/doc/rdoc/classes/Stats.src/M000015.html +0 -20
- data/doc/rdoc/classes/TCPServer.src/M000007.html +0 -19
- data/lib/mongrel/#rails.rb# +0 -178
@@ -5,16 +5,46 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>run (Mongrel::Command::Registry)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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>
|
19
49
|
</body>
|
20
50
|
</html>
|
@@ -0,0 +1,651 @@
|
|
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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Mongrel::Configurator</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Mongrel::Configurator</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../files/lib/mongrel_rb.html">
|
59
|
+
lib/mongrel.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Implements a simple DSL for configuring a <a
|
84
|
+
href="../Mongrel.html">Mongrel</a> server for your purposes. More used by
|
85
|
+
framework implementers to setup <a href="../Mongrel.html">Mongrel</a> how
|
86
|
+
they like, but could be used by regular folks to add more things to an
|
87
|
+
existing mongrel configuration.
|
88
|
+
</p>
|
89
|
+
<p>
|
90
|
+
It is used like this:
|
91
|
+
</p>
|
92
|
+
<pre>
|
93
|
+
require 'mongrel'
|
94
|
+
config = Mongrel::Configurator.new :host => "127.0.0.1" do
|
95
|
+
listener :port => 3000 do
|
96
|
+
uri "/app", :handler => Mongrel::DirHandler.new(".", load_mime_map("mime.yaml"))
|
97
|
+
end
|
98
|
+
run
|
99
|
+
end
|
100
|
+
</pre>
|
101
|
+
<p>
|
102
|
+
This will setup a simple <a href="DirHandler.html">DirHandler</a> at the
|
103
|
+
current directory and load additional mime types from mimy.yaml. The :host
|
104
|
+
=> "127.0.0.1" is actually not specific to the servers but
|
105
|
+
just a hash of default parameters that all server or uri calls receive.
|
106
|
+
</p>
|
107
|
+
<p>
|
108
|
+
When you are inside the block after <a
|
109
|
+
href="Configurator.html#M000105">Mongrel::Configurator.new</a> you can
|
110
|
+
simply call functions that are part of <a
|
111
|
+
href="Configurator.html">Configurator</a> (like server, uri, daemonize,
|
112
|
+
etc) without having to refer to anything else. You can also call these
|
113
|
+
functions on the resulting object directly for additional configuration.
|
114
|
+
</p>
|
115
|
+
<p>
|
116
|
+
A major thing about <a href="Configurator.html">Configurator</a> is that it
|
117
|
+
actually lets you configure multiple listeners for any hosts and ports you
|
118
|
+
want. These are kept in a map config.listeners so you can get to them.
|
119
|
+
</p>
|
120
|
+
<ul>
|
121
|
+
<li>:pid_file => Where to write the process ID.
|
122
|
+
|
123
|
+
</li>
|
124
|
+
</ul>
|
125
|
+
|
126
|
+
</div>
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div id="method-list">
|
132
|
+
<h3 class="section-bar">Methods</h3>
|
133
|
+
|
134
|
+
<div class="name-list">
|
135
|
+
<a href="#M000106">change_privilege</a>
|
136
|
+
<a href="#M000109">cloaker</a>
|
137
|
+
<a href="#M000108">cloaking_class</a>
|
138
|
+
<a href="#M000113">daemonize</a>
|
139
|
+
<a href="#M000121">debug</a>
|
140
|
+
<a href="#M000120">join</a>
|
141
|
+
<a href="#M000111">listener</a>
|
142
|
+
<a href="#M000116">load_mime_map</a>
|
143
|
+
<a href="#M000114">load_plugins</a>
|
144
|
+
<a href="#M000115">load_yaml</a>
|
145
|
+
<a href="#M000124">log</a>
|
146
|
+
<a href="#M000105">new</a>
|
147
|
+
<a href="#M000117">plugin</a>
|
148
|
+
<a href="#M000110">resolve_defaults</a>
|
149
|
+
<a href="#M000118">run</a>
|
150
|
+
<a href="#M000122">run_config</a>
|
151
|
+
<a href="#M000123">setup_signals</a>
|
152
|
+
<a href="#M000119">stop</a>
|
153
|
+
<a href="#M000112">uri</a>
|
154
|
+
<a href="#M000107">write_pid_file</a>
|
155
|
+
</div>
|
156
|
+
</div>
|
157
|
+
|
158
|
+
</div>
|
159
|
+
|
160
|
+
|
161
|
+
<!-- if includes -->
|
162
|
+
|
163
|
+
<div id="section">
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<div id="attribute-list">
|
170
|
+
<h3 class="section-bar">Attributes</h3>
|
171
|
+
|
172
|
+
<div class="name-list">
|
173
|
+
<table>
|
174
|
+
<tr class="top-aligned-row context-row">
|
175
|
+
<td class="context-item-name">defaults</td>
|
176
|
+
<td class="context-item-value"> [R] </td>
|
177
|
+
<td class="context-item-desc"></td>
|
178
|
+
</tr>
|
179
|
+
<tr class="top-aligned-row context-row">
|
180
|
+
<td class="context-item-name">listeners</td>
|
181
|
+
<td class="context-item-value"> [R] </td>
|
182
|
+
<td class="context-item-desc"></td>
|
183
|
+
</tr>
|
184
|
+
<tr class="top-aligned-row context-row">
|
185
|
+
<td class="context-item-name">needs_restart</td>
|
186
|
+
<td class="context-item-value"> [R] </td>
|
187
|
+
<td class="context-item-desc"></td>
|
188
|
+
</tr>
|
189
|
+
</table>
|
190
|
+
</div>
|
191
|
+
</div>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<!-- if method_list -->
|
196
|
+
<div id="methods">
|
197
|
+
<h3 class="section-bar">Public Class methods</h3>
|
198
|
+
|
199
|
+
<div id="method-M000105" class="method-detail">
|
200
|
+
<a name="M000105"></a>
|
201
|
+
|
202
|
+
<div class="method-heading">
|
203
|
+
<a href="Configurator.src/M000105.html" target="Code" class="method-signature"
|
204
|
+
onclick="popupCode('Configurator.src/M000105.html');return false;">
|
205
|
+
<span class="method-name">new</span><span class="method-args">(defaults={}, &blk)</span>
|
206
|
+
</a>
|
207
|
+
</div>
|
208
|
+
|
209
|
+
<div class="method-description">
|
210
|
+
<p>
|
211
|
+
You pass in initial defaults and then a block to continue configuring.
|
212
|
+
</p>
|
213
|
+
</div>
|
214
|
+
</div>
|
215
|
+
|
216
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
217
|
+
|
218
|
+
<div id="method-M000106" class="method-detail">
|
219
|
+
<a name="M000106"></a>
|
220
|
+
|
221
|
+
<div class="method-heading">
|
222
|
+
<a href="Configurator.src/M000106.html" target="Code" class="method-signature"
|
223
|
+
onclick="popupCode('Configurator.src/M000106.html');return false;">
|
224
|
+
<span class="method-name">change_privilege</span><span class="method-args">(user, group)</span>
|
225
|
+
</a>
|
226
|
+
</div>
|
227
|
+
|
228
|
+
<div class="method-description">
|
229
|
+
<p>
|
230
|
+
Change privilege of the process to specified user and group.
|
231
|
+
</p>
|
232
|
+
</div>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
<div id="method-M000109" class="method-detail">
|
236
|
+
<a name="M000109"></a>
|
237
|
+
|
238
|
+
<div class="method-heading">
|
239
|
+
<a href="Configurator.src/M000109.html" target="Code" class="method-signature"
|
240
|
+
onclick="popupCode('Configurator.src/M000109.html');return false;">
|
241
|
+
<span class="method-name">cloaker</span><span class="method-args">(&blk)</span>
|
242
|
+
</a>
|
243
|
+
</div>
|
244
|
+
|
245
|
+
<div class="method-description">
|
246
|
+
<p>
|
247
|
+
Do not call this. You were warned.
|
248
|
+
</p>
|
249
|
+
</div>
|
250
|
+
</div>
|
251
|
+
|
252
|
+
<div id="method-M000108" class="method-detail">
|
253
|
+
<a name="M000108"></a>
|
254
|
+
|
255
|
+
<div class="method-heading">
|
256
|
+
<a href="Configurator.src/M000108.html" target="Code" class="method-signature"
|
257
|
+
onclick="popupCode('Configurator.src/M000108.html');return false;">
|
258
|
+
<span class="method-name">cloaking_class</span><span class="method-args">()</span>
|
259
|
+
</a>
|
260
|
+
</div>
|
261
|
+
|
262
|
+
<div class="method-description">
|
263
|
+
<p>
|
264
|
+
generates a class for cloaking the current self and making the DSL nicer
|
265
|
+
</p>
|
266
|
+
</div>
|
267
|
+
</div>
|
268
|
+
|
269
|
+
<div id="method-M000113" class="method-detail">
|
270
|
+
<a name="M000113"></a>
|
271
|
+
|
272
|
+
<div class="method-heading">
|
273
|
+
<a href="Configurator.src/M000113.html" target="Code" class="method-signature"
|
274
|
+
onclick="popupCode('Configurator.src/M000113.html');return false;">
|
275
|
+
<span class="method-name">daemonize</span><span class="method-args">(options={})</span>
|
276
|
+
</a>
|
277
|
+
</div>
|
278
|
+
|
279
|
+
<div class="method-description">
|
280
|
+
<p>
|
281
|
+
Daemonizes the current Ruby script turning all the listeners into an actual
|
282
|
+
"server" or detached process. You must call this <b>before</b>
|
283
|
+
frameworks that open files as otherwise the files will be closed by this
|
284
|
+
function.
|
285
|
+
</p>
|
286
|
+
<p>
|
287
|
+
Does not work for Win32 systems (the call is silently ignored).
|
288
|
+
</p>
|
289
|
+
<p>
|
290
|
+
Requires the following options or defaults:
|
291
|
+
</p>
|
292
|
+
<ul>
|
293
|
+
<li>:cwd => Directory to change to.
|
294
|
+
|
295
|
+
</li>
|
296
|
+
<li>:log_file => Where to write STDOUT and STDERR.
|
297
|
+
|
298
|
+
</li>
|
299
|
+
</ul>
|
300
|
+
<p>
|
301
|
+
It is safe to call this on win32 as it will only require the daemons
|
302
|
+
gem/library if NOT win32.
|
303
|
+
</p>
|
304
|
+
</div>
|
305
|
+
</div>
|
306
|
+
|
307
|
+
<div id="method-M000121" class="method-detail">
|
308
|
+
<a name="M000121"></a>
|
309
|
+
|
310
|
+
<div class="method-heading">
|
311
|
+
<a href="Configurator.src/M000121.html" target="Code" class="method-signature"
|
312
|
+
onclick="popupCode('Configurator.src/M000121.html');return false;">
|
313
|
+
<span class="method-name">debug</span><span class="method-args">(location, what = [:object, :rails, :files, :threads, :params])</span>
|
314
|
+
</a>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
<div class="method-description">
|
318
|
+
<p>
|
319
|
+
Calling this before you register your URIs to the given location will setup
|
320
|
+
a set of handlers that log open files, objects, and the parameters for each
|
321
|
+
request. This helps you track common problems found in <a
|
322
|
+
href="Rails.html">Rails</a> applications that are either slow or become
|
323
|
+
unresponsive after a little while.
|
324
|
+
</p>
|
325
|
+
<p>
|
326
|
+
TODO: Document the optional selections from the what parameter
|
327
|
+
</p>
|
328
|
+
</div>
|
329
|
+
</div>
|
330
|
+
|
331
|
+
<div id="method-M000120" class="method-detail">
|
332
|
+
<a name="M000120"></a>
|
333
|
+
|
334
|
+
<div class="method-heading">
|
335
|
+
<a href="Configurator.src/M000120.html" target="Code" class="method-signature"
|
336
|
+
onclick="popupCode('Configurator.src/M000120.html');return false;">
|
337
|
+
<span class="method-name">join</span><span class="method-args">()</span>
|
338
|
+
</a>
|
339
|
+
</div>
|
340
|
+
|
341
|
+
<div class="method-description">
|
342
|
+
<p>
|
343
|
+
This method should actually be called <b>outside</b> of the <a
|
344
|
+
href="Configurator.html">Configurator</a> block so that you can control it.
|
345
|
+
In otherwords do it like: config.join.
|
346
|
+
</p>
|
347
|
+
</div>
|
348
|
+
</div>
|
349
|
+
|
350
|
+
<div id="method-M000111" class="method-detail">
|
351
|
+
<a name="M000111"></a>
|
352
|
+
|
353
|
+
<div class="method-heading">
|
354
|
+
<a href="Configurator.src/M000111.html" target="Code" class="method-signature"
|
355
|
+
onclick="popupCode('Configurator.src/M000111.html');return false;">
|
356
|
+
<span class="method-name">listener</span><span class="method-args">(options={},&blk)</span>
|
357
|
+
</a>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
<div class="method-description">
|
361
|
+
<p>
|
362
|
+
Starts a listener block. This is the only one that actually takes a block
|
363
|
+
and then you make <a href="Configurator.html#M000112">Configurator.uri</a>
|
364
|
+
calls in order to setup your URIs and handlers. If you write your Handlers
|
365
|
+
as GemPlugins then you can use <a
|
366
|
+
href="Configurator.html#M000114">load_plugins</a> and plugin to load them.
|
367
|
+
</p>
|
368
|
+
<p>
|
369
|
+
It expects the following options (or defaults):
|
370
|
+
</p>
|
371
|
+
<ul>
|
372
|
+
<li>:host => Host name to bind.
|
373
|
+
|
374
|
+
</li>
|
375
|
+
<li>:port => Port to bind.
|
376
|
+
|
377
|
+
</li>
|
378
|
+
<li>:num_processors => The maximum number of concurrent threads allowed.
|
379
|
+
(950 default)
|
380
|
+
|
381
|
+
</li>
|
382
|
+
<li>:timeout => 1/100th of a second timeout between requests. (10 is 1/10th,
|
383
|
+
0 is timeout)
|
384
|
+
|
385
|
+
</li>
|
386
|
+
</ul>
|
387
|
+
</div>
|
388
|
+
</div>
|
389
|
+
|
390
|
+
<div id="method-M000116" class="method-detail">
|
391
|
+
<a name="M000116"></a>
|
392
|
+
|
393
|
+
<div class="method-heading">
|
394
|
+
<a href="Configurator.src/M000116.html" target="Code" class="method-signature"
|
395
|
+
onclick="popupCode('Configurator.src/M000116.html');return false;">
|
396
|
+
<span class="method-name">load_mime_map</span><span class="method-args">(file, mime={})</span>
|
397
|
+
</a>
|
398
|
+
</div>
|
399
|
+
|
400
|
+
<div class="method-description">
|
401
|
+
<p>
|
402
|
+
Loads the MIME map file and checks that it is correct on loading. This is
|
403
|
+
commonly passed to <a href="DirHandler.html">Mongrel::DirHandler</a> or any
|
404
|
+
framework handler that uses <a href="DirHandler.html">DirHandler</a> to
|
405
|
+
serve files. You can also include a set of default MIME types as additional
|
406
|
+
settings. See <a href="DirHandler.html">Mongrel::DirHandler</a> for how the
|
407
|
+
MIME types map is organized.
|
408
|
+
</p>
|
409
|
+
</div>
|
410
|
+
</div>
|
411
|
+
|
412
|
+
<div id="method-M000114" class="method-detail">
|
413
|
+
<a name="M000114"></a>
|
414
|
+
|
415
|
+
<div class="method-heading">
|
416
|
+
<a href="Configurator.src/M000114.html" target="Code" class="method-signature"
|
417
|
+
onclick="popupCode('Configurator.src/M000114.html');return false;">
|
418
|
+
<span class="method-name">load_plugins</span><span class="method-args">(options={})</span>
|
419
|
+
</a>
|
420
|
+
</div>
|
421
|
+
|
422
|
+
<div class="method-description">
|
423
|
+
<p>
|
424
|
+
Uses the GemPlugin system to easily load plugins based on their gem
|
425
|
+
dependencies. You pass in either an :includes => [] or :excludes =>
|
426
|
+
[] setting listing the names of plugins to include or exclude from the when
|
427
|
+
determining the dependencies.
|
428
|
+
</p>
|
429
|
+
</div>
|
430
|
+
</div>
|
431
|
+
|
432
|
+
<div id="method-M000115" class="method-detail">
|
433
|
+
<a name="M000115"></a>
|
434
|
+
|
435
|
+
<div class="method-heading">
|
436
|
+
<a href="Configurator.src/M000115.html" target="Code" class="method-signature"
|
437
|
+
onclick="popupCode('Configurator.src/M000115.html');return false;">
|
438
|
+
<span class="method-name">load_yaml</span><span class="method-args">(file, default={})</span>
|
439
|
+
</a>
|
440
|
+
</div>
|
441
|
+
|
442
|
+
<div class="method-description">
|
443
|
+
<p>
|
444
|
+
Easy way to load a YAML file and apply default settings.
|
445
|
+
</p>
|
446
|
+
</div>
|
447
|
+
</div>
|
448
|
+
|
449
|
+
<div id="method-M000124" class="method-detail">
|
450
|
+
<a name="M000124"></a>
|
451
|
+
|
452
|
+
<div class="method-heading">
|
453
|
+
<a href="Configurator.src/M000124.html" target="Code" class="method-signature"
|
454
|
+
onclick="popupCode('Configurator.src/M000124.html');return false;">
|
455
|
+
<span class="method-name">log</span><span class="method-args">(msg)</span>
|
456
|
+
</a>
|
457
|
+
</div>
|
458
|
+
|
459
|
+
<div class="method-description">
|
460
|
+
<p>
|
461
|
+
Logs a simple message to STDERR (or the mongrel log if in daemon mode).
|
462
|
+
</p>
|
463
|
+
</div>
|
464
|
+
</div>
|
465
|
+
|
466
|
+
<div id="method-M000117" class="method-detail">
|
467
|
+
<a name="M000117"></a>
|
468
|
+
|
469
|
+
<div class="method-heading">
|
470
|
+
<a href="Configurator.src/M000117.html" target="Code" class="method-signature"
|
471
|
+
onclick="popupCode('Configurator.src/M000117.html');return false;">
|
472
|
+
<span class="method-name">plugin</span><span class="method-args">(name, options={})</span>
|
473
|
+
</a>
|
474
|
+
</div>
|
475
|
+
|
476
|
+
<div class="method-description">
|
477
|
+
<p>
|
478
|
+
Loads and creates a plugin for you based on the given name and configured
|
479
|
+
with the selected options. The options are merged with the defaults prior
|
480
|
+
to passing them in.
|
481
|
+
</p>
|
482
|
+
</div>
|
483
|
+
</div>
|
484
|
+
|
485
|
+
<div id="method-M000110" class="method-detail">
|
486
|
+
<a name="M000110"></a>
|
487
|
+
|
488
|
+
<div class="method-heading">
|
489
|
+
<a href="Configurator.src/M000110.html" target="Code" class="method-signature"
|
490
|
+
onclick="popupCode('Configurator.src/M000110.html');return false;">
|
491
|
+
<span class="method-name">resolve_defaults</span><span class="method-args">(options)</span>
|
492
|
+
</a>
|
493
|
+
</div>
|
494
|
+
|
495
|
+
<div class="method-description">
|
496
|
+
<p>
|
497
|
+
This will resolve the given options against the defaults. Normally just
|
498
|
+
used internally.
|
499
|
+
</p>
|
500
|
+
</div>
|
501
|
+
</div>
|
502
|
+
|
503
|
+
<div id="method-M000118" class="method-detail">
|
504
|
+
<a name="M000118"></a>
|
505
|
+
|
506
|
+
<div class="method-heading">
|
507
|
+
<a href="Configurator.src/M000118.html" target="Code" class="method-signature"
|
508
|
+
onclick="popupCode('Configurator.src/M000118.html');return false;">
|
509
|
+
<span class="method-name">run</span><span class="method-args">()</span>
|
510
|
+
</a>
|
511
|
+
</div>
|
512
|
+
|
513
|
+
<div class="method-description">
|
514
|
+
<p>
|
515
|
+
Works like a meta run method which goes through all the configured
|
516
|
+
listeners. Use the <a
|
517
|
+
href="Configurator.html#M000120">Configurator.join</a> method to prevent
|
518
|
+
Ruby from exiting until each one is done.
|
519
|
+
</p>
|
520
|
+
</div>
|
521
|
+
</div>
|
522
|
+
|
523
|
+
<div id="method-M000122" class="method-detail">
|
524
|
+
<a name="M000122"></a>
|
525
|
+
|
526
|
+
<div class="method-heading">
|
527
|
+
<a href="Configurator.src/M000122.html" target="Code" class="method-signature"
|
528
|
+
onclick="popupCode('Configurator.src/M000122.html');return false;">
|
529
|
+
<span class="method-name">run_config</span><span class="method-args">(script)</span>
|
530
|
+
</a>
|
531
|
+
</div>
|
532
|
+
|
533
|
+
<div class="method-description">
|
534
|
+
<p>
|
535
|
+
Used to allow you to let users specify their own configurations inside your
|
536
|
+
<a href="Configurator.html">Configurator</a> setup. You pass it a script
|
537
|
+
name and it reads it in and does an eval on the contents passing in the
|
538
|
+
right binding so they can put their own <a
|
539
|
+
href="Configurator.html">Configurator</a> statements.
|
540
|
+
</p>
|
541
|
+
</div>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
<div id="method-M000123" class="method-detail">
|
545
|
+
<a name="M000123"></a>
|
546
|
+
|
547
|
+
<div class="method-heading">
|
548
|
+
<a href="Configurator.src/M000123.html" target="Code" class="method-signature"
|
549
|
+
onclick="popupCode('Configurator.src/M000123.html');return false;">
|
550
|
+
<span class="method-name">setup_signals</span><span class="method-args">(options={})</span>
|
551
|
+
</a>
|
552
|
+
</div>
|
553
|
+
|
554
|
+
<div class="method-description">
|
555
|
+
<p>
|
556
|
+
Sets up the standard signal handlers that are used on most Ruby It only
|
557
|
+
configures if the platform is not win32 and doesn’t do a HUP signal
|
558
|
+
since this is typically framework specific.
|
559
|
+
</p>
|
560
|
+
<p>
|
561
|
+
Requires a :pid_file option given to <a
|
562
|
+
href="Configurator.html#M000105">Configurator.new</a> to indicate a file to
|
563
|
+
delete. It sets the MongrelConfig.needs_restart attribute if the start
|
564
|
+
command should reload. It’s up to you to detect this and do whatever
|
565
|
+
is needed for a "restart".
|
566
|
+
</p>
|
567
|
+
<p>
|
568
|
+
This command is safely ignored if the platform is win32 (with a warning)
|
569
|
+
</p>
|
570
|
+
</div>
|
571
|
+
</div>
|
572
|
+
|
573
|
+
<div id="method-M000119" class="method-detail">
|
574
|
+
<a name="M000119"></a>
|
575
|
+
|
576
|
+
<div class="method-heading">
|
577
|
+
<a href="Configurator.src/M000119.html" target="Code" class="method-signature"
|
578
|
+
onclick="popupCode('Configurator.src/M000119.html');return false;">
|
579
|
+
<span class="method-name">stop</span><span class="method-args">(needs_restart=false, unlink_pid_file=true)</span>
|
580
|
+
</a>
|
581
|
+
</div>
|
582
|
+
|
583
|
+
<div class="method-description">
|
584
|
+
<p>
|
585
|
+
Calls .stop on all the configured listeners so they stop processing
|
586
|
+
requests (gracefully). By default it assumes that you don’t want to
|
587
|
+
restart and that the pid file should be unlinked on exit.
|
588
|
+
</p>
|
589
|
+
</div>
|
590
|
+
</div>
|
591
|
+
|
592
|
+
<div id="method-M000112" class="method-detail">
|
593
|
+
<a name="M000112"></a>
|
594
|
+
|
595
|
+
<div class="method-heading">
|
596
|
+
<a href="Configurator.src/M000112.html" target="Code" class="method-signature"
|
597
|
+
onclick="popupCode('Configurator.src/M000112.html');return false;">
|
598
|
+
<span class="method-name">uri</span><span class="method-args">(location, options={})</span>
|
599
|
+
</a>
|
600
|
+
</div>
|
601
|
+
|
602
|
+
<div class="method-description">
|
603
|
+
<p>
|
604
|
+
Called inside a <a
|
605
|
+
href="Configurator.html#M000111">Configurator.listener</a> block in order
|
606
|
+
to add URI->handler mappings for that listener. Use this as many times
|
607
|
+
as you like. It expects the following options or defaults:
|
608
|
+
</p>
|
609
|
+
<ul>
|
610
|
+
<li>:handler => <a href="HttpHandler.html">HttpHandler</a> — Handler
|
611
|
+
to use for this location.
|
612
|
+
|
613
|
+
</li>
|
614
|
+
<li>:in_front => true/false — Rather than appending, it prepends this
|
615
|
+
handler.
|
616
|
+
|
617
|
+
</li>
|
618
|
+
</ul>
|
619
|
+
</div>
|
620
|
+
</div>
|
621
|
+
|
622
|
+
<div id="method-M000107" class="method-detail">
|
623
|
+
<a name="M000107"></a>
|
624
|
+
|
625
|
+
<div class="method-heading">
|
626
|
+
<a href="Configurator.src/M000107.html" target="Code" class="method-signature"
|
627
|
+
onclick="popupCode('Configurator.src/M000107.html');return false;">
|
628
|
+
<span class="method-name">write_pid_file</span><span class="method-args">()</span>
|
629
|
+
</a>
|
630
|
+
</div>
|
631
|
+
|
632
|
+
<div class="method-description">
|
633
|
+
<p>
|
634
|
+
Writes the PID file but only if we’re on windows.
|
635
|
+
</p>
|
636
|
+
</div>
|
637
|
+
</div>
|
638
|
+
|
639
|
+
|
640
|
+
</div>
|
641
|
+
|
642
|
+
|
643
|
+
</div>
|
644
|
+
|
645
|
+
|
646
|
+
<div id="validator-badges">
|
647
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
648
|
+
</div>
|
649
|
+
|
650
|
+
</body>
|
651
|
+
</html>
|