mongrel 0.3.13.1 → 0.3.13.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -1
- data/doc/rdoc/classes/Mongrel.html +3 -2
- data/doc/rdoc/classes/Mongrel/CGIWrapper.html +49 -49
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000101.html +11 -14
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000102.html +34 -12
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000103.html +21 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000104.html +14 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000105.html +12 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000106.html +5 -6
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000107.html +18 -0
- data/doc/rdoc/classes/Mongrel/{URIClassifier.src/M000090.html → CGIWrapper.src/M000108.html} +5 -5
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000109.html +19 -0
- data/doc/rdoc/classes/Mongrel/Camping.html +5 -5
- data/doc/rdoc/classes/Mongrel/Camping.src/{M000047.html → M000048.html} +0 -0
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000049.html +5 -38
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000050.html +51 -0
- data/doc/rdoc/classes/Mongrel/Command/Base.html +65 -65
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000026.html +11 -29
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000027.html +29 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000028.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000029.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000031.html +5 -9
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000032.html +9 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000033.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000034.html +5 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000035.html +5 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000036.html +11 -11
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000037.html +11 -5
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000038.html +18 -0
- data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000039.html +7 -12
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000040.html +12 -37
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000041.html +50 -0
- data/doc/rdoc/classes/Mongrel/Configurator.html +120 -114
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +14 -7
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +18 -10
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +7 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +7 -21
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +10 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +5 -17
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000116.html +25 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000117.html +6 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000118.html +17 -11
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000119.html +20 -6
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000120.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000121.html +11 -9
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000122.html +6 -12
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000123.html +5 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000124.html +9 -22
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000125.html +12 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000126.html +5 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000127.html +22 -5
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000128.html +18 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000129.html +33 -0
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000130.html +18 -0
- data/doc/rdoc/classes/Mongrel/Const.html +1 -1
- data/doc/rdoc/classes/Mongrel/DeflateFilter.html +10 -10
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000096.html → M000099.html} +5 -5
- data/doc/rdoc/classes/Mongrel/DeflateFilter.src/{M000097.html → M000100.html} +14 -14
- data/doc/rdoc/classes/Mongrel/DirHandler.html +31 -31
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000058.html +8 -30
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000059.html +30 -29
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000060.html +29 -50
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000061.html +50 -26
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000062.html +26 -5
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000063.html +18 -0
- data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000128.html → M000131.html} +4 -4
- data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000129.html → M000132.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000070.html → M000072.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000071.html → M000073.html} +4 -4
- data/doc/rdoc/classes/Mongrel/HttpHandler.html +31 -10
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000076.html → M000078.html} +0 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/M000079.html +17 -0
- data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000077.html → M000080.html} +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.html +25 -10
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000022.html +3 -3
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000023.html +4 -6
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000024.html +6 -4
- data/doc/rdoc/classes/Mongrel/HttpHandlerPlugin.src/M000025.html +17 -0
- data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000051.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000052.html +7 -7
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000053.html +7 -37
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +37 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000055.html +5 -5
- data/doc/rdoc/classes/Mongrel/HttpParser.src/M000056.html +5 -6
- data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000050.html → M000057.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.html +30 -21
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000138.html +43 -19
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000136.html → M000139.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000137.html → M000140.html} +6 -6
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000141.html +32 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.html +61 -61
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +12 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +7 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +12 -9
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000084.html +9 -18
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000085.html +9 -8
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000086.html +9 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000087.html +18 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000088.html +8 -7
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000089.html +7 -5
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000090.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000091.html +20 -0
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000092.html +18 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.html +63 -41
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +12 -76
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +74 -13
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +18 -50
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +8 -21
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +38 -5
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +21 -9
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +18 -0
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +22 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.html +15 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000042.html +26 -12
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000043.html +12 -13
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000044.html +26 -0
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.html +15 -15
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000045.html +9 -38
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000046.html +38 -10
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000047.html +23 -0
- data/doc/rdoc/classes/Mongrel/RedirectHandler.html +10 -10
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000133.html → M000136.html} +8 -8
- data/doc/rdoc/classes/Mongrel/RedirectHandler.src/{M000134.html → M000137.html} +13 -13
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.html +16 -16
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000130.html → M000133.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000131.html → M000134.html} +10 -10
- data/doc/rdoc/classes/Mongrel/StatisticsFilter.src/{M000132.html → M000135.html} +4 -4
- data/doc/rdoc/classes/Mongrel/StatusHandler.html +20 -20
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000074.html +5 -29
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000075.html +11 -7
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000076.html +42 -0
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000077.html +20 -0
- data/doc/rdoc/classes/Mongrel/TimeoutError.html +117 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.html +30 -30
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000093.html +5 -38
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000094.html +5 -23
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000095.html +16 -60
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000096.html +51 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000097.html +36 -0
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000098.html +83 -0
- data/doc/rdoc/classes/RequestLog/Access.html +5 -5
- data/doc/rdoc/classes/RequestLog/Access.src/{M000139.html → M000142.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Files.html +5 -5
- data/doc/rdoc/classes/RequestLog/Files.src/{M000140.html → M000143.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Objects.html +5 -5
- data/doc/rdoc/classes/RequestLog/Objects.src/{M000142.html → M000145.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Params.html +5 -5
- data/doc/rdoc/classes/RequestLog/Params.src/{M000143.html → M000146.html} +0 -0
- data/doc/rdoc/classes/RequestLog/Threads.html +5 -5
- data/doc/rdoc/classes/RequestLog/Threads.src/{M000141.html → M000144.html} +0 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
- data/doc/rdoc/files/lib/mongrel/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/debug_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/handlers_rb.html +1 -1
- data/doc/rdoc/files/lib/mongrel/init_rb.html +2 -2
- data/doc/rdoc/files/lib/mongrel/rails_rb.html +2 -2
- 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 +2 -2
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_method_index.html +125 -122
- data/ext/http11/http11.c +2 -2
- data/ext/http11/http11_parser.c +1 -1
- data/ext/http11/http11_parser.h +1 -1
- data/lib/mongrel.rb +70 -53
- data/lib/mongrel/camping.rb +1 -1
- data/lib/mongrel/cgi.rb +1 -1
- data/lib/mongrel/command.rb +1 -1
- data/lib/mongrel/debug.rb +1 -1
- data/lib/mongrel/handlers.rb +10 -1
- data/lib/mongrel/init.rb +1 -1
- data/lib/mongrel/rails.rb +1 -1
- data/lib/mongrel/stats.rb +1 -1
- data/lib/mongrel/tcphack.rb +1 -1
- data/test/test_command.rb +1 -1
- data/test/test_conditional.rb +1 -1
- data/test/test_configurator.rb +1 -1
- data/test/test_debug.rb +1 -1
- data/test/test_handlers.rb +1 -1
- data/test/test_http11.rb +1 -1
- data/test/test_response.rb +1 -1
- data/test/test_stats.rb +1 -1
- data/test/test_uriclassifier.rb +1 -1
- data/test/test_ws.rb +1 -1
- data/tools/trickletest.rb +28 -20
- metadata +50 -46
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000098.html +0 -24
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000099.html +0 -47
- data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000100.html +0 -34
- data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000048.html +0 -18
- data/doc/rdoc/classes/Mongrel/Command/Base.src/M000025.html +0 -24
- data/doc/rdoc/classes/Mongrel/Command/Registry.src/M000038.html +0 -20
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +0 -29
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +0 -31
- data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +0 -20
- data/doc/rdoc/classes/Mongrel/DirHandler.src/M000057.html +0 -21
- data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000135.html +0 -52
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +0 -20
- data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +0 -25
- data/doc/rdoc/classes/Mongrel/HttpServer.src/M000063.html +0 -25
- data/doc/rdoc/classes/Mongrel/Rails/RailsConfigurator.src/M000041.html +0 -39
- data/doc/rdoc/classes/Mongrel/Rails/RailsHandler.src/M000044.html +0 -22
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000072.html +0 -18
- data/doc/rdoc/classes/Mongrel/StatusHandler.src/M000073.html +0 -24
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000091.html +0 -18
- data/doc/rdoc/classes/Mongrel/URIClassifier.src/M000092.html +0 -39
@@ -5,38 +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
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
64: <span class="ruby-identifier">configure</span>
|
24
|
-
65:
|
25
|
-
66: <span class="ruby-comment cmt"># I need to add my own -h definition to prevent the -h by default from exiting.</span>
|
26
|
-
67: <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
|
-
68: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
28
|
-
69: <span class="ruby-identifier">puts</span> <span class="ruby-ivar">@opt</span>
|
29
|
-
70: <span class="ruby-keyword kw">end</span>
|
30
|
-
71:
|
31
|
-
72: <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
|
-
73: <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
|
-
74: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
34
|
-
75: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VERSION</span>
|
35
|
-
76: <span class="ruby-identifier">puts</span> <span class="ruby-node">"Version #{Mongrel::Const::MONGREL_VERSION}"</span>
|
36
|
-
77: <span class="ruby-keyword kw">end</span>
|
37
|
-
78: <span class="ruby-keyword kw">end</span>
|
38
|
-
79:
|
39
|
-
80: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">parse!</span> <span class="ruby-identifier">argv</span>
|
40
|
-
81: <span class="ruby-keyword kw">end</span></pre>
|
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">options</span>(<span class="ruby-identifier">opts</span>)
|
15
|
+
44: <span class="ruby-comment cmt"># process the given options array</span>
|
16
|
+
45: <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
|
+
46: <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
|
+
47: <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
|
+
48: <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
|
+
49: <span class="ruby-keyword kw">end</span>
|
21
|
+
50: <span class="ruby-keyword kw">end</span>
|
22
|
+
51: <span class="ruby-keyword kw">end</span></pre>
|
41
23
|
</body>
|
42
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 55</span>
|
14
|
+
55: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})
|
15
|
+
56: <span class="ruby-identifier">argv</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:argv</span>] <span class="ruby-operator">||</span> []
|
16
|
+
57: <span class="ruby-ivar">@opt</span> = <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span>
|
17
|
+
58: <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
|
+
59: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">true</span>
|
19
|
+
60: <span class="ruby-comment cmt"># this is retarded, but it has to be done this way because -h and -v exit</span>
|
20
|
+
61: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">false</span>
|
21
|
+
62: <span class="ruby-ivar">@original_args</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">dup</span>
|
22
|
+
63:
|
23
|
+
64: <span class="ruby-identifier">configure</span>
|
24
|
+
65:
|
25
|
+
66: <span class="ruby-comment cmt"># I need to add my own -h definition to prevent the -h by default from exiting.</span>
|
26
|
+
67: <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
|
+
68: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
28
|
+
69: <span class="ruby-identifier">puts</span> <span class="ruby-ivar">@opt</span>
|
29
|
+
70: <span class="ruby-keyword kw">end</span>
|
30
|
+
71:
|
31
|
+
72: <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
|
+
73: <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
|
+
74: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
34
|
+
75: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VERSION</span>
|
35
|
+
76: <span class="ruby-identifier">puts</span> <span class="ruby-node">"Version #{Mongrel::Const::MONGREL_VERSION}"</span>
|
36
|
+
77: <span class="ruby-keyword kw">end</span>
|
37
|
+
78: <span class="ruby-keyword kw">end</span>
|
38
|
+
79:
|
39
|
+
80: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">parse!</span> <span class="ruby-identifier">argv</span>
|
40
|
+
81: <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 83</span>
|
14
|
+
83: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">configure</span>
|
15
|
+
84: <span class="ruby-identifier">options</span> []
|
16
|
+
85: <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 88</span>
|
14
|
+
88: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>
|
15
|
+
89: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@valid</span>
|
16
|
+
90: <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>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>
|
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">help</span>
|
15
|
+
94: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">help</span>
|
16
|
+
95: <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>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> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
108: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
18
|
-
109: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
19
|
-
110: <span class="ruby-keyword kw">end</span>
|
20
|
-
111: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 99</span>
|
14
|
+
99: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>
|
15
|
+
100: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>
|
16
|
+
101: <span class="ruby-keyword kw">end</span></pre>
|
21
17
|
</body>
|
22
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> <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 105</span>
|
14
|
+
105: <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
|
+
106: <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
|
+
107: <span class="ruby-identifier">failure</span> <span class="ruby-identifier">message</span>
|
17
|
+
108: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
18
|
+
109: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
|
19
|
+
110: <span class="ruby-keyword kw">end</span>
|
20
|
+
111: <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 114</span>
|
14
|
+
114: <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
|
+
115: <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
|
+
116: <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>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
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 120</span>
|
14
|
+
120: <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
|
+
121: <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
|
+
122: <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_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
|
-
132: <span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getpwnam</span>(<span class="ruby-identifier">user</span>)
|
18
|
-
133: <span class="ruby-keyword kw">rescue</span>
|
19
|
-
134: <span class="ruby-identifier">failure</span> <span class="ruby-node">"User does not exist: #{user}"</span>
|
20
|
-
135: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
21
|
-
136: <span class="ruby-keyword kw">end</span>
|
22
|
-
137: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 125</span>
|
14
|
+
125: <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
|
+
126: <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
|
+
127: <span class="ruby-keyword kw">end</span></pre>
|
23
17
|
</body>
|
24
18
|
</html>
|
@@ -5,20 +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
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 129</span>
|
14
|
+
129: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_user?</span>(<span class="ruby-identifier">user</span>)
|
15
|
+
130: <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
|
+
131: <span class="ruby-keyword kw">begin</span>
|
17
|
+
132: <span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getpwnam</span>(<span class="ruby-identifier">user</span>)
|
18
|
+
133: <span class="ruby-keyword kw">rescue</span>
|
19
|
+
134: <span class="ruby-identifier">failure</span> <span class="ruby-node">"User does not exist: #{user}"</span>
|
20
|
+
135: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
21
|
+
136: <span class="ruby-keyword kw">end</span>
|
22
|
+
137: <span class="ruby-keyword kw">end</span></pre>
|
23
23
|
</body>
|
24
24
|
</html>
|
@@ -5,14 +5,20 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>valid_group? (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 139</span>
|
14
|
+
139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid_group?</span>(<span class="ruby-identifier">group</span>)
|
15
|
+
140: <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
|
+
141: <span class="ruby-keyword kw">begin</span>
|
17
|
+
142: <span class="ruby-constant">Etc</span>.<span class="ruby-identifier">getgrnam</span>(<span class="ruby-identifier">group</span>)
|
18
|
+
143: <span class="ruby-keyword kw">rescue</span>
|
19
|
+
144: <span class="ruby-identifier">failure</span> <span class="ruby-node">"Group does not exist: #{group}"</span>
|
20
|
+
145: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">false</span>
|
21
|
+
146: <span class="ruby-keyword kw">end</span>
|
22
|
+
147: <span class="ruby-keyword kw">end</span></pre>
|
17
23
|
</body>
|
18
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 150</span>
|
14
|
+
150: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">failure</span>(<span class="ruby-identifier">message</span>)
|
15
|
+
151: <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">"!!! #{message}"</span>
|
16
|
+
152: <span class="ruby-keyword kw">end</span></pre>
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -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="#M000039">commands</a>
|
97
|
+
<a href="#M000040">print_command_list</a>
|
98
|
+
<a href="#M000041">run</a>
|
99
99
|
</div>
|
100
100
|
</div>
|
101
101
|
|
@@ -124,12 +124,12 @@ 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-M000039" class="method-detail">
|
128
|
+
<a name="M000039"></a>
|
129
129
|
|
130
130
|
<div class="method-heading">
|
131
|
-
<a href="Registry.src/
|
132
|
-
onclick="popupCode('Registry.src/
|
131
|
+
<a href="Registry.src/M000039.html" target="Code" class="method-signature"
|
132
|
+
onclick="popupCode('Registry.src/M000039.html');return false;">
|
133
133
|
<span class="method-name">commands</span><span class="method-args">()</span>
|
134
134
|
</a>
|
135
135
|
</div>
|
@@ -142,12 +142,12 @@ href="../Command.html">Command</a> derivates list
|
|
142
142
|
</div>
|
143
143
|
</div>
|
144
144
|
|
145
|
-
<div id="method-
|
146
|
-
<a name="
|
145
|
+
<div id="method-M000040" class="method-detail">
|
146
|
+
<a name="M000040"></a>
|
147
147
|
|
148
148
|
<div class="method-heading">
|
149
|
-
<a href="Registry.src/
|
150
|
-
onclick="popupCode('Registry.src/
|
149
|
+
<a href="Registry.src/M000040.html" target="Code" class="method-signature"
|
150
|
+
onclick="popupCode('Registry.src/M000040.html');return false;">
|
151
151
|
<span class="method-name">print_command_list</span><span class="method-args">()</span>
|
152
152
|
</a>
|
153
153
|
</div>
|
@@ -159,12 +159,12 @@ Prints a list of available commands.
|
|
159
159
|
</div>
|
160
160
|
</div>
|
161
161
|
|
162
|
-
<div id="method-
|
163
|
-
<a name="
|
162
|
+
<div id="method-M000041" class="method-detail">
|
163
|
+
<a name="M000041"></a>
|
164
164
|
|
165
165
|
<div class="method-heading">
|
166
|
-
<a href="Registry.src/
|
167
|
-
onclick="popupCode('Registry.src/
|
166
|
+
<a href="Registry.src/M000041.html" target="Code" class="method-signature"
|
167
|
+
onclick="popupCode('Registry.src/M000041.html');return false;">
|
168
168
|
<span class="method-name">run</span><span class="method-args">(args)</span>
|
169
169
|
</a>
|
170
170
|
</div>
|
@@ -5,21 +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
|
-
173: <span class="ruby-keyword kw">end</span>
|
20
|
-
174:
|
21
|
-
175: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEach command takes -h as an option to get help."</span>
|
22
|
-
176:
|
23
|
-
177: <span class="ruby-keyword kw">end</span></pre>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 161</span>
|
14
|
+
161: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">commands</span>
|
15
|
+
162: <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
|
+
163: <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
|
+
164: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">list</span>.<span class="ruby-identifier">sort</span>
|
18
|
+
165: <span class="ruby-keyword kw">end</span></pre>
|
24
19
|
</body>
|
25
20
|
</html>
|
@@ -5,46 +5,21 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>print_command_list (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
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
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>
|
13
|
+
<pre> <span class="ruby-comment cmt"># File lib/mongrel/command.rb, line 168</span>
|
14
|
+
168: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">print_command_list</span>
|
15
|
+
169: <span class="ruby-identifier">puts</span> <span class="ruby-node">"#{Mongrel::Command::BANNER}\nAvailable commands are:\n\n"</span>
|
16
|
+
170:
|
17
|
+
171: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">commands</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
18
|
+
172: <span class="ruby-identifier">puts</span> <span class="ruby-node">" - #{name[1 .. -1]}\n"</span>
|
19
|
+
173: <span class="ruby-keyword kw">end</span>
|
20
|
+
174:
|
21
|
+
175: <span class="ruby-identifier">puts</span> <span class="ruby-value str">"\nEach command takes -h as an option to get help."</span>
|
22
|
+
176:
|
23
|
+
177: <span class="ruby-keyword kw">end</span></pre>
|
49
24
|
</body>
|
50
25
|
</html>
|