mongrel 0.3.13.2 → 0.3.13.3
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/COPYING +39 -488
- data/LICENSE +39 -488
- data/Rakefile +1 -1
- data/bin/mongrel_rails +8 -0
- data/doc/rdoc/classes/IO.src/M000001.html +5 -5
- data/doc/rdoc/classes/IO.src/M000002.html +5 -5
- data/doc/rdoc/classes/Kernel.src/M000020.html +5 -5
- data/doc/rdoc/classes/Kernel.src/M000021.html +9 -9
- data/doc/rdoc/classes/Mongrel.html +4 -22
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +10 -10
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +33 -33
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +20 -20
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +13 -13
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000105.html +11 -11
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +4 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000107.html +4 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000108.html +4 -4
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000109.html +5 -5
- data/doc/rdoc/classes/Mongrel/Camping.src/M000048.html +8 -8
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +4 -4
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +36 -36
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +10 -10
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +28 -28
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +8 -8
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +10 -10
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +10 -10
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +4 -4
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +6 -6
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +11 -11
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +33 -33
- data/doc/rdoc/classes/Mongrel/Configurator.html +2 -2
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +13 -13
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +17 -17
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +6 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +6 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +9 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +23 -23
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +16 -16
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +18 -18
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +10 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +8 -8
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +11 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +21 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000128.html +4 -4
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000129.html +19 -19
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000130.html +4 -4
- data/doc/rdoc/classes/Mongrel/Const.html +1 -1
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000099.html +5 -5
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/M000100.html +14 -14
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +7 -7
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +29 -29
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +28 -28
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +48 -48
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +25 -25
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000131.html +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000132.html +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000072.html +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000073.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000078.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000079.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000080.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000025.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +42 -42
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000139.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000140.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000141.html +18 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +11 -11
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +11 -11
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +8 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +17 -17
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000089.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000090.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000091.html +6 -6
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000092.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +11 -11
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +71 -71
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +17 -17
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +36 -37
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +20 -20
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +8 -8
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +25 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +11 -11
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +12 -12
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +8 -8
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +36 -36
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +9 -9
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000136.html +8 -8
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/M000137.html +13 -13
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000133.html +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000134.html +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/M000135.html +4 -4
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +4 -4
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +10 -10
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000076.html +28 -28
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000077.html +6 -6
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +4 -4
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +4 -4
- data/doc/rdoc/classes/MongrelDbg.src/M000015.html +5 -5
- data/doc/rdoc/classes/MongrelDbg.src/M000016.html +6 -6
- data/doc/rdoc/classes/MongrelDbg.src/M000017.html +8 -8
- data/doc/rdoc/classes/MongrelDbg.src/M000018.html +7 -7
- data/doc/rdoc/classes/MongrelDbg.src/M000019.html +4 -4
- data/doc/rdoc/classes/ObjectTracker.src/M000013.html +13 -13
- data/doc/rdoc/classes/ObjectTracker.src/M000014.html +30 -30
- data/doc/rdoc/classes/RequestLog/Access.src/M000142.html +5 -5
- data/doc/rdoc/classes/RequestLog/Files.src/M000143.html +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/M000145.html +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/M000146.html +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.src/M000144.html +20 -20
- data/doc/rdoc/classes/Stats.src/M000005.html +5 -5
- data/doc/rdoc/classes/Stats.src/M000006.html +9 -9
- data/doc/rdoc/classes/Stats.src/M000007.html +12 -12
- data/doc/rdoc/classes/Stats.src/M000008.html +4 -4
- data/doc/rdoc/classes/Stats.src/M000009.html +4 -4
- data/doc/rdoc/classes/Stats.src/M000010.html +4 -4
- data/doc/rdoc/classes/Stats.src/M000011.html +9 -9
- data/doc/rdoc/classes/Stats.src/M000012.html +6 -6
- data/doc/rdoc/classes/TCPServer.src/M000003.html +5 -5
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/COPYING.html +51 -639
- data/doc/rdoc/files/LICENSE.html +51 -639
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/camping_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/cgi_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/command_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +13 -1
- data/doc/rdoc/files/lib/mongrel/init_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/stats_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +6 -21
- data/doc/rdoc/files/lib/mongrel_rb.html +6 -21
- data/ext/http11/http11.c +4 -19
- data/ext/http11/http11_parser.c +48 -63
- data/ext/http11/http11_parser.h +3 -17
- data/lib/http11.so +0 -0
- data/lib/mongrel.rb +10 -23
- data/lib/mongrel/camping.rb +4 -16
- data/lib/mongrel/cgi.rb +4 -16
- data/lib/mongrel/command.rb +4 -16
- data/lib/mongrel/debug.rb +4 -16
- data/lib/mongrel/handlers.rb +6 -17
- data/lib/mongrel/init.rb +4 -16
- data/lib/mongrel/rails.rb +4 -16
- data/lib/mongrel/stats.rb +4 -16
- data/lib/mongrel/tcphack.rb +4 -16
- data/test/test_command.rb +4 -16
- data/test/test_conditional.rb +4 -16
- data/test/test_configurator.rb +4 -16
- data/test/test_debug.rb +4 -16
- data/test/test_handlers.rb +4 -16
- data/test/test_http11.rb +4 -16
- data/test/test_redirect_handler.rb +6 -0
- data/test/test_request_progress.rb +58 -0
- data/test/test_response.rb +4 -16
- data/test/test_stats.rb +4 -16
- data/test/test_uriclassifier.rb +4 -16
- data/test/test_ws.rb +4 -16
- data/test/testhelp.rb +6 -0
- metadata +5 -2
|
@@ -10,22 +10,22 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 755</span>
|
|
14
|
+
755: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">change_privilege</span>(<span class="ruby-identifier">user</span>, <span class="ruby-identifier">group</span>)
|
|
15
|
+
756: <span class="ruby-keyword kw">begin</span>
|
|
16
|
+
757: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">group</span>
|
|
17
|
+
758: <span class="ruby-identifier">log</span> <span class="ruby-node">"Changing group to #{group}."</span>
|
|
18
|
+
759: <span class="ruby-constant">Process</span><span class="ruby-operator">::</span><span class="ruby-constant">GID</span>.<span class="ruby-identifier">change_privilege</span>(<span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getgrnam</span>(<span class="ruby-identifier">group</span>).<span class="ruby-identifier">gid</span>)
|
|
19
|
+
760: <span class="ruby-keyword kw">end</span>
|
|
20
|
+
761:
|
|
21
|
+
762: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">user</span>
|
|
22
|
+
763: <span class="ruby-identifier">log</span> <span class="ruby-node">"Changing user to #{user}."</span>
|
|
23
|
+
764: <span class="ruby-constant">Process</span><span class="ruby-operator">::</span><span class="ruby-constant">UID</span>.<span class="ruby-identifier">change_privilege</span>(<span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getpwnam</span>(<span class="ruby-identifier">user</span>).<span class="ruby-identifier">uid</span>)
|
|
24
|
+
765: <span class="ruby-keyword kw">end</span>
|
|
25
|
+
766: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">EPERM</span>
|
|
26
|
+
767: <span class="ruby-identifier">log</span> <span class="ruby-node">"FAILED to change user:group #{user}:#{group}: #$!"</span>
|
|
27
|
+
768: <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
|
|
28
|
+
769: <span class="ruby-keyword kw">end</span>
|
|
29
|
+
770: <span class="ruby-keyword kw">end</span></pre>
|
|
30
30
|
</body>
|
|
31
31
|
</html>
|
|
@@ -10,11 +10,11 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 773</span>
|
|
14
|
+
773: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">write_pid_file</span>
|
|
15
|
+
774: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/mswin/</span>
|
|
16
|
+
775: <span class="ruby-identifier">open</span>(<span class="ruby-ivar">@pid_file</span>,<span class="ruby-value str">"w"</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-constant">Process</span>.<span class="ruby-identifier">pid</span>) }
|
|
17
|
+
776: <span class="ruby-keyword kw">end</span>
|
|
18
|
+
777: <span class="ruby-keyword kw">end</span></pre>
|
|
19
19
|
</body>
|
|
20
20
|
</html>
|
|
@@ -10,11 +10,11 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 780</span>
|
|
14
|
+
780: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cloaking_class</span>
|
|
15
|
+
781: <span class="ruby-keyword kw">class</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">self</span>
|
|
16
|
+
782: <span class="ruby-keyword kw">self</span>
|
|
17
|
+
783: <span class="ruby-keyword kw">end</span>
|
|
18
|
+
784: <span class="ruby-keyword kw">end</span></pre>
|
|
19
19
|
</body>
|
|
20
20
|
</html>
|
|
@@ -10,14 +10,14 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 787</span>
|
|
14
|
+
787: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
|
15
|
+
788: <span class="ruby-identifier">cloaking_class</span>.<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
|
|
16
|
+
789: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:cloaker_</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>
|
|
17
|
+
790: <span class="ruby-identifier">meth</span> = <span class="ruby-identifier">instance_method</span>( <span class="ruby-identifier">:cloaker_</span> )
|
|
18
|
+
791: <span class="ruby-identifier">remove_method</span> <span class="ruby-identifier">:cloaker_</span>
|
|
19
|
+
792: <span class="ruby-identifier">meth</span>
|
|
20
|
+
793: <span class="ruby-keyword kw">end</span>
|
|
21
|
+
794: <span class="ruby-keyword kw">end</span></pre>
|
|
22
22
|
</body>
|
|
23
23
|
</html>
|
|
@@ -10,9 +10,9 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 798</span>
|
|
14
|
+
798: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
|
15
|
+
799: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-ivar">@defaults</span>)
|
|
16
|
+
800: <span class="ruby-keyword kw">end</span></pre>
|
|
17
17
|
</body>
|
|
18
18
|
</html>
|
|
@@ -10,29 +10,29 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 816</span>
|
|
14
|
+
816: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listener</span>(<span class="ruby-identifier">options</span>={},<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>)
|
|
15
|
+
817: <span class="ruby-identifier">raise</span> <span class="ruby-value str">"Cannot call listener inside another listener block."</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@listener</span> <span class="ruby-keyword kw">or</span> <span class="ruby-ivar">@listener_name</span>)
|
|
16
|
+
818: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
|
17
|
+
819: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:num_processors</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">950</span>
|
|
18
|
+
820: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:timeout</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
|
|
19
|
+
821:
|
|
20
|
+
822: <span class="ruby-ivar">@listener</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:host</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:port</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:num_processors</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:timeout</span>].<span class="ruby-identifier">to_i</span>)
|
|
21
|
+
823: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-node">"#{ops[:host]}:#{ops[:port]}"</span>
|
|
22
|
+
824: <span class="ruby-ivar">@listeners</span>[<span class="ruby-ivar">@listener_name</span>] = <span class="ruby-ivar">@listener</span>
|
|
23
|
+
825:
|
|
24
|
+
826: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:user</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:group</span>]
|
|
25
|
+
827: <span class="ruby-identifier">change_privilege</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:user</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:group</span>])
|
|
26
|
+
828: <span class="ruby-keyword kw">end</span>
|
|
27
|
+
829:
|
|
28
|
+
830: <span class="ruby-comment cmt"># Does the actual cloaking operation to give the new implicit self.</span>
|
|
29
|
+
831: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
|
|
30
|
+
832: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
|
|
31
|
+
833: <span class="ruby-keyword kw">end</span>
|
|
19
32
|
834:
|
|
20
|
-
835: <span class="ruby-
|
|
21
|
-
836: <span class="ruby-ivar">@
|
|
22
|
-
837: <span class="ruby-ivar">@
|
|
23
|
-
838:
|
|
24
|
-
839: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:user</span>] <span class="ruby-keyword kw">and</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:group</span>]
|
|
25
|
-
840: <span class="ruby-identifier">change_privilege</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:user</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:group</span>])
|
|
26
|
-
841: <span class="ruby-keyword kw">end</span>
|
|
27
|
-
842:
|
|
28
|
-
843: <span class="ruby-comment cmt"># Does the actual cloaking operation to give the new implicit self.</span>
|
|
29
|
-
844: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
|
|
30
|
-
845: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
|
|
31
|
-
846: <span class="ruby-keyword kw">end</span>
|
|
32
|
-
847:
|
|
33
|
-
848: <span class="ruby-comment cmt"># all done processing this listener setup, reset implicit variables</span>
|
|
34
|
-
849: <span class="ruby-ivar">@listener</span> = <span class="ruby-keyword kw">nil</span>
|
|
35
|
-
850: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-keyword kw">nil</span>
|
|
36
|
-
851: <span class="ruby-keyword kw">end</span></pre>
|
|
33
|
+
835: <span class="ruby-comment cmt"># all done processing this listener setup, reset implicit variables</span>
|
|
34
|
+
836: <span class="ruby-ivar">@listener</span> = <span class="ruby-keyword kw">nil</span>
|
|
35
|
+
837: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-keyword kw">nil</span>
|
|
36
|
+
838: <span class="ruby-keyword kw">end</span></pre>
|
|
37
37
|
</body>
|
|
38
38
|
</html>
|
|
@@ -10,10 +10,10 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 848</span>
|
|
14
|
+
848: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">options</span>={})
|
|
15
|
+
849: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
|
16
|
+
850: <span class="ruby-ivar">@listener</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:handler</span>], <span class="ruby-identifier">in_front</span>=<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:in_front</span>])
|
|
17
|
+
851: <span class="ruby-keyword kw">end</span></pre>
|
|
18
18
|
</body>
|
|
19
19
|
</html>
|
|
@@ -10,21 +10,21 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 868</span>
|
|
14
|
+
868: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">daemonize</span>(<span class="ruby-identifier">options</span>={})
|
|
15
|
+
869: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
|
16
|
+
870: <span class="ruby-comment cmt"># save this for later since daemonize will hose it</span>
|
|
17
|
+
871: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/mswin/</span>
|
|
18
|
+
872: <span class="ruby-identifier">require</span> <span class="ruby-value str">'daemons/daemonize'</span>
|
|
19
|
+
873:
|
|
20
|
+
874: <span class="ruby-constant">Daemonize</span>.<span class="ruby-identifier">daemonize</span>(<span class="ruby-identifier">log_file</span>=<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:cwd</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:log_file</span>]))
|
|
21
|
+
875:
|
|
22
|
+
876: <span class="ruby-comment cmt"># change back to the original starting directory</span>
|
|
23
|
+
877: <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">chdir</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:cwd</span>])
|
|
24
|
+
878:
|
|
25
|
+
879: <span class="ruby-keyword kw">else</span>
|
|
26
|
+
880: <span class="ruby-identifier">log</span> <span class="ruby-value str">"WARNING: Win32 does not support daemon mode."</span>
|
|
27
|
+
881: <span class="ruby-keyword kw">end</span>
|
|
28
|
+
882: <span class="ruby-keyword kw">end</span></pre>
|
|
29
29
|
</body>
|
|
30
30
|
</html>
|
|
@@ -10,24 +10,24 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 889</span>
|
|
14
|
+
889: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_plugins</span>(<span class="ruby-identifier">options</span>={})
|
|
15
|
+
890: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
|
16
|
+
891:
|
|
17
|
+
892: <span class="ruby-identifier">load_settings</span> = {}
|
|
18
|
+
893: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:includes</span>]
|
|
19
|
+
894: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:includes</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">plugin</span><span class="ruby-operator">|</span>
|
|
20
|
+
895: <span class="ruby-identifier">load_settings</span>[<span class="ruby-identifier">plugin</span>] = <span class="ruby-constant">GemPlugin</span><span class="ruby-operator">::</span><span class="ruby-constant">INCLUDE</span>
|
|
21
|
+
896: <span class="ruby-keyword kw">end</span>
|
|
22
|
+
897: <span class="ruby-keyword kw">end</span>
|
|
23
|
+
898:
|
|
24
|
+
899: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:excludes</span>]
|
|
25
|
+
900: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:excludes</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">plugin</span><span class="ruby-operator">|</span>
|
|
26
|
+
901: <span class="ruby-identifier">load_settings</span>[<span class="ruby-identifier">plugin</span>] = <span class="ruby-constant">GemPlugin</span><span class="ruby-operator">::</span><span class="ruby-constant">EXCLUDE</span>
|
|
27
|
+
902: <span class="ruby-keyword kw">end</span>
|
|
28
|
+
903: <span class="ruby-keyword kw">end</span>
|
|
16
29
|
904:
|
|
17
|
-
905: <span class="ruby-identifier">
|
|
18
|
-
906:
|
|
19
|
-
907: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:includes</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">plugin</span><span class="ruby-operator">|</span>
|
|
20
|
-
908: <span class="ruby-identifier">load_settings</span>[<span class="ruby-identifier">plugin</span>] = <span class="ruby-constant">GemPlugin</span><span class="ruby-operator">::</span><span class="ruby-constant">INCLUDE</span>
|
|
21
|
-
909: <span class="ruby-keyword kw">end</span>
|
|
22
|
-
910: <span class="ruby-keyword kw">end</span>
|
|
23
|
-
911:
|
|
24
|
-
912: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:excludes</span>]
|
|
25
|
-
913: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:excludes</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">plugin</span><span class="ruby-operator">|</span>
|
|
26
|
-
914: <span class="ruby-identifier">load_settings</span>[<span class="ruby-identifier">plugin</span>] = <span class="ruby-constant">GemPlugin</span><span class="ruby-operator">::</span><span class="ruby-constant">EXCLUDE</span>
|
|
27
|
-
915: <span class="ruby-keyword kw">end</span>
|
|
28
|
-
916: <span class="ruby-keyword kw">end</span>
|
|
29
|
-
917:
|
|
30
|
-
918: <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">load</span>(<span class="ruby-identifier">load_settings</span>)
|
|
31
|
-
919: <span class="ruby-keyword kw">end</span></pre>
|
|
30
|
+
905: <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">load</span>(<span class="ruby-identifier">load_settings</span>)
|
|
31
|
+
906: <span class="ruby-keyword kw">end</span></pre>
|
|
32
32
|
</body>
|
|
33
33
|
</html>
|
|
@@ -10,9 +10,9 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 910</span>
|
|
14
|
+
910: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_yaml</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">default</span>={})
|
|
15
|
+
911: <span class="ruby-identifier">default</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-identifier">file</span>))
|
|
16
|
+
912: <span class="ruby-keyword kw">end</span></pre>
|
|
17
17
|
</body>
|
|
18
18
|
</html>
|
|
@@ -10,15 +10,15 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 921</span>
|
|
14
|
+
921: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_mime_map</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">mime</span>={})
|
|
15
|
+
922: <span class="ruby-comment cmt"># configure any requested mime map</span>
|
|
16
|
+
923: <span class="ruby-identifier">mime</span> = <span class="ruby-identifier">load_yaml</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">mime</span>)
|
|
17
|
+
924:
|
|
18
|
+
925: <span class="ruby-comment cmt"># check all the mime types to make sure they are the right format</span>
|
|
19
|
+
926: <span class="ruby-identifier">mime</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">log</span> <span class="ruby-node">"WARNING: MIME type #{k} must start with '.'"</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"."</span>) <span class="ruby-operator">!=</span> <span class="ruby-value">0</span> }
|
|
20
|
+
927:
|
|
21
|
+
928: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">mime</span>
|
|
22
|
+
929: <span class="ruby-keyword kw">end</span></pre>
|
|
23
23
|
</body>
|
|
24
24
|
</html>
|
|
@@ -10,10 +10,10 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 935</span>
|
|
14
|
+
935: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">plugin</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>={})
|
|
15
|
+
936: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
|
|
16
|
+
937: <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-identifier">name</span>, <span class="ruby-identifier">ops</span>)
|
|
17
|
+
938: <span class="ruby-keyword kw">end</span></pre>
|
|
18
18
|
</body>
|
|
19
19
|
</html>
|
|
@@ -10,9 +10,9 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 947</span>
|
|
14
|
+
947: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">redirect</span>(<span class="ruby-identifier">from</span>, <span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replacement</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
15
|
+
948: <span class="ruby-identifier">uri</span> <span class="ruby-identifier">from</span>, <span class="ruby-identifier">:handler</span> =<span class="ruby-operator">></span> <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">RedirectHandler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pattern</span>, <span class="ruby-identifier">replacement</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
|
16
|
+
949: <span class="ruby-keyword kw">end</span></pre>
|
|
17
17
|
</body>
|
|
18
18
|
</html>
|
|
@@ -10,13 +10,13 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 954</span>
|
|
14
|
+
954: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
|
|
15
|
+
955: <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">name</span>,<span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
|
16
|
+
956: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">run</span>
|
|
17
|
+
957: }
|
|
18
|
+
958:
|
|
19
|
+
959: <span class="ruby-identifier">$mongrel_sleeper_thread</span> = <span class="ruby-constant">Thread</span>.<span class="ruby-identifier">new</span> { <span class="ruby-identifier">loop</span> { <span class="ruby-identifier">sleep</span> <span class="ruby-value">1</span> } }
|
|
20
|
+
960: <span class="ruby-keyword kw">end</span></pre>
|
|
21
21
|
</body>
|
|
22
22
|
</html>
|
|
@@ -10,16 +10,16 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 966</span>
|
|
14
|
+
966: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stop</span>(<span class="ruby-identifier">needs_restart</span>=<span class="ruby-keyword kw">false</span>, <span class="ruby-identifier">unlink_pid_file</span>=<span class="ruby-keyword kw">true</span>)
|
|
15
|
+
967: <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">name</span>,<span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
|
16
|
+
968: <span class="ruby-identifier">s</span>.<span class="ruby-identifier">stop</span>
|
|
17
|
+
969: }
|
|
18
|
+
970:
|
|
19
|
+
971: <span class="ruby-ivar">@needs_restart</span> = <span class="ruby-identifier">needs_restart</span>
|
|
20
|
+
972: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">unlink_pid_file</span>
|
|
21
|
+
973: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span> <span class="ruby-ivar">@pid_file</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@pid_file</span> <span class="ruby-keyword kw">and</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-ivar">@pid_file</span>))
|
|
22
|
+
974: <span class="ruby-keyword kw">end</span>
|
|
23
|
+
975: <span class="ruby-keyword kw">end</span></pre>
|
|
24
24
|
</body>
|
|
25
25
|
</html>
|
|
@@ -10,9 +10,9 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 981</span>
|
|
14
|
+
981: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">join</span>
|
|
15
|
+
982: <span class="ruby-ivar">@listeners</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">acceptor</span>.<span class="ruby-identifier">join</span> }
|
|
16
|
+
983: <span class="ruby-keyword kw">end</span></pre>
|
|
17
17
|
</body>
|
|
18
18
|
</html>
|
|
@@ -10,26 +10,26 @@
|
|
|
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.rb, line
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 1001</span>
|
|
14
|
+
1001: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">debug</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">what</span> = [<span class="ruby-identifier">:objects</span>, <span class="ruby-identifier">:rails</span>, <span class="ruby-identifier">:files</span>, <span class="ruby-identifier">:threads</span>, <span class="ruby-identifier">:params</span>])
|
|
15
|
+
1002: <span class="ruby-identifier">require</span> <span class="ruby-value str">'mongrel/debug'</span>
|
|
16
|
+
1003: <span class="ruby-identifier">handlers</span> = {
|
|
17
|
+
1004: <span class="ruby-identifier">:files</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::access"</span>,
|
|
18
|
+
1005: <span class="ruby-identifier">:rails</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::files"</span>,
|
|
19
|
+
1006: <span class="ruby-identifier">:objects</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::objects"</span>,
|
|
20
|
+
1007: <span class="ruby-identifier">:threads</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::threads"</span>,
|
|
21
|
+
1008: <span class="ruby-identifier">:params</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"/handlers/requestlog::params"</span>
|
|
22
|
+
1009: }
|
|
23
|
+
1010:
|
|
24
|
+
1011: <span class="ruby-comment cmt"># turn on the debugging infrastructure, and ObjectTracker is a pig</span>
|
|
25
|
+
1012: <span class="ruby-constant">ObjectTracker</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">what</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">:objects</span>
|
|
26
|
+
1013: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">configure</span>
|
|
27
|
+
1014:
|
|
28
|
+
1015: <span class="ruby-comment cmt"># now we roll through each requested debug type, turn it on and load that plugin</span>
|
|
29
|
+
1016: <span class="ruby-identifier">what</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span><span class="ruby-operator">|</span>
|
|
30
|
+
1017: <span class="ruby-constant">MongrelDbg</span>.<span class="ruby-identifier">begin_trace</span> <span class="ruby-identifier">type</span>
|
|
31
|
+
1018: <span class="ruby-identifier">uri</span> <span class="ruby-identifier">location</span>, <span class="ruby-identifier">:handler</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">plugin</span>(<span class="ruby-identifier">handlers</span>[<span class="ruby-identifier">type</span>])
|
|
32
|
+
1019: <span class="ruby-keyword kw">end</span>
|
|
33
|
+
1020: <span class="ruby-keyword kw">end</span></pre>
|
|
34
34
|
</body>
|
|
35
35
|
</html>
|