mongrel 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. data/Rakefile +38 -15
  2. data/bin/mongrel_rails +13 -11
  3. data/doc/rdoc/classes/Mongrel.html +6 -1
  4. data/doc/rdoc/classes/Mongrel/CGIWrapper.html +49 -49
  5. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000057.html +11 -5
  6. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000058.html +34 -5
  7. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000059.html +21 -6
  8. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000054.html → M000060.html} +0 -0
  9. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000055.html → M000061.html} +0 -0
  10. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/{M000056.html → M000062.html} +0 -0
  11. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000063.html +18 -0
  12. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000064.html +18 -0
  13. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000065.html +19 -0
  14. data/doc/rdoc/classes/Mongrel/Camping.html +177 -0
  15. data/doc/rdoc/classes/Mongrel/Camping.src/M000019.html +22 -0
  16. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.html +165 -0
  17. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000020.html +18 -0
  18. data/doc/rdoc/classes/Mongrel/Camping/CampingHandler.src/M000021.html +27 -0
  19. data/doc/rdoc/classes/Mongrel/Command/Base.html +50 -50
  20. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000006.html +11 -5
  21. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000007.html +28 -5
  22. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000008.html +5 -9
  23. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000009.html +5 -5
  24. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000010.html +5 -5
  25. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000011.html +9 -5
  26. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000012.html +5 -5
  27. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000013.html +18 -0
  28. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000014.html +18 -0
  29. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000015.html +18 -0
  30. data/doc/rdoc/classes/Mongrel/Command/Registry.html +15 -15
  31. data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000013.html → M000016.html} +6 -6
  32. data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000014.html → M000017.html} +11 -11
  33. data/doc/rdoc/classes/Mongrel/Command/Registry.src/{M000015.html → M000018.html} +32 -32
  34. data/doc/rdoc/classes/Mongrel/Const.html +3 -3
  35. data/doc/rdoc/classes/Mongrel/DirHandler.html +31 -31
  36. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000023.html → M000029.html} +0 -0
  37. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000024.html → M000030.html} +0 -0
  38. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000025.html → M000031.html} +0 -0
  39. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000026.html → M000032.html} +0 -0
  40. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000027.html → M000033.html} +0 -0
  41. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000028.html → M000034.html} +0 -0
  42. data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
  43. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000060.html → M000066.html} +0 -0
  44. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000061.html → M000067.html} +0 -0
  45. data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
  46. data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000035.html → M000041.html} +4 -4
  47. data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000036.html → M000042.html} +7 -7
  48. data/doc/rdoc/classes/Mongrel/HttpHandler.html +5 -5
  49. data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000037.html → M000043.html} +0 -0
  50. data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
  51. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000022.html +6 -6
  52. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000017.html → M000023.html} +0 -0
  53. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000018.html → M000024.html} +0 -0
  54. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000019.html → M000025.html} +0 -0
  55. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000020.html → M000026.html} +0 -0
  56. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000021.html → M000027.html} +0 -0
  57. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000016.html → M000028.html} +6 -6
  58. data/doc/rdoc/classes/Mongrel/HttpRequest.html +5 -5
  59. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000062.html → M000068.html} +24 -24
  60. data/doc/rdoc/classes/Mongrel/HttpResponse.html +36 -36
  61. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000044.html +8 -7
  62. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000039.html → M000045.html} +6 -6
  63. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000040.html → M000046.html} +5 -5
  64. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000041.html → M000047.html} +5 -5
  65. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000042.html → M000048.html} +6 -6
  66. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000043.html → M000049.html} +6 -6
  67. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000050.html +20 -0
  68. data/doc/rdoc/classes/Mongrel/HttpServer.html +33 -33
  69. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000029.html → M000035.html} +22 -22
  70. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000030.html → M000036.html} +43 -43
  71. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000031.html → M000037.html} +34 -34
  72. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000032.html → M000038.html} +4 -4
  73. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000033.html → M000039.html} +4 -4
  74. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000034.html → M000040.html} +9 -9
  75. data/doc/rdoc/classes/Mongrel/URIClassifier.html +30 -30
  76. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000045.html → M000051.html} +4 -4
  77. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000046.html → M000052.html} +4 -4
  78. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000047.html → M000053.html} +0 -0
  79. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000048.html → M000054.html} +0 -0
  80. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000049.html → M000055.html} +0 -0
  81. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000050.html → M000056.html} +0 -0
  82. data/doc/rdoc/classes/RailsHandler.html +30 -10
  83. data/doc/rdoc/classes/RailsHandler.src/{M000001.html → M000003.html} +8 -8
  84. data/doc/rdoc/classes/RailsHandler.src/{M000002.html → M000004.html} +34 -34
  85. data/doc/rdoc/classes/RailsHandler.src/M000005.html +23 -0
  86. data/doc/rdoc/classes/TCPServer.html +173 -0
  87. data/doc/rdoc/classes/TCPServer.src/M000001.html +19 -0
  88. data/doc/rdoc/created.rid +1 -1
  89. data/doc/rdoc/files/lib/mongrel/camping_rb.html +108 -0
  90. data/doc/rdoc/files/lib/mongrel/command_rb.html +3 -2
  91. data/doc/rdoc/files/lib/mongrel/{plugins_rb.html → init_rb.html} +5 -4
  92. data/doc/rdoc/files/lib/mongrel/rails_rb.html +2 -1
  93. data/doc/rdoc/files/lib/mongrel/tcphack_rb.html +109 -0
  94. data/doc/rdoc/files/lib/mongrel_rb.html +2 -2
  95. data/doc/rdoc/fr_class_index.html +3 -0
  96. data/doc/rdoc/fr_file_index.html +3 -1
  97. data/doc/rdoc/fr_method_index.html +68 -62
  98. data/examples/camping/blog.rb +22 -37
  99. data/examples/camping/tepee.rb +3 -23
  100. data/lib/mongrel.rb +3 -4
  101. data/lib/mongrel/camping.rb +64 -0
  102. data/lib/mongrel/command.rb +3 -2
  103. data/lib/mongrel/{plugins.rb → init.rb} +1 -1
  104. data/lib/mongrel/rails.rb +16 -6
  105. data/lib/mongrel/tcphack.rb +12 -0
  106. data/tools/rakehelp.rb +10 -12
  107. metadata +74 -58
  108. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000051.html +0 -24
  109. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000052.html +0 -47
  110. data/doc/rdoc/classes/Mongrel/CGIWrapper.src/M000053.html +0 -34
  111. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000003.html +0 -24
  112. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000004.html +0 -41
  113. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000005.html +0 -18
  114. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000038.html +0 -21
@@ -1,24 +0,0 @@
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>new (Mongrel::CGIWrapper)</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/cgi.rb, line 34</span>
14
- 34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">request</span>, <span class="ruby-identifier">response</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
15
- 35: <span class="ruby-ivar">@request</span> = <span class="ruby-identifier">request</span>
16
- 36: <span class="ruby-ivar">@response</span> = <span class="ruby-identifier">response</span>
17
- 37: <span class="ruby-ivar">@args</span> = <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>
18
- 38: <span class="ruby-ivar">@input</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span>)
19
- 39: <span class="ruby-ivar">@head</span> = {}
20
- 40: <span class="ruby-ivar">@out_called</span> = <span class="ruby-keyword kw">false</span>
21
- 41: <span class="ruby-keyword kw">super</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
22
- 42: <span class="ruby-keyword kw">end</span></pre>
23
- </body>
24
- </html>
@@ -1,47 +0,0 @@
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>header (Mongrel::CGIWrapper)</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/cgi.rb, line 51</span>
14
- 51: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">header</span>(<span class="ruby-identifier">options</span> = <span class="ruby-value str">&quot;text/html&quot;</span>)
15
- 52: <span class="ruby-comment cmt"># if they pass in a string then just write the Content-Type</span>
16
- 53: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">String</span>
17
- 54: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-identifier">options</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Type'</span>]
18
- 55: <span class="ruby-keyword kw">else</span>
19
- 56: <span class="ruby-comment cmt"># convert the given options into what Mongrel wants</span>
20
- 57: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Type'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'type'</span>] <span class="ruby-operator">||</span> <span class="ruby-value str">&quot;text/html&quot;</span>
21
- 58: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Type'</span>] <span class="ruby-operator">+=</span> <span class="ruby-value str">&quot;; charset=&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'charset'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-value str">&quot;charset&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'charset'</span>]
22
- 59:
23
- 60: <span class="ruby-comment cmt"># setup date only if they use nph</span>
24
- 61: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Date'</span>] = <span class="ruby-constant">CGI</span><span class="ruby-operator">::</span><span class="ruby-identifier">rfc1123_date</span>(<span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'nph'</span>]
25
- 62:
26
- 63: <span class="ruby-comment cmt"># setup the server to use the default or what they set</span>
27
- 64: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Server'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'server'</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">env_table</span>[<span class="ruby-value str">'SERVER_SOFTWARE'</span>]
28
- 65:
29
- 66: <span class="ruby-comment cmt"># remaining possible options they can give</span>
30
- 67: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Status'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'status'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'status'</span>]
31
- 68: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Content-Language'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'language'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'language'</span>]
32
- 69: <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'Expires'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'expires'</span>] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'expires'</span>]
33
- 70:
34
- 71: <span class="ruby-comment cmt"># drop the keys we don't want anymore</span>
35
- 72: <span class="ruby-constant">REMOVED_KEYS</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">k</span>) }
36
- 73:
37
- 74: <span class="ruby-comment cmt"># finally just convert the rest raw (which puts 'cookie' directly)</span>
38
- 75: <span class="ruby-comment cmt"># 'cookie' is translated later as we write the header out</span>
39
- 76: <span class="ruby-identifier">options</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-ivar">@head</span>[<span class="ruby-identifier">k</span>] = <span class="ruby-identifier">v</span>}
40
- 77: <span class="ruby-keyword kw">end</span>
41
- 78:
42
- 79: <span class="ruby-comment cmt"># doing this fakes out the cgi library to think the headers are empty</span>
43
- 80: <span class="ruby-comment cmt"># we then do the real headers in the out function call later</span>
44
- 81: <span class="ruby-value str">&quot;&quot;</span>
45
- 82: <span class="ruby-keyword kw">end</span></pre>
46
- </body>
47
- </html>
@@ -1,34 +0,0 @@
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>send_cookies (Mongrel::CGIWrapper)</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/cgi.rb, line 89</span>
14
- 89: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">send_cookies</span>(<span class="ruby-identifier">to</span>)
15
- 90: <span class="ruby-comment cmt"># convert the cookies based on the myriad of possible ways to set a cookie</span>
16
- 91: <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'cookie'</span>]
17
- 92: <span class="ruby-identifier">cookie</span> = <span class="ruby-ivar">@head</span>[<span class="ruby-value str">'cookie'</span>]
18
- 93: <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">cookie</span>
19
- 94: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
20
- 95: <span class="ruby-identifier">cookie</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">to</span>[<span class="ruby-value str">'Set-Cookie'</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">to_s</span> }
21
- 96: <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Hash</span>
22
- 97: <span class="ruby-identifier">cookie</span>.<span class="ruby-identifier">each_value</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">to</span>[<span class="ruby-value str">'Set-Cookie'</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">to_s</span>}
23
- 98: <span class="ruby-keyword kw">else</span>
24
- 99: <span class="ruby-identifier">to</span>[<span class="ruby-value str">'Set-Cookie'</span>] = <span class="ruby-identifier">options</span>[<span class="ruby-value str">'cookie'</span>].<span class="ruby-identifier">to_s</span>
25
- 100: <span class="ruby-keyword kw">end</span>
26
- 101:
27
- 102: <span class="ruby-ivar">@head</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-value str">'cookie'</span>)
28
- 103:
29
- 104: <span class="ruby-comment cmt"># @output_cookies seems to never be used, but we'll process it just in case</span>
30
- 105: <span class="ruby-ivar">@output_cookies</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">to</span>[<span class="ruby-value str">'Set-Cookie'</span>] = <span class="ruby-identifier">c</span>.<span class="ruby-identifier">to_s</span> } <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@output_cookies</span>
31
- 106: <span class="ruby-keyword kw">end</span>
32
- 107: <span class="ruby-keyword kw">end</span></pre>
33
- </body>
34
- </html>
@@ -1,24 +0,0 @@
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>options (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 22</span>
14
- 22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">options</span>(<span class="ruby-identifier">opts</span>)
15
- 23: <span class="ruby-comment cmt"># process the given options array</span>
16
- 24: <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
- 25: <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
- 26: <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
- 27: <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
- 28: <span class="ruby-keyword kw">end</span>
21
- 29: <span class="ruby-keyword kw">end</span>
22
- 30: <span class="ruby-keyword kw">end</span></pre>
23
- </body>
24
- </html>
@@ -1,41 +0,0 @@
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>new (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 34</span>
14
- 34: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">options</span>={})
15
- 35: <span class="ruby-identifier">argv</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:argv</span>] <span class="ruby-operator">||</span> []
16
- 36: <span class="ruby-ivar">@opt</span> = <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span>
17
- 37: <span class="ruby-ivar">@valid</span> = <span class="ruby-keyword kw">true</span>
18
- 38: <span class="ruby-comment cmt"># this is retarded, but it has to be done this way because -h and -v exit</span>
19
- 39: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">false</span>
20
- 40: <span class="ruby-ivar">@original_args</span> = <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">dup</span>
21
- 41:
22
- 42: <span class="ruby-identifier">configure</span>
23
- 43:
24
- 44: <span class="ruby-comment cmt"># I need to add my own -h definition to prevent the -h by default from exiting.</span>
25
- 45: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">&quot;-h&quot;</span>, <span class="ruby-value str">&quot;--help&quot;</span>, <span class="ruby-value str">&quot;Show this message&quot;</span>) <span class="ruby-keyword kw">do</span>
26
- 46: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
27
- 47: <span class="ruby-identifier">puts</span> <span class="ruby-ivar">@opt</span>
28
- 48: <span class="ruby-keyword kw">end</span>
29
- 49:
30
- 50: <span class="ruby-comment cmt"># I need to add my own -v definition to prevent the -h from exiting by default as well.</span>
31
- 51: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">&quot;--version&quot;</span>, <span class="ruby-value str">&quot;Show version&quot;</span>) <span class="ruby-keyword kw">do</span>
32
- 52: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
33
- 53: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VERSION</span>
34
- 54: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Version #{VERSION}&quot;</span>
35
- 55: <span class="ruby-keyword kw">end</span>
36
- 56: <span class="ruby-keyword kw">end</span>
37
- 57:
38
- 58: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">parse!</span> <span class="ruby-identifier">argv</span>
39
- 59: <span class="ruby-keyword kw">end</span></pre>
40
- </body>
41
- </html>
@@ -1,18 +0,0 @@
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>validate (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 62</span>
14
- 62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">validate</span>
15
- 63: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@valid</span>
16
- 64: <span class="ruby-keyword kw">end</span></pre>
17
- </body>
18
- </html>
@@ -1,21 +0,0 @@
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>new (Mongrel::HttpResponse)</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.rb, line 259</span>
14
- 259: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">socket</span>)
15
- 260: <span class="ruby-ivar">@socket</span> = <span class="ruby-identifier">socket</span>
16
- 261: <span class="ruby-ivar">@body</span> = <span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>
17
- 262: <span class="ruby-ivar">@status</span> = <span class="ruby-value">404</span>
18
- 263: <span class="ruby-ivar">@header</span> = <span class="ruby-constant">HeaderOut</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">StringIO</span>.<span class="ruby-identifier">new</span>)
19
- 264: <span class="ruby-keyword kw">end</span></pre>
20
- </body>
21
- </html>