mongrel 0.3.13.4 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -75
- data/Rakefile +14 -14
- data/bin/mongrel_rails +35 -23
- data/doc/rdoc/classes/IO.html +12 -12
- data/doc/rdoc/classes/IO.src/{M000001.html → M000003.html} +0 -0
- data/doc/rdoc/classes/IO.src/{M000002.html → M000004.html} +0 -0
- data/doc/rdoc/classes/Kernel.html +11 -11
- data/doc/rdoc/classes/Kernel.src/{M000010.html → M000012.html} +0 -0
- data/doc/rdoc/classes/Kernel.src/{M000011.html → M000013.html} +0 -0
- data/doc/rdoc/classes/Mongrel.html +3 -3
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +77 -69
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000115.html +12 -19
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000116.html +34 -12
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000117.html +21 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000118.html +19 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000119.html +12 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000120.html +5 -6
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000121.html +18 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000122.html +18 -0
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000123.html +19 -0
- data/doc/rdoc/classes/Mongrel/Camping.html +8 -8
- data/doc/rdoc/classes/Mongrel/Camping.src/M000041.html +22 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +31 -12
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000042.html +20 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000043.html +58 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +75 -73
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000018.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000019.html +29 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000020.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000021.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000022.html +5 -9
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000023.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000024.html +9 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +24 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +20 -20
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000031.html +7 -45
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000030.html → M000032.html} +0 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000033.html +58 -0
- data/doc/rdoc/classes/Mongrel/Configurator.html +163 -140
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000093.html +14 -8
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000094.html +18 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000095.html +5 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000096.html +8 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000097.html +7 -25
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000098.html +10 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +5 -26
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +25 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000101.html +6 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +26 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +20 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +11 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +6 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +9 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +9 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +5 -23
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +21 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +36 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +8 -9
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +19 -12
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000121.html → M000124.html} +5 -5
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000122.html → M000125.html} +9 -14
- data/doc/rdoc/classes/Mongrel/DirHandler.html +43 -43
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000051.html +8 -25
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000052.html +29 -50
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000053.html +25 -26
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000054.html +52 -5
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000055.html +39 -0
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000056.html +18 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +11 -11
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000123.html → M000126.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000124.html → M000127.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +15 -10
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000066.html +21 -0
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000067.html +21 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +25 -23
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000072.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000071.html → M000073.html} +3 -3
- data/doc/rdoc/classes/Mongrel/{HttpHandlerPlugin.src/M000012.html → HttpHandler.src/M000074.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +22 -21
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000014.html +4 -6
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000015.html +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000016.html +19 -0
- data/doc/rdoc/classes/Mongrel/{HttpHandler.src/M000070.html → HttpHandlerPlugin.src/M000017.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HttpParser.html +44 -42
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000044.html +6 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000045.html +7 -37
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000046.html +7 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000047.html +37 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000048.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000042.html → M000049.html} +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000043.html → M000050.html} +6 -7
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +37 -40
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000133.html +37 -7
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000134.html +28 -7
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000135.html +16 -19
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000136.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000137.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +32 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +95 -85
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +12 -13
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +7 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +13 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +9 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +9 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +9 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +18 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +8 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +7 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +18 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.html +59 -63
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000057.html +12 -19
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000058.html +87 -8
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000059.html +19 -9
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000060.html +8 -49
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000061.html +16 -21
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000062.html +52 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +21 -9
- data/doc/rdoc/classes/Mongrel/{HeaderOut.src → HttpServer.src}/M000064.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +22 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +27 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000034.html +24 -13
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/{M000033.html → M000035.html} +11 -11
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000036.html +26 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +24 -26
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000037.html +10 -8
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000038.html +43 -12
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000039.html +20 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000040.html +25 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000128.html → M000131.html} +8 -8
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000129.html → M000132.html} +13 -13
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +20 -20
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000125.html → M000128.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000126.html → M000129.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000127.html → M000130.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Stats.html +43 -42
- data/doc/rdoc/classes/Mongrel/Stats.src/M000139.html +6 -5
- data/doc/rdoc/classes/Mongrel/Stats.src/M000140.html +10 -5
- data/doc/rdoc/classes/Mongrel/Stats.src/M000141.html +13 -5
- data/doc/rdoc/classes/Mongrel/Stats.src/M000142.html +5 -10
- data/doc/rdoc/classes/Mongrel/Stats.src/M000143.html +5 -7
- data/doc/rdoc/classes/Mongrel/Stats.src/{M000136.html → M000144.html} +5 -6
- data/doc/rdoc/classes/Mongrel/Stats.src/M000145.html +23 -0
- data/doc/rdoc/classes/Mongrel/Stats.src/M000146.html +20 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.html +21 -21
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000068.html +5 -29
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000069.html +11 -7
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000070.html +42 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000071.html +20 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +58 -55
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000087.html +5 -26
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000088.html +5 -38
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000089.html +18 -15
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000090.html +25 -57
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +36 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +83 -0
- data/doc/rdoc/classes/MongrelDbg.html +25 -25
- data/doc/rdoc/classes/MongrelDbg.src/M000007.html +11 -9
- data/doc/rdoc/classes/MongrelDbg.src/M000008.html +7 -8
- data/doc/rdoc/classes/MongrelDbg.src/M000009.html +9 -5
- data/doc/rdoc/classes/MongrelDbg.src/M000010.html +21 -0
- data/doc/rdoc/classes/MongrelDbg.src/M000011.html +18 -0
- data/doc/rdoc/classes/{Sync.html → Mutex.html} +50 -19
- data/doc/rdoc/classes/Mutex.src/M000001.html +24 -0
- data/doc/rdoc/classes/Mutex.src/M000002.html +32 -0
- data/doc/rdoc/classes/RequestLog/Access.html +5 -5
- data/doc/rdoc/classes/RequestLog/Access.src/{M000144.html → M000147.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Files.html +5 -5
- data/doc/rdoc/classes/RequestLog/Files.src/{M000145.html → M000148.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000147.html → M000150.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Params.html +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/{M000148.html → M000151.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.src/{M000146.html → M000149.html} +0 -0
- data/doc/rdoc/classes/TCPServer.html +10 -10
- data/doc/rdoc/classes/TCPServer.src/{M000003.html → M000005.html} +0 -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 +11 -100
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/camping_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/cgi_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/command_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/configurator_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel/debug_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +3 -2
- data/doc/rdoc/files/lib/mongrel/init_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +2 -3
- data/doc/rdoc/files/lib/mongrel/stats_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel_rb.html +5 -3
- data/doc/rdoc/files/lib/mutex_fix_rb.html +108 -0
- data/doc/rdoc/fr_class_index.html +1 -1
- data/doc/rdoc/fr_file_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +151 -148
- data/ext/http11/http11.c +2 -2
- data/lib/mongrel.rb +85 -38
- data/lib/mongrel/camping.rb +17 -4
- data/lib/mongrel/configurator.rb +11 -7
- data/lib/mongrel/handlers.rb +30 -27
- data/lib/mongrel/mime_types.yml +615 -0
- data/lib/mongrel/rails.rb +21 -28
- data/lib/mutex_fix.rb +34 -0
- data/test/test_handlers.rb +16 -4
- data/test/test_http11.rb +8 -0
- data/test/test_request_progress.rb +45 -2
- data/test/test_response.rb +31 -0
- metadata +95 -71
- data/bin/mongrel_rails_service +0 -246
- data/bin/mongrel_rails_svc +0 -307
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000112.html +0 -25
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000113.html +0 -47
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000114.html +0 -34
- data/doc/rdoc/classes/Mongrel/Camping.src/M000039.html +0 -22
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000040.html +0 -18
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000041.html +0 -51
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000016.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000017.html +0 -42
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000029.html +0 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000091.html +0 -27
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000092.html +0 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000049.html +0 -21
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000050.html +0 -43
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000065.html +0 -18
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000013.html +0 -17
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000130.html +0 -47
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000131.html +0 -37
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000132.html +0 -29
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000073.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000074.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000055.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000056.html +0 -91
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000032.html +0 -37
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000035.html +0 -23
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000036.html +0 -54
- data/doc/rdoc/classes/Mongrel/Stats.src/M000137.html +0 -23
- data/doc/rdoc/classes/Mongrel/Stats.src/M000138.html +0 -26
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000066.html +0 -18
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000067.html +0 -24
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000085.html +0 -18
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000086.html +0 -18
- data/doc/rdoc/classes/MongrelDbg.src/M000005.html +0 -24
- data/doc/rdoc/classes/MongrelDbg.src/M000006.html +0 -20
@@ -5,14 +5,20 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>options (Mongrel::Command::Base)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 31</span>
|
14
|
+
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options</span>(<span class="ruby-identifier">opts</span>)
|
15
|
+
32: <span class="ruby-comment cmt"># process the given options array</span>
|
16
|
+
33: <span class="ruby-identifier">opts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">short</span>, <span class="ruby-identifier">long</span>, <span class="ruby-identifier">help</span>, <span class="ruby-identifier">variable</span>, <span class="ruby-identifier">default</span><span class="ruby-operator">|</span>
|
17
|
+
34: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">variable</span>, <span class="ruby-identifier">default</span>)
|
18
|
+
35: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-identifier">short</span>, <span class="ruby-identifier">long</span>, <span class="ruby-identifier">help</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">arg</span><span class="ruby-operator">|</span>
|
19
|
+
36: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-identifier">variable</span>, <span class="ruby-identifier">arg</span>)
|
20
|
+
37: <span class="ruby-keyword kw">end</span>
|
21
|
+
38: <span class="ruby-keyword kw">end</span>
|
22
|
+
39: <span class="ruby-keyword kw">end</span></pre>
|
17
23
|
</body>
|
18
24
|
</html>
|
@@ -5,14 +5,38 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>new (Mongrel::Command::Base)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 43</span>
|
14
|
+
43: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})
|
15
|
+
44: <span class="ruby-identifier">argv</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:argv</span>] <span class="ruby-operator">||</span> []
|
16
|
+
45: <span class="ruby-ivar">@opt</span> = <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span>
|
17
|
+
46: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">banner</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">Command</span><span class="ruby-operator">::</span><span class="ruby-constant">BANNER</span>
|
18
|
+
47: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">true</span>
|
19
|
+
48: <span class="ruby-comment cmt"># this is retarded, but it has to be done this way because -h and -v exit</span>
|
20
|
+
49: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">false</span>
|
21
|
+
50: <span class="ruby-ivar">@original_args</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">dup</span>
|
22
|
+
51:
|
23
|
+
52: <span class="ruby-identifier">configure</span>
|
24
|
+
53:
|
25
|
+
54: <span class="ruby-comment cmt"># I need to add my own -h definition to prevent the -h by default from exiting.</span>
|
26
|
+
55: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">"-h"</span>, <span class="ruby-value str">"--help"</span>, <span class="ruby-value str">"Show this message"</span>) <span class="ruby-keyword kw">do</span>
|
27
|
+
56: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
28
|
+
57: <span class="ruby-identifier">puts</span> <span class="ruby-ivar">@opt</span>
|
29
|
+
58: <span class="ruby-keyword kw">end</span>
|
30
|
+
59:
|
31
|
+
60: <span class="ruby-comment cmt"># I need to add my own -v definition to prevent the -v from exiting by default as well.</span>
|
32
|
+
61: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">"--version"</span>, <span class="ruby-value str">"Show version"</span>) <span class="ruby-keyword kw">do</span>
|
33
|
+
62: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
34
|
+
63: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VERSION</span>
|
35
|
+
64: <span class="ruby-identifier">puts</span> <span class="ruby-node">"Version #{Mongrel::Const::MONGREL_VERSION}"</span>
|
36
|
+
65: <span class="ruby-keyword kw">end</span>
|
37
|
+
66: <span class="ruby-keyword kw">end</span>
|
38
|
+
67:
|
39
|
+
68: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">parse!</span> <span class="ruby-identifier">argv</span>
|
40
|
+
69: <span class="ruby-keyword kw">end</span></pre>
|
17
41
|
</body>
|
18
42
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>configure (Mongrel::Command::Base)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 71</span>
|
14
|
+
71: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span>
|
15
|
+
72: <span class="ruby-identifier">options</span> []
|
16
|
+
73: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>validate (Mongrel::Command::Base)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 76</span>
|
14
|
+
76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>
|
15
|
+
77: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@valid</span>
|
16
|
+
78: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,18 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>help (Mongrel::Command::Base)</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
|
-
96: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
18
|
-
97: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
19
|
-
98: <span class="ruby-keyword kw">end</span>
|
20
|
-
99: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 81</span>
|
14
|
+
81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">help</span>
|
15
|
+
82: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">help</span>
|
16
|
+
83: <span class="ruby-keyword kw">end</span></pre>
|
21
17
|
</body>
|
22
18
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>run (Mongrel::Command::Base)</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>
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 87</span>
|
14
|
+
87: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
|
15
|
+
88: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
|
16
|
+
89: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,14 +5,18 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>valid? (Mongrel::Command::Base)</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>
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 93</span>
|
14
|
+
93: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>(<span class="ruby-identifier">exp</span>, <span class="ruby-identifier">message</span>)
|
15
|
+
94: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">not</span> <span class="ruby-ivar">@done_validating</span> <span class="ruby-keyword kw">and</span> (<span class="ruby-keyword kw">not</span> <span class="ruby-identifier">exp</span>)
|
16
|
+
95: <span class="ruby-identifier">failure</span> <span class="ruby-identifier">message</span>
|
17
|
+
96: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
18
|
+
97: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
19
|
+
98: <span class="ruby-keyword kw">end</span>
|
20
|
+
99: <span class="ruby-keyword kw">end</span></pre>
|
17
21
|
</body>
|
18
22
|
</html>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>valid_exists? (Mongrel::Command::Base)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 102</span>
|
14
|
+
102: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_exists?</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">message</span>)
|
15
|
+
103: <span class="ruby-identifier">valid?</span>(<span class="ruby-identifier">file</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">file</span>), <span class="ruby-identifier">message</span>)
|
16
|
+
104: <span class="ruby-keyword kw">end</span></pre>
|
17
17
|
</body>
|
18
18
|
</html>
|
@@ -5,20 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>valid_file? (Mongrel::Command::Base)</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
|
-
120: <span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getpwnam</span>(<span class="ruby-identifier">user</span>)
|
18
|
-
121: <span class="ruby-keyword kw">rescue</span>
|
19
|
-
122: <span class="ruby-identifier">failure</span> <span class="ruby-node">"User does not exist: #{user}"</span>
|
20
|
-
123: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
21
|
-
124: <span class="ruby-keyword kw">end</span>
|
22
|
-
125: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 108</span>
|
14
|
+
108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_file?</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">message</span>)
|
15
|
+
109: <span class="ruby-identifier">valid?</span>(<span class="ruby-identifier">file</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>), <span class="ruby-identifier">message</span>)
|
16
|
+
110: <span class="ruby-keyword kw">end</span></pre>
|
23
17
|
</body>
|
24
18
|
</html>
|
@@ -5,20 +5,14 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>valid_dir? (Mongrel::Command::Base)</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
|
-
130: <span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getgrnam</span>(<span class="ruby-identifier">group</span>)
|
18
|
-
131: <span class="ruby-keyword kw">rescue</span>
|
19
|
-
132: <span class="ruby-identifier">failure</span> <span class="ruby-node">"Group does not exist: #{group}"</span>
|
20
|
-
133: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
21
|
-
134: <span class="ruby-keyword kw">end</span>
|
22
|
-
135: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 113</span>
|
14
|
+
113: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_dir?</span>(<span class="ruby-identifier">file</span>, <span class="ruby-identifier">message</span>)
|
15
|
+
114: <span class="ruby-identifier">valid?</span>(<span class="ruby-identifier">file</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">file</span>), <span class="ruby-identifier">message</span>)
|
16
|
+
115: <span class="ruby-keyword kw">end</span></pre>
|
23
17
|
</body>
|
24
18
|
</html>
|
@@ -5,14 +5,20 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>valid_user? (Mongrel::Command::Base)</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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 117</span>
|
14
|
+
117: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_user?</span>(<span class="ruby-identifier">user</span>)
|
15
|
+
118: <span class="ruby-identifier">valid?</span>(<span class="ruby-ivar">@group</span>, <span class="ruby-value str">"You must also specify a group."</span>)
|
16
|
+
119: <span class="ruby-keyword kw">begin</span>
|
17
|
+
120: <span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getpwnam</span>(<span class="ruby-identifier">user</span>)
|
18
|
+
121: <span class="ruby-keyword kw">rescue</span>
|
19
|
+
122: <span class="ruby-identifier">failure</span> <span class="ruby-node">"User does not exist: #{user}"</span>
|
20
|
+
123: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
21
|
+
124: <span class="ruby-keyword kw">end</span>
|
22
|
+
125: <span class="ruby-keyword kw">end</span></pre>
|
17
23
|
</body>
|
18
24
|
</html>
|
@@ -0,0 +1,24 @@
|
|
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>valid_group? (Mongrel::Command::Base)</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 127</span>
|
14
|
+
127: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_group?</span>(<span class="ruby-identifier">group</span>)
|
15
|
+
128: <span class="ruby-identifier">valid?</span>(<span class="ruby-ivar">@user</span>, <span class="ruby-value str">"You must also specify a user."</span>)
|
16
|
+
129: <span class="ruby-keyword kw">begin</span>
|
17
|
+
130: <span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getgrnam</span>(<span class="ruby-identifier">group</span>)
|
18
|
+
131: <span class="ruby-keyword kw">rescue</span>
|
19
|
+
132: <span class="ruby-identifier">failure</span> <span class="ruby-node">"Group does not exist: #{group}"</span>
|
20
|
+
133: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
21
|
+
134: <span class="ruby-keyword kw">end</span>
|
22
|
+
135: <span class="ruby-keyword kw">end</span></pre>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,18 @@
|
|
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>failure (Mongrel::Command::Base)</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 138</span>
|
14
|
+
138: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failure</span>(<span class="ruby-identifier">message</span>)
|
15
|
+
139: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"!!! #{message}"</span>
|
16
|
+
140: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -80,8 +80,8 @@
|
|
80
80
|
|
81
81
|
<div id="description">
|
82
82
|
<p>
|
83
|
-
A Singleton class that manages all of the available
|
84
|
-
running them.
|
83
|
+
A Singleton class that manages all of the available <a
|
84
|
+
href="Registry.html#M000031">commands</a> and handles running them.
|
85
85
|
</p>
|
86
86
|
|
87
87
|
</div>
|
@@ -93,9 +93,9 @@ running them.
|
|
93
93
|
<h3 class="section-bar">Methods</h3>
|
94
94
|
|
95
95
|
<div class="name-list">
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
96
|
+
<a href="#M000031">commands</a>
|
97
|
+
<a href="#M000032">print_command_list</a>
|
98
|
+
<a href="#M000033">run</a>
|
99
99
|
</div>
|
100
100
|
</div>
|
101
101
|
|
@@ -124,47 +124,47 @@ running them.
|
|
124
124
|
<div id="methods">
|
125
125
|
<h3 class="section-bar">Public Instance methods</h3>
|
126
126
|
|
127
|
-
<div id="method-
|
128
|
-
<a name="
|
127
|
+
<div id="method-M000031" class="method-detail">
|
128
|
+
<a name="M000031"></a>
|
129
129
|
|
130
130
|
<div class="method-heading">
|
131
|
-
<a href="Registry.src/
|
132
|
-
onclick="popupCode('Registry.src/
|
131
|
+
<a href="Registry.src/M000031.html" target="Code" class="method-signature"
|
132
|
+
onclick="popupCode('Registry.src/M000031.html');return false;">
|
133
133
|
<span class="method-name">commands</span><span class="method-args">()</span>
|
134
134
|
</a>
|
135
135
|
</div>
|
136
136
|
|
137
137
|
<div class="method-description">
|
138
138
|
<p>
|
139
|
-
Builds a list of possible commands from
|
140
|
-
href="../Command.html">Command</a> derivates list
|
139
|
+
Builds a list of possible <a href="Registry.html#M000031">commands</a> from
|
140
|
+
the <a href="../Command.html">Command</a> derivates list
|
141
141
|
</p>
|
142
142
|
</div>
|
143
143
|
</div>
|
144
144
|
|
145
|
-
<div id="method-
|
146
|
-
<a name="
|
145
|
+
<div id="method-M000032" class="method-detail">
|
146
|
+
<a name="M000032"></a>
|
147
147
|
|
148
148
|
<div class="method-heading">
|
149
|
-
<a href="Registry.src/
|
150
|
-
onclick="popupCode('Registry.src/
|
149
|
+
<a href="Registry.src/M000032.html" target="Code" class="method-signature"
|
150
|
+
onclick="popupCode('Registry.src/M000032.html');return false;">
|
151
151
|
<span class="method-name">print_command_list</span><span class="method-args">()</span>
|
152
152
|
</a>
|
153
153
|
</div>
|
154
154
|
|
155
155
|
<div class="method-description">
|
156
156
|
<p>
|
157
|
-
Prints a list of available commands
|
157
|
+
Prints a list of available <a href="Registry.html#M000031">commands</a>.
|
158
158
|
</p>
|
159
159
|
</div>
|
160
160
|
</div>
|
161
161
|
|
162
|
-
<div id="method-
|
163
|
-
<a name="
|
162
|
+
<div id="method-M000033" class="method-detail">
|
163
|
+
<a name="M000033"></a>
|
164
164
|
|
165
165
|
<div class="method-heading">
|
166
|
-
<a href="Registry.src/
|
167
|
-
onclick="popupCode('Registry.src/
|
166
|
+
<a href="Registry.src/M000033.html" target="Code" class="method-signature"
|
167
|
+
onclick="popupCode('Registry.src/M000033.html');return false;">
|
168
168
|
<span class="method-name">run</span><span class="method-args">(args)</span>
|
169
169
|
</a>
|
170
170
|
</div>
|
@@ -5,54 +5,16 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>commands (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
|
-
|
19
|
-
179: <span class="ruby-identifier">print_command_list</span>
|
20
|
-
180: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
21
|
-
181: <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
|
-
182: <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
|
-
183: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
24
|
-
184: <span class="ruby-keyword kw">end</span>
|
25
|
-
185:
|
26
|
-
186: <span class="ruby-keyword kw">begin</span>
|
27
|
-
187: <span class="ruby-comment cmt"># quick hack so that existing commands will keep working but the Mongrel:: ones can be moved</span>
|
28
|
-
188: <span class="ruby-keyword kw">if</span> [<span class="ruby-value str">"start"</span>, <span class="ruby-value str">"stop"</span>, <span class="ruby-value str">"restart"</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">cmd_name</span>
|
29
|
-
189: <span class="ruby-identifier">cmd_name</span> = <span class="ruby-value str">"mongrel::"</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">cmd_name</span>
|
30
|
-
190: <span class="ruby-keyword kw">end</span>
|
31
|
-
191:
|
32
|
-
192: <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>)
|
33
|
-
193: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidOption</span>
|
34
|
-
194: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"#$! for command '#{cmd_name}'"</span>
|
35
|
-
195: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"Try #{cmd_name} -h to get help."</span>
|
36
|
-
196: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
37
|
-
197: <span class="ruby-keyword kw">rescue</span>
|
38
|
-
198: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"ERROR RUNNING '#{cmd_name}': #$!"</span>
|
39
|
-
199: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">"Use help command to get help"</span>
|
40
|
-
200: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
41
|
-
201: <span class="ruby-keyword kw">end</span>
|
42
|
-
202:
|
43
|
-
203: <span class="ruby-comment cmt"># Normally the command is NOT valid right after being created</span>
|
44
|
-
204: <span class="ruby-comment cmt"># but sometimes (like with -h or -v) there's no further processing</span>
|
45
|
-
205: <span class="ruby-comment cmt"># needed so the command is already valid so we can skip it.</span>
|
46
|
-
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>
|
47
|
-
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>
|
48
|
-
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>
|
49
|
-
209: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
50
|
-
210: <span class="ruby-keyword kw">else</span>
|
51
|
-
211: <span class="ruby-identifier">command</span>.<span class="ruby-identifier">run</span>
|
52
|
-
212: <span class="ruby-keyword kw">end</span>
|
53
|
-
213: <span class="ruby-keyword kw">end</span>
|
54
|
-
214:
|
55
|
-
215: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
56
|
-
216: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 149</span>
|
14
|
+
149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commands</span>
|
15
|
+
150: <span class="ruby-identifier">pmgr</span> = <span class="ruby-constant">GemPlugin</span><span class="ruby-operator">::</span><span class="ruby-constant">Manager</span>.<span class="ruby-identifier">instance</span>
|
16
|
+
151: <span class="ruby-identifier">list</span> = <span class="ruby-identifier">pmgr</span>.<span class="ruby-identifier">plugins</span>[<span class="ruby-value str">"/commands"</span>].<span class="ruby-identifier">keys</span>
|
17
|
+
152: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">sort</span>
|
18
|
+
153: <span class="ruby-keyword kw">end</span></pre>
|
57
19
|
</body>
|
58
20
|
</html>
|