mongrel 0.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/README +24 -28
  2. data/Rakefile +11 -4
  3. data/bin/mongrel_rails +82 -25
  4. data/doc/rdoc/classes/FactoryError.html +144 -0
  5. data/doc/rdoc/classes/FactoryError.src/M000001.html +23 -0
  6. data/doc/rdoc/classes/Mongrel.html +5 -5
  7. data/doc/rdoc/classes/Mongrel.src/{M000001.html → M000015.html} +4 -4
  8. data/doc/rdoc/classes/Mongrel/Const.html +2 -2
  9. data/doc/rdoc/classes/Mongrel/DirHandler.html +26 -26
  10. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000009.html → M000023.html} +0 -0
  11. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000010.html → M000024.html} +5 -2
  12. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000011.html → M000025.html} +26 -26
  13. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000012.html → M000026.html} +17 -17
  14. data/doc/rdoc/classes/Mongrel/DirHandler.src/{M000013.html → M000027.html} +24 -24
  15. data/doc/rdoc/classes/Mongrel/Error404Handler.html +10 -10
  16. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000033.html → M000047.html} +0 -0
  17. data/doc/rdoc/classes/Mongrel/Error404Handler.src/{M000034.html → M000048.html} +0 -0
  18. data/doc/rdoc/classes/Mongrel/HeaderOut.html +10 -10
  19. data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000019.html → M000033.html} +0 -0
  20. data/doc/rdoc/classes/Mongrel/HeaderOut.src/{M000020.html → M000034.html} +0 -0
  21. data/doc/rdoc/classes/Mongrel/HttpHandler.html +5 -5
  22. data/doc/rdoc/classes/Mongrel/HttpHandler.src/{M000025.html → M000039.html} +0 -0
  23. data/doc/rdoc/classes/Mongrel/HttpParser.html +35 -35
  24. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000002.html → M000016.html} +0 -0
  25. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000003.html → M000017.html} +0 -0
  26. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000004.html → M000018.html} +0 -0
  27. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000005.html → M000019.html} +0 -0
  28. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000006.html → M000020.html} +0 -0
  29. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000007.html → M000021.html} +0 -0
  30. data/doc/rdoc/classes/Mongrel/HttpParser.src/{M000008.html → M000022.html} +0 -0
  31. data/doc/rdoc/classes/Mongrel/HttpRequest.html +5 -5
  32. data/doc/rdoc/classes/Mongrel/HttpRequest.src/{M000035.html → M000049.html} +0 -0
  33. data/doc/rdoc/classes/Mongrel/HttpResponse.html +36 -36
  34. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000026.html → M000040.html} +0 -0
  35. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000027.html → M000041.html} +1 -1
  36. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000028.html → M000042.html} +0 -0
  37. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000029.html → M000043.html} +1 -1
  38. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000030.html → M000044.html} +0 -0
  39. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000031.html → M000045.html} +0 -0
  40. data/doc/rdoc/classes/Mongrel/HttpResponse.src/{M000032.html → M000046.html} +0 -0
  41. data/doc/rdoc/classes/Mongrel/HttpServer.html +28 -28
  42. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000014.html → M000028.html} +0 -0
  43. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000015.html → M000029.html} +0 -0
  44. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000016.html → M000030.html} +0 -0
  45. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000017.html → M000031.html} +0 -0
  46. data/doc/rdoc/classes/Mongrel/HttpServer.src/{M000018.html → M000032.html} +0 -0
  47. data/doc/rdoc/classes/Mongrel/URIClassifier.html +20 -20
  48. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000021.html → M000035.html} +0 -0
  49. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000022.html → M000036.html} +0 -0
  50. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000023.html → M000037.html} +0 -0
  51. data/doc/rdoc/classes/Mongrel/URIClassifier.src/{M000024.html → M000038.html} +0 -0
  52. data/doc/rdoc/classes/PluginFactory.html +409 -0
  53. data/doc/rdoc/classes/PluginFactory.src/M000002.html +18 -0
  54. data/doc/rdoc/classes/PluginFactory.src/M000003.html +18 -0
  55. data/doc/rdoc/classes/PluginFactory.src/M000004.html +22 -0
  56. data/doc/rdoc/classes/PluginFactory.src/M000005.html +22 -0
  57. data/doc/rdoc/classes/PluginFactory.src/M000006.html +33 -0
  58. data/doc/rdoc/classes/PluginFactory.src/M000007.html +32 -0
  59. data/doc/rdoc/classes/PluginFactory.src/M000008.html +18 -0
  60. data/doc/rdoc/classes/PluginFactory.src/M000009.html +24 -0
  61. data/doc/rdoc/classes/PluginFactory.src/M000010.html +40 -0
  62. data/doc/rdoc/classes/PluginFactory.src/M000011.html +39 -0
  63. data/doc/rdoc/classes/PluginFactory.src/M000012.html +24 -0
  64. data/doc/rdoc/classes/PluginFactory.src/M000013.html +70 -0
  65. data/doc/rdoc/classes/PluginFactory.src/M000014.html +34 -0
  66. data/doc/rdoc/created.rid +1 -1
  67. data/doc/rdoc/files/README.html +29 -37
  68. data/doc/rdoc/files/lib/mongrel_rb.html +1 -1
  69. data/doc/rdoc/files/lib/pluginfactory_rb.html +132 -0
  70. data/doc/rdoc/fr_class_index.html +2 -0
  71. data/doc/rdoc/fr_file_index.html +1 -0
  72. data/doc/rdoc/fr_method_index.html +49 -35
  73. data/examples/simpletest.rb +10 -3
  74. data/lib/mongrel.rb +6 -3
  75. data/lib/mongrel/command.rb +192 -0
  76. data/lib/pluginfactory.rb +384 -0
  77. data/tools/rakehelp.rb +33 -29
  78. metadata +71 -41
@@ -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>log (PluginFactory)</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/pluginfactory.rb, line 111</span>
14
+ 111: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">log</span>(<span class="ruby-identifier">level</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">msg</span>)
15
+ 112: <span class="ruby-ivar">@logger_callback</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">level</span>, <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">join</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@logger_callback</span>
16
+ 113: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </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>included (PluginFactory)</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/pluginfactory.rb, line 117</span>
14
+ 117: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">included</span>( <span class="ruby-identifier">klass</span> )
15
+ 118: <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">extend</span>( <span class="ruby-keyword kw">self</span> )
16
+ 119: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,22 @@
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>extend_object (PluginFactory)</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/pluginfactory.rb, line 124</span>
14
+ 124: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">extend_object</span>( <span class="ruby-identifier">obj</span> )
15
+ 125: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">Class</span> )
16
+ 126: <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">&quot;Cannot extend a #{obj.class.name}&quot;</span>, <span class="ruby-identifier">caller</span>(<span class="ruby-value">1</span>)
17
+ 127: <span class="ruby-keyword kw">end</span>
18
+ 128: <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-identifier">:@derivatives</span>, {} )
19
+ 129: <span class="ruby-keyword kw">super</span>
20
+ 130: <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,22 @@
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>derivatives (PluginFactory)</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/pluginfactory.rb, line 139</span>
14
+ 139: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">derivatives</span>
15
+ 140: <span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
16
+ 141: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">include?</span>( <span class="ruby-value str">&quot;@derivatives&quot;</span> )
17
+ 142: <span class="ruby-keyword kw">break</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_variable_get</span>( <span class="ruby-identifier">:@derivatives</span> )
18
+ 143: <span class="ruby-keyword kw">end</span>
19
+ 144: }
20
+ 145: <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,33 @@
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>factoryType (PluginFactory)</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/pluginfactory.rb, line 149</span>
14
+ 149: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">factoryType</span>
15
+ 150: <span class="ruby-identifier">base</span> = <span class="ruby-keyword kw">nil</span>
16
+ 151: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
17
+ 152: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">instance_variables</span>.<span class="ruby-identifier">include?</span>( <span class="ruby-value str">&quot;@derivatives&quot;</span> )
18
+ 153: <span class="ruby-identifier">base</span> = <span class="ruby-identifier">klass</span>
19
+ 154: <span class="ruby-keyword kw">break</span>
20
+ 155: <span class="ruby-keyword kw">end</span>
21
+ 156: }
22
+ 157:
23
+ 158: <span class="ruby-identifier">raise</span> <span class="ruby-constant">FactoryError</span>, <span class="ruby-node">&quot;Couldn't find factory base for #{self.name}&quot;</span> <span class="ruby-keyword kw">if</span>
24
+ 159: <span class="ruby-identifier">base</span>.<span class="ruby-identifier">nil?</span>
25
+ 160:
26
+ 161: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">base</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^.*::(.*)/</span>
27
+ 162: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">$1</span>
28
+ 163: <span class="ruby-keyword kw">else</span>
29
+ 164: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">base</span>.<span class="ruby-identifier">name</span>
30
+ 165: <span class="ruby-keyword kw">end</span>
31
+ 166: <span class="ruby-keyword kw">end</span></pre>
32
+ </body>
33
+ </html>
@@ -0,0 +1,32 @@
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>inherited (PluginFactory)</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/pluginfactory.rb, line 171</span>
14
+ 171: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inherited</span>( <span class="ruby-identifier">subclass</span> )
15
+ 172: <span class="ruby-identifier">keys</span> = [ <span class="ruby-identifier">subclass</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">subclass</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-identifier">subclass</span> ]
16
+ 173:
17
+ 174: <span class="ruby-comment cmt"># Handle class names like 'FooBar' for 'Bar' factories.</span>
18
+ 175: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">subclass</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">match</span>( <span class="ruby-node">/(?:.*::)?(\w+)(?:#{self.factoryType})/i</span> )
19
+ 176: <span class="ruby-identifier">keys</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">last_match</span>[<span class="ruby-value">1</span>].<span class="ruby-identifier">downcase</span>
20
+ 177: <span class="ruby-keyword kw">else</span>
21
+ 178: <span class="ruby-identifier">keys</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">subclass</span>.<span class="ruby-identifier">name</span>.<span class="ruby-identifier">sub</span>( <span class="ruby-regexp re">/.*::/</span>, <span class="ruby-value str">''</span> ).<span class="ruby-identifier">downcase</span>
22
+ 179: <span class="ruby-keyword kw">end</span>
23
+ 180:
24
+ 181: <span class="ruby-identifier">keys</span>.<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">key</span><span class="ruby-operator">|</span>
25
+ 182: <span class="ruby-comment cmt">#PluginFactory::log :info, &quot;Registering %s derivative of %s as %p&quot; %</span>
26
+ 183: <span class="ruby-comment cmt"># [ subclass.name, self.name, key ]</span>
27
+ 184: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivatives</span>[ <span class="ruby-identifier">key</span> ] = <span class="ruby-identifier">subclass</span>
28
+ 185: }
29
+ 186: <span class="ruby-keyword kw">super</span>
30
+ 187: <span class="ruby-keyword kw">end</span></pre>
31
+ </body>
32
+ </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>derivativeClasses (PluginFactory)</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/pluginfactory.rb, line 191</span>
14
+ 191: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">derivativeClasses</span>
15
+ 192: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivatives</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">uniq</span>
16
+ 193: <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>create (PluginFactory)</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/pluginfactory.rb, line 208</span>
14
+ 208: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create</span>( <span class="ruby-identifier">subType</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> )
15
+ 209: <span class="ruby-identifier">subclass</span> = <span class="ruby-identifier">getSubclass</span>( <span class="ruby-identifier">subType</span> )
16
+ 210:
17
+ 211: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">subclass</span>.<span class="ruby-identifier">new</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span> )
18
+ 212: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">err</span>
19
+ 213: <span class="ruby-identifier">nicetrace</span> = <span class="ruby-identifier">err</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">frame</span><span class="ruby-operator">|</span> <span class="ruby-node">/#{__FILE__}/</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">frame</span>}
20
+ 214: <span class="ruby-identifier">msg</span> = <span class="ruby-node">&quot;When creating '#{subType}': &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">err</span>.<span class="ruby-identifier">message</span>
21
+ 215: <span class="ruby-constant">Kernel</span><span class="ruby-operator">::</span><span class="ruby-identifier">raise</span>( <span class="ruby-identifier">err</span>.<span class="ruby-identifier">class</span>, <span class="ruby-identifier">msg</span>, <span class="ruby-identifier">nicetrace</span> )
22
+ 216: <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,40 @@
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>getSubclass (PluginFactory)</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/pluginfactory.rb, line 222</span>
14
+ 222: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getSubclass</span>( <span class="ruby-identifier">className</span> )
15
+ 223: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span> <span class="ruby-keyword kw">if</span> ( <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">className</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">className</span> <span class="ruby-operator">==</span> <span class="ruby-value str">''</span> )
16
+ 224: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">className</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">className</span>.<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">Class</span> ) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">className</span> <span class="ruby-operator">&gt;=</span> <span class="ruby-keyword kw">self</span>
17
+ 225:
18
+ 226: <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivatives</span>.<span class="ruby-identifier">has_key?</span>( <span class="ruby-identifier">className</span>.<span class="ruby-identifier">downcase</span> )
19
+ 227: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">loadDerivative</span>( <span class="ruby-identifier">className</span> )
20
+ 228:
21
+ 229: <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivatives</span>.<span class="ruby-identifier">has_key?</span>( <span class="ruby-identifier">className</span>.<span class="ruby-identifier">downcase</span> )
22
+ 230: <span class="ruby-identifier">raise</span> <span class="ruby-constant">FactoryError</span>,
23
+ 231: <span class="ruby-value str">&quot;loadDerivative(%s) didn't add a '%s' key to the &quot;</span>\
24
+ 232: <span class="ruby-value str">&quot;registry for %s&quot;</span> <span class="ruby-operator">%</span>
25
+ 233: [ <span class="ruby-identifier">className</span>, <span class="ruby-identifier">className</span>.<span class="ruby-identifier">downcase</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span> ]
26
+ 234: <span class="ruby-keyword kw">end</span>
27
+ 235:
28
+ 236: <span class="ruby-identifier">subclass</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivatives</span>[ <span class="ruby-identifier">className</span>.<span class="ruby-identifier">downcase</span> ]
29
+ 237: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">subclass</span>.<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">Class</span> )
30
+ 238: <span class="ruby-identifier">raise</span> <span class="ruby-constant">FactoryError</span>,
31
+ 239: <span class="ruby-value str">&quot;loadDerivative(%s) added something other than a class &quot;</span>\
32
+ 240: <span class="ruby-value str">&quot;to the registry for %s: %p&quot;</span> <span class="ruby-operator">%</span>
33
+ 241: [ <span class="ruby-identifier">className</span>, <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">subclass</span> ]
34
+ 242: <span class="ruby-keyword kw">end</span>
35
+ 243: <span class="ruby-keyword kw">end</span>
36
+ 244:
37
+ 245: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivatives</span>[ <span class="ruby-identifier">className</span>.<span class="ruby-identifier">downcase</span> ]
38
+ 246: <span class="ruby-keyword kw">end</span></pre>
39
+ </body>
40
+ </html>
@@ -0,0 +1,39 @@
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>loadDerivative (PluginFactory)</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/pluginfactory.rb, line 258</span>
14
+ 258: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">loadDerivative</span>( <span class="ruby-identifier">className</span> )
15
+ 259: <span class="ruby-identifier">className</span> = <span class="ruby-identifier">className</span>.<span class="ruby-identifier">to_s</span>
16
+ 260:
17
+ 261: <span class="ruby-comment cmt">#PluginFactory::log :debug, &quot;Loading derivative #{className}&quot;</span>
18
+ 262:
19
+ 263: <span class="ruby-comment cmt"># Get the unique part of the derived class name and try to</span>
20
+ 264: <span class="ruby-comment cmt"># load it from one of the derivative subdirs, if there are</span>
21
+ 265: <span class="ruby-comment cmt"># any.</span>
22
+ 266: <span class="ruby-identifier">modName</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">getModuleName</span>( <span class="ruby-identifier">className</span> )
23
+ 267: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">requireDerivative</span>( <span class="ruby-identifier">modName</span> )
24
+ 268:
25
+ 269: <span class="ruby-comment cmt"># Check to see if the specified listener is now loaded. If it</span>
26
+ 270: <span class="ruby-comment cmt"># is not, raise an error to that effect.</span>
27
+ 271: <span class="ruby-keyword kw">unless</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivatives</span>[ <span class="ruby-identifier">className</span>.<span class="ruby-identifier">downcase</span> ]
28
+ 272: <span class="ruby-identifier">raise</span> <span class="ruby-constant">FactoryError</span>,
29
+ 273: <span class="ruby-value str">&quot;Couldn't find a %s named '%s'. Loaded derivatives are: %p&quot;</span> <span class="ruby-operator">%</span> [
30
+ 274: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">factoryType</span>,
31
+ 275: <span class="ruby-identifier">className</span>.<span class="ruby-identifier">downcase</span>,
32
+ 276: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivatives</span>.<span class="ruby-identifier">keys</span>,
33
+ 277: ], <span class="ruby-identifier">caller</span>(<span class="ruby-value">3</span>)
34
+ 278: <span class="ruby-keyword kw">end</span>
35
+ 279:
36
+ 280: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
37
+ 281: <span class="ruby-keyword kw">end</span></pre>
38
+ </body>
39
+ </html>
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>getModuleName (PluginFactory)</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/pluginfactory.rb, line 288</span>
14
+ 288: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">getModuleName</span>( <span class="ruby-identifier">className</span> )
15
+ 289: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">className</span> <span class="ruby-operator">=~</span> <span class="ruby-node">/\w+#{self.factoryType}/</span>
16
+ 290: <span class="ruby-identifier">modName</span> = <span class="ruby-identifier">className</span>.<span class="ruby-identifier">sub</span>( <span class="ruby-node">/(?:.*::)?(\w+)(?:#{self.factoryType})/</span>, <span class="ruby-value str">&quot;\\1&quot;</span> )
17
+ 291: <span class="ruby-keyword kw">else</span>
18
+ 292: <span class="ruby-identifier">modName</span> = <span class="ruby-identifier">className</span>
19
+ 293: <span class="ruby-keyword kw">end</span>
20
+ 294:
21
+ 295: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">modName</span>
22
+ 296: <span class="ruby-keyword kw">end</span></pre>
23
+ </body>
24
+ </html>
@@ -0,0 +1,70 @@
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>requireDerivative (PluginFactory)</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/pluginfactory.rb, line 302</span>
14
+ 302: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">requireDerivative</span>( <span class="ruby-identifier">modName</span> )
15
+ 303:
16
+ 304: <span class="ruby-comment cmt"># See if we have a list of special subdirs that derivatives</span>
17
+ 305: <span class="ruby-comment cmt"># live in</span>
18
+ 306: <span class="ruby-keyword kw">if</span> ( <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:derivativeDirs</span>) )
19
+ 307: <span class="ruby-identifier">subdirs</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">derivativeDirs</span>
20
+ 308: <span class="ruby-identifier">subdirs</span> = [ <span class="ruby-identifier">subdirs</span> ] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">subdirs</span>.<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">Array</span> )
21
+ 309:
22
+ 310: <span class="ruby-comment cmt"># If not, just try requiring it from $LOAD_PATH</span>
23
+ 311: <span class="ruby-keyword kw">else</span>
24
+ 312: <span class="ruby-identifier">subdirs</span> = [<span class="ruby-value str">''</span>]
25
+ 313: <span class="ruby-keyword kw">end</span>
26
+ 314:
27
+ 315: <span class="ruby-identifier">fatals</span> = []
28
+ 316:
29
+ 317: <span class="ruby-comment cmt"># Iterate over the subdirs until we successfully require a</span>
30
+ 318: <span class="ruby-comment cmt"># module.</span>
31
+ 319: <span class="ruby-identifier">catch</span>( <span class="ruby-identifier">:found</span> ) {
32
+ 320: <span class="ruby-identifier">subdirs</span>.<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span> <span class="ruby-identifier">dir</span>.<span class="ruby-identifier">strip</span>}.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">subdir</span><span class="ruby-operator">|</span>
33
+ 321: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">makeRequirePath</span>( <span class="ruby-identifier">modName</span>, <span class="ruby-identifier">subdir</span> ).<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
34
+ 322: <span class="ruby-comment cmt">#PluginFactory::log :debug, &quot;Trying #{path}...&quot;</span>
35
+ 323:
36
+ 324: <span class="ruby-comment cmt"># Try to require the module, saving errors and jumping</span>
37
+ 325: <span class="ruby-comment cmt"># out of the catch block on success.</span>
38
+ 326: <span class="ruby-keyword kw">begin</span>
39
+ 327: <span class="ruby-identifier">require</span>( <span class="ruby-identifier">path</span>.<span class="ruby-identifier">untaint</span> )
40
+ 328: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">err</span>
41
+ 329: <span class="ruby-constant">PluginFactory</span><span class="ruby-operator">::</span><span class="ruby-identifier">log</span> <span class="ruby-identifier">:debug</span>,
42
+ 330: <span class="ruby-value str">&quot;No module at '%s', trying the next alternative: '%s'&quot;</span> <span class="ruby-operator">%</span>
43
+ 331: [ <span class="ruby-identifier">path</span>, <span class="ruby-identifier">err</span>.<span class="ruby-identifier">message</span> ]
44
+ 332: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ScriptError</span>,<span class="ruby-constant">StandardError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">err</span>
45
+ 333: <span class="ruby-identifier">fatals</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">err</span>
46
+ 334: <span class="ruby-constant">PluginFactory</span><span class="ruby-operator">::</span><span class="ruby-identifier">log</span> <span class="ruby-identifier">:error</span>,
47
+ 335: <span class="ruby-node">&quot;Found '#{path}', but encountered an error: %s\n\t%s&quot;</span> <span class="ruby-operator">%</span>
48
+ 336: [ <span class="ruby-identifier">err</span>.<span class="ruby-identifier">message</span>, <span class="ruby-identifier">err</span>.<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n\t&quot;</span>) ]
49
+ 337: <span class="ruby-keyword kw">else</span>
50
+ 338: <span class="ruby-comment cmt">#PluginFactory::log :debug, </span>
51
+ 339: <span class="ruby-comment cmt"># &quot;Found '#{path}'. Throwing :found&quot;</span>
52
+ 340: <span class="ruby-identifier">throw</span> <span class="ruby-identifier">:found</span>
53
+ 341: <span class="ruby-keyword kw">end</span>
54
+ 342: }
55
+ 343: <span class="ruby-keyword kw">end</span>
56
+ 344:
57
+ 345: <span class="ruby-comment cmt">#PluginFactory::log :debug, &quot;fatals = %p&quot; % [ fatals ]</span>
58
+ 346:
59
+ 347: <span class="ruby-comment cmt"># Re-raise is there was a file found, but it didn't load for</span>
60
+ 348: <span class="ruby-comment cmt"># some reason.</span>
61
+ 349: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">fatals</span>.<span class="ruby-identifier">empty?</span>
62
+ 350: <span class="ruby-comment cmt">#PluginFactory::log :debug, &quot;Re-raising first fatal error&quot;</span>
63
+ 351: <span class="ruby-constant">Kernel</span><span class="ruby-operator">::</span><span class="ruby-identifier">raise</span>( <span class="ruby-identifier">fatals</span>.<span class="ruby-identifier">first</span> )
64
+ 352: <span class="ruby-keyword kw">end</span>
65
+ 353:
66
+ 354: <span class="ruby-keyword kw">nil</span>
67
+ 355: }
68
+ 356: <span class="ruby-keyword kw">end</span></pre>
69
+ </body>
70
+ </html>
@@ -0,0 +1,34 @@
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>makeRequirePath (PluginFactory)</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/pluginfactory.rb, line 364</span>
14
+ 364: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">makeRequirePath</span>( <span class="ruby-identifier">modname</span>, <span class="ruby-identifier">subdir</span> )
15
+ 365: <span class="ruby-identifier">path</span> = []
16
+ 366: <span class="ruby-identifier">myname</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">factoryType</span>
17
+ 367:
18
+ 368: <span class="ruby-comment cmt"># Make permutations of the two parts</span>
19
+ 369: <span class="ruby-identifier">path</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">modname</span>
20
+ 370: <span class="ruby-identifier">path</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">modname</span>.<span class="ruby-identifier">downcase</span>
21
+ 371: <span class="ruby-identifier">path</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">modname</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">myname</span>
22
+ 372: <span class="ruby-identifier">path</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">modname</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">myname</span>
23
+ 373: <span class="ruby-identifier">path</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">modname</span>.<span class="ruby-identifier">downcase</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">myname</span>.<span class="ruby-identifier">downcase</span>
24
+ 374:
25
+ 375: <span class="ruby-comment cmt"># If a non-empty subdir was given, prepend it to all the items in the</span>
26
+ 376: <span class="ruby-comment cmt"># path</span>
27
+ 377: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">subdir</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">or</span> <span class="ruby-identifier">subdir</span>.<span class="ruby-identifier">empty?</span>
28
+ 378: <span class="ruby-identifier">path</span>.<span class="ruby-identifier">collect!</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span> <span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-identifier">join</span>(<span class="ruby-identifier">subdir</span>, <span class="ruby-identifier">m</span>)}
29
+ 379: <span class="ruby-keyword kw">end</span>
30
+ 380:
31
+ 381: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">path</span>.<span class="ruby-identifier">uniq</span>.<span class="ruby-identifier">reverse</span>
32
+ 382: <span class="ruby-keyword kw">end</span></pre>
33
+ </body>
34
+ </html>
@@ -1 +1 @@
1
- Fri Feb 10 02:50:17 EST 2006
1
+ Sun Feb 12 15:12:16 EST 2006
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Fri Feb 10 02:18:14 EST 2006</td>
59
+ <td>Sat Feb 11 22:46:26 EST 2006</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -84,41 +84,42 @@ portability issues.
84
84
  </p>
85
85
  <h2>Status</h2>
86
86
  <p>
87
- The 0.3 release is the first official release to start supporting Ruby on
88
- Rails and to have a more complete DirHandler for serving directories of
89
- files. This release is actually closer to a full functioning web server
90
- than the previous releases.
87
+ The 0.3.1 release support Ruby On Rails much better than previously, and
88
+ also sports the beginning of a command and plugin infrastructure. This last
89
+ part isn&#8217;t documented yet.
91
90
  </p>
92
91
  <p>
93
- The Rails support is pretty rough right now, but check out the
94
- bin/mongrel_rails file, which should be installed into your PATH if you use
95
- a gem. You should be able to do the following to run your Rails
96
- applications:
92
+ After you&#8217;ve installed (either with gem install mongrel or via
93
+ source) you should have the mongrel_rails command available in your PATH.
94
+ Then you just do the following:
97
95
  </p>
98
96
  <pre>
99
- &gt; cd myrailsapp
100
- &gt; mongrel_rails 0.0.0.0 3000
97
+ &gt; cd myrailsapp
98
+ &gt; mongrel_rails start
101
99
  </pre>
102
100
  <p>
103
- And then hit <a href="http://localhost:3000">localhost:3000</a>/ to see
104
- your app. One thing is that if you have a public/index.html file then
105
- you&#8217;ll get that served instead of your Rails application.
101
+ This will start it in the foreground so you can play with it. It runs your
102
+ application in production mode. To get help do:
106
103
  </p>
104
+ <pre>
105
+ &gt; mongrel_rails start -h
106
+ </pre>
107
107
  <p>
108
- People with the daemons gem installed will see that mongrel_rails will go
109
- into the background. You can kill it with:
108
+ Finally, you can then start in background mode (probably won&#8217;t work
109
+ in win32):
110
110
  </p>
111
111
  <pre>
112
- &gt; kill -TERM `cat log/mongrel-3000.pid`
112
+ &gt; mongrel_rails start -d
113
113
  </pre>
114
114
  <p>
115
- Where &quot;3000&quot; is whatever port you told it to listen on when you
116
- ran it.
115
+ And you can stop it whenever you like with:
117
116
  </p>
117
+ <pre>
118
+ &gt; mongrel_rails stop
119
+ </pre>
118
120
  <p>
119
- The file serving is still a little rough and the redirects might not work
120
- well, but try it out and tell me about any weird errors. File uploads will
121
- definitely have some problems.
121
+ All of which should be done from your application&#8217;s directory. It
122
+ writes the PID of the process you ran into log/mongrel.pid.
122
123
  </p>
123
124
  <h2>Install</h2>
124
125
  <p>
@@ -169,18 +170,14 @@ is missing though.*
169
170
  </p>
170
171
  <h2>Speed</h2>
171
172
  <p>
172
- The 0.2.1 release probably consists of the most effort I&#8217;ve ever put
173
- into tuning a Ruby library for speed. It consists of nearly everything I
174
- could think of to make <a href="../classes/Mongrel.html">Mongrel</a> the
175
- fastest Ruby HTTP library possible. I&#8217;ve tried about seven different
176
- architectures and IO processing methods and none of them make it any
177
- faster. In short: <a href="../classes/Mongrel.html">Mongrel</a> is
178
- amazingly fast considering Ruby&#8217;s speed limitations.
173
+ Like previous releases 0.3.1 continues the trend of making things as fast
174
+ as possible. It currently might be a little slower than other releases but
175
+ should hold up pretty good against at least WEBrick (especially when
176
+ running Rails).
179
177
  </p>
180
178
  <p>
181
- This release also brings in controllable threads that you can scale to meet
182
- your needs to do your processing. Simple pass in the HttpServer.new third
183
- optional parameter:
179
+ As before you can control the number of processor threads (and thus
180
+ ActiveRecord database connections) with:
184
181
  </p>
185
182
  <pre>
186
183
  h = Mongrel::HttpServer.new(&quot;0.0.0.0&quot;, &quot;3000&quot;, 40)
@@ -192,11 +189,6 @@ limited processors also means that you can use ActiveRecord as-is and it
192
189
  will create a matching database connection for each processor thread. More
193
190
  on this in future releases.
194
191
  </p>
195
- <p>
196
- With this release I&#8217;m hoping that I&#8217;ve created a nice solid
197
- fast as hell core upon which I can build the remaining features I want in
198
- <a href="../classes/Mongrel.html">Mongrel</a>.
199
- </p>
200
192
  <h2>The Future</h2>
201
193
  <p>
202
194
  With the core of <a href="../classes/Mongrel.html">Mongrel</a> completed