mongrel 1.0.1 → 1.0.2

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