mongrel 0.3.12 → 0.3.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. data/Rakefile +1 -1
  2. data/bin/mongrel_rails +12 -6
  3. data/doc/rdoc/classes/Class.src/M000001.html +10 -10
  4. data/doc/rdoc/classes/Class.src/M000002.html +46 -46
  5. data/doc/rdoc/classes/Class.src/M000003.html +7 -7
  6. data/doc/rdoc/classes/Class.src/M000004.html +6 -6
  7. data/doc/rdoc/classes/IO.src/M000005.html +5 -5
  8. data/doc/rdoc/classes/IO.src/M000006.html +5 -5
  9. data/doc/rdoc/classes/Kernel.src/M000025.html +5 -5
  10. data/doc/rdoc/classes/Kernel.src/M000026.html +11 -11
  11. data/doc/rdoc/classes/Mongrel.html +1 -0
  12. data/doc/rdoc/classes/Mongrel/Command/Base.src/M000030.html +1 -1
  13. data/doc/rdoc/classes/Mongrel/Configurator.src/M000099.html +10 -10
  14. data/doc/rdoc/classes/Mongrel/Configurator.src/M000100.html +9 -9
  15. data/doc/rdoc/classes/Mongrel/Configurator.src/M000101.html +4 -4
  16. data/doc/rdoc/classes/Mongrel/Configurator.src/M000102.html +18 -18
  17. data/doc/rdoc/classes/Mongrel/Configurator.src/M000103.html +5 -5
  18. data/doc/rdoc/classes/Mongrel/Configurator.src/M000104.html +16 -16
  19. data/doc/rdoc/classes/Mongrel/Configurator.src/M000105.html +19 -19
  20. data/doc/rdoc/classes/Mongrel/Configurator.src/M000106.html +4 -4
  21. data/doc/rdoc/classes/Mongrel/Configurator.src/M000107.html +10 -11
  22. data/doc/rdoc/classes/Mongrel/Configurator.src/M000108.html +5 -5
  23. data/doc/rdoc/classes/Mongrel/Configurator.src/M000109.html +8 -8
  24. data/doc/rdoc/classes/Mongrel/Configurator.src/M000110.html +7 -7
  25. data/doc/rdoc/classes/Mongrel/Configurator.src/M000111.html +4 -4
  26. data/doc/rdoc/classes/Mongrel/Configurator.src/M000112.html +14 -13
  27. data/doc/rdoc/classes/Mongrel/Configurator.src/M000113.html +5 -33
  28. data/doc/rdoc/classes/Mongrel/Configurator.src/M000114.html +33 -5
  29. data/doc/rdoc/classes/Mongrel/Configurator.src/M000115.html +18 -0
  30. data/doc/rdoc/classes/Mongrel/Const.html +11 -1
  31. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000116.html +5 -5
  32. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000117.html +18 -0
  33. data/doc/rdoc/classes/Mongrel/HeaderOut.html +0 -185
  34. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000072.html +4 -4
  35. data/doc/rdoc/classes/Mongrel/HeaderOut.src/M000073.html +4 -4
  36. data/doc/rdoc/classes/Mongrel/HttpParser.src/M000054.html +3 -1
  37. data/doc/rdoc/classes/Mongrel/{StopServer.html → HttpParserError.html} +5 -11
  38. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000118.html +15 -7
  39. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000119.html +7 -7
  40. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000120.html +7 -19
  41. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000121.html +32 -0
  42. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000075.html +12 -12
  43. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000076.html +6 -6
  44. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000077.html +11 -11
  45. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000078.html +8 -8
  46. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000079.html +8 -8
  47. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000080.html +9 -9
  48. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000081.html +4 -4
  49. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000082.html +6 -6
  50. data/doc/rdoc/classes/Mongrel/HttpResponse.src/M000083.html +4 -4
  51. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000064.html +10 -10
  52. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000065.html +51 -50
  53. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000066.html +10 -10
  54. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000067.html +45 -45
  55. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000068.html +14 -14
  56. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000069.html +4 -4
  57. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000070.html +8 -8
  58. data/doc/rdoc/classes/Mongrel/HttpServer.src/M000071.html +4 -4
  59. data/doc/rdoc/classes/ObjectTracker.src/M000019.html +20 -22
  60. data/doc/rdoc/classes/RequestLog/Access.src/M000122.html +19 -0
  61. data/doc/rdoc/classes/RequestLog/Files.src/{M000121.html → M000123.html} +5 -5
  62. data/doc/rdoc/classes/RequestLog/Objects.src/{M000122.html → M000124.html} +5 -5
  63. data/doc/rdoc/classes/RequestLog/Params.src/{M000123.html → M000125.html} +5 -5
  64. data/doc/rdoc/classes/Stats.html +1 -1
  65. data/doc/rdoc/classes/Stats.src/M000012.html +2 -2
  66. data/doc/rdoc/created.rid +1 -1
  67. data/doc/rdoc/files/ext/http11/http11_c.html +1 -1
  68. data/doc/rdoc/files/lib/mongrel/command_rb.html +1 -1
  69. data/doc/rdoc/files/lib/mongrel/debug_rb.html +1 -1
  70. data/doc/rdoc/files/lib/mongrel/handlers_rb.html +1 -1
  71. data/doc/rdoc/files/lib/mongrel/stats_rb.html +1 -1
  72. data/doc/rdoc/files/lib/mongrel_rb.html +1 -1
  73. data/examples/random_thrash.rb +19 -0
  74. data/ext/http11/http11.c +57 -12
  75. data/ext/http11/http11_parser.c +58 -52
  76. data/lib/mongrel.rb +37 -10
  77. data/lib/mongrel/command.rb +1 -1
  78. data/lib/mongrel/debug.rb +39 -125
  79. data/lib/mongrel/handlers.rb +2 -2
  80. data/lib/mongrel/rails.rb +2 -1
  81. data/lib/mongrel/stats.rb +2 -2
  82. data/test/test_configurator.rb +2 -2
  83. data/test/test_debug.rb +2 -4
  84. data/test/test_http11.rb +76 -7
  85. data/test/test_stats.rb +6 -4
  86. data/test/test_uriclassifier.rb +0 -14
  87. metadata +12 -24
  88. data/doc/rdoc/classes/Mongrel/CGIWrapper.html +0 -383
  89. data/doc/rdoc/classes/Mongrel/Configurator.html +0 -563
  90. data/doc/rdoc/classes/Mongrel/Error404Handler.html +0 -171
  91. data/doc/rdoc/classes/Mongrel/Error404Handler.src/M000115.html +0 -18
  92. data/doc/rdoc/classes/Mongrel/HttpHandler.html +0 -152
  93. data/doc/rdoc/classes/Mongrel/HttpRequest.html +0 -222
  94. data/doc/rdoc/classes/Mongrel/HttpRequest.src/M000117.html +0 -28
  95. data/doc/rdoc/classes/Mongrel/HttpResponse.html +0 -371
  96. data/doc/rdoc/classes/Mongrel/URIClassifier.html +0 -301
  97. data/doc/rdoc/classes/RequestLog.html +0 -113
  98. data/doc/rdoc/classes/RequestLog/Files.html +0 -144
  99. data/doc/rdoc/classes/RequestLog/Objects.html +0 -144
  100. data/doc/rdoc/classes/RequestLog/Params.html +0 -144
  101. data/doc/rdoc/fr_class_index.html +0 -60
  102. data/doc/rdoc/fr_file_index.html +0 -40
  103. data/doc/rdoc/fr_method_index.html +0 -149
  104. data/doc/rdoc/index.html +0 -24
  105. data/lib/http11.bundle +0 -0
data/Rakefile CHANGED
@@ -32,7 +32,7 @@ end
32
32
  setup_extension("http11", "http11")
33
33
 
34
34
  name="mongrel"
35
- version="0.3.12"
35
+ version="0.3.12.1"
36
36
 
37
37
  setup_gem(name, version) do |spec|
38
38
  spec.summary = "A small fast HTTP library and server that runs Rails, Camping, and Nitro apps."
@@ -22,7 +22,8 @@ class Start < GemPlugin::Plugin "/commands"
22
22
  ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd],
23
23
  ['-r', '--root PATH', "Set the document root (default 'public')", :@docroot, "public"],
24
24
  ['-B', '--debug', "Enable debugging mode", :@debug, false],
25
- ['-C', '--config PATH', "Use a config file", :@config_file, nil]
25
+ ['-C', '--config PATH', "Use a config file", :@config_file, nil],
26
+ ['-S', '--script PATH', "Load the given file as an extra config script.", :@config_script, nil]
26
27
  ]
27
28
  end
28
29
 
@@ -47,7 +48,7 @@ class Start < GemPlugin::Plugin "/commands"
47
48
  settings = { :host => @address, :port => @port, :cwd => @cwd,
48
49
  :log_file => @log_file, :pid_file => @pid_file, :environment => @environment,
49
50
  :docroot => @docroot, :mime_map => @mime_map, :daemon => @daemon,
50
- :debug => @debug, :includes => ["mongrel"]
51
+ :debug => @debug, :includes => ["mongrel"], :config_script => @config_script
51
52
  }
52
53
 
53
54
  if @config_file
@@ -57,17 +58,17 @@ class Start < GemPlugin::Plugin "/commands"
57
58
  end
58
59
 
59
60
  config = Mongrel::Rails::RailsConfigurator.new(settings) do
60
- log "Starting Mongrel in #{settings[:environment]} mode at #{settings[:host]}:#{settings[:port]}"
61
+ log "Starting Mongrel in #{defaults[:environment]} mode at #{defaults[:host]}:#{defaults[:port]}"
61
62
 
62
63
  if defaults[:daemon]
63
- log "Daemonizing, any open files are closed. Look at #{settings[:pid_file]} and #{settings[:log_file]} for info."
64
+ log "Daemonizing, any open files are closed. Look at #{defaults[:pid_file]} and #{defaults[:log_file]} for info."
64
65
  daemonize
65
66
  end
66
67
 
67
68
  listener do
68
69
  mime = {}
69
70
  if defaults[:mime_map]
70
- log "Loading additional MIME types from #{settings[:mime_map]}"
71
+ log "Loading additional MIME types from #{defaults[:mime_map]}"
71
72
  mime = load_mime_map(defaults[:mime_map], mime)
72
73
  end
73
74
 
@@ -76,13 +77,18 @@ class Start < GemPlugin::Plugin "/commands"
76
77
  debug "/"
77
78
  end
78
79
 
79
- log "Starting Rails in environment #{settings[:environment]} ..."
80
+ log "Starting Rails in environment #{defaults[:environment]} ..."
80
81
  uri "/", :handler => rails
81
82
  log "Rails loaded."
82
83
 
83
84
  log "Loading any Rails specific GemPlugins"
84
85
  load_plugins
85
86
 
87
+ if defaults[:config_script]
88
+ log "Loading #{defaults[:config_script]} external config script"
89
+ run_config(defaults[:config_script])
90
+ end
91
+
86
92
  setup_rails_signals
87
93
  end
88
94
  end
@@ -10,15 +10,15 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 146</span>
14
- 146: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 147: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@@stopit</span>
16
- 148: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">true</span>
17
- 149: <span class="ruby-ivar">@@count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
18
- 150: <span class="ruby-ivar">@@class_caller_count</span>[<span class="ruby-keyword kw">self</span>][<span class="ruby-identifier">caller</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n\t&quot;</span>)] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
19
- 151: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">false</span>
20
- 152: <span class="ruby-keyword kw">end</span>
21
- 153: <span class="ruby-identifier">orig_new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
22
- 154: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 144</span>
14
+ 144: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
+ 145: <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@@stopit</span>
16
+ 146: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">true</span>
17
+ 147: <span class="ruby-ivar">@@count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
18
+ 148: <span class="ruby-ivar">@@class_caller_count</span>[<span class="ruby-keyword kw">self</span>][<span class="ruby-identifier">caller</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n\t&quot;</span>)] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
19
+ 149: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">false</span>
20
+ 150: <span class="ruby-keyword kw">end</span>
21
+ 151: <span class="ruby-identifier">orig_new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
22
+ 152: <span class="ruby-keyword kw">end</span></pre>
23
23
  </body>
24
24
  </html>
@@ -10,53 +10,53 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 157</span>
14
- 157: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">report_object_creations</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stderr</span>, <span class="ruby-identifier">more_than</span>=<span class="ruby-value">20</span>)
15
- 158: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
16
- 159: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Number of objects created = #{@@count}&quot;</span>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 155</span>
14
+ 155: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">report_object_creations</span>(<span class="ruby-identifier">out</span>=<span class="ruby-identifier">$stderr</span>, <span class="ruby-identifier">more_than</span>=<span class="ruby-value">20</span>)
15
+ 156: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
16
+ 157: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Number of objects created = #{@@count}&quot;</span>
17
+ 158:
18
+ 159: <span class="ruby-identifier">total</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
17
19
  160:
18
- 161: <span class="ruby-identifier">total</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)
19
- 162:
20
- 163: <span class="ruby-ivar">@@class_caller_count</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
21
- 164: <span class="ruby-identifier">caller_count</span> = <span class="ruby-ivar">@@class_caller_count</span>[<span class="ruby-identifier">klass</span>]
22
- 165: <span class="ruby-identifier">caller_count</span>.<span class="ruby-identifier">each_value</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">count</span><span class="ruby-operator">|</span>
23
- 166: <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">count</span>
24
- 167: <span class="ruby-keyword kw">end</span>
25
- 168: <span class="ruby-keyword kw">end</span>
26
- 169:
27
- 170: <span class="ruby-identifier">klass_list</span> = <span class="ruby-identifier">total</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">klass_a</span>, <span class="ruby-identifier">klass_b</span><span class="ruby-operator">|</span>
28
- 171: <span class="ruby-identifier">a</span> = <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass_a</span>]
29
- 172: <span class="ruby-identifier">b</span> = <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass_b</span>]
30
- 173: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">b</span>
31
- 174: <span class="ruby-value">-1</span><span class="ruby-operator">*</span> (<span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">b</span>)
32
- 175: <span class="ruby-keyword kw">else</span>
33
- 176: <span class="ruby-identifier">klass_a</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">klass_b</span>.<span class="ruby-identifier">to_s</span>
34
- 177: <span class="ruby-keyword kw">end</span>
35
- 178: }
20
+ 161: <span class="ruby-ivar">@@class_caller_count</span>.<span class="ruby-identifier">each_key</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
21
+ 162: <span class="ruby-identifier">caller_count</span> = <span class="ruby-ivar">@@class_caller_count</span>[<span class="ruby-identifier">klass</span>]
22
+ 163: <span class="ruby-identifier">caller_count</span>.<span class="ruby-identifier">each_value</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">count</span><span class="ruby-operator">|</span>
23
+ 164: <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass</span>] <span class="ruby-operator">+=</span> <span class="ruby-identifier">count</span>
24
+ 165: <span class="ruby-keyword kw">end</span>
25
+ 166: <span class="ruby-keyword kw">end</span>
26
+ 167:
27
+ 168: <span class="ruby-identifier">klass_list</span> = <span class="ruby-identifier">total</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">klass_a</span>, <span class="ruby-identifier">klass_b</span><span class="ruby-operator">|</span>
28
+ 169: <span class="ruby-identifier">a</span> = <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass_a</span>]
29
+ 170: <span class="ruby-identifier">b</span> = <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass_b</span>]
30
+ 171: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">a</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">b</span>
31
+ 172: <span class="ruby-value">-1</span><span class="ruby-operator">*</span> (<span class="ruby-identifier">a</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">b</span>)
32
+ 173: <span class="ruby-keyword kw">else</span>
33
+ 174: <span class="ruby-identifier">klass_a</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">&lt;=&gt;</span> <span class="ruby-identifier">klass_b</span>.<span class="ruby-identifier">to_s</span>
34
+ 175: <span class="ruby-keyword kw">end</span>
35
+ 176: }
36
+ 177:
37
+ 178: <span class="ruby-identifier">below_count</span> = <span class="ruby-value">0</span>
36
38
  179:
37
- 180: <span class="ruby-identifier">below_count</span> = <span class="ruby-value">0</span>
38
- 181:
39
- 182: <span class="ruby-identifier">klass_list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
40
- 183: <span class="ruby-identifier">below_calls</span> = <span class="ruby-value">0</span>
41
- 184: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass</span>] <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">more_than</span>
42
- 185: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{total[klass]}\t#{klass} objects created.&quot;</span>
43
- 186: <span class="ruby-identifier">caller_count</span> = <span class="ruby-ivar">@@class_caller_count</span>[ <span class="ruby-identifier">klass</span>]
44
- 187: <span class="ruby-identifier">caller_count</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort_by</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">call</span><span class="ruby-operator">|</span> <span class="ruby-value">-1</span><span class="ruby-operator">*</span><span class="ruby-identifier">caller_count</span>[<span class="ruby-identifier">call</span>]}.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call</span><span class="ruby-operator">|</span>
45
- 188: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">caller_count</span>[<span class="ruby-identifier">call</span>] <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">more_than</span>
46
- 189: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\t** #{caller_count[call]} #{klass} objects AT:&quot;</span>
47
- 190: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\t#{call}\n\n&quot;</span>
48
- 191: <span class="ruby-keyword kw">else</span>
49
- 192: <span class="ruby-identifier">below_calls</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
50
- 193: <span class="ruby-keyword kw">end</span>
51
- 194: <span class="ruby-keyword kw">end</span>
52
- 195: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\t#{below_calls} more objects had calls less that #{more_than} limit.\n\n&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">below_calls</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
53
- 196: <span class="ruby-keyword kw">else</span>
54
- 197: <span class="ruby-identifier">below_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
55
- 198: <span class="ruby-keyword kw">end</span>
56
- 199: <span class="ruby-keyword kw">end</span>
57
- 200:
58
- 201: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\t** #{below_count} More objects were created but the count was below the #{more_than} limit.&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">below_count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
59
- 202: <span class="ruby-keyword kw">end</span>
60
- 203: <span class="ruby-keyword kw">end</span></pre>
39
+ 180: <span class="ruby-identifier">klass_list</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span>
40
+ 181: <span class="ruby-identifier">below_calls</span> = <span class="ruby-value">0</span>
41
+ 182: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">total</span>[<span class="ruby-identifier">klass</span>] <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">more_than</span>
42
+ 183: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;#{total[klass]}\t#{klass} objects created.&quot;</span>
43
+ 184: <span class="ruby-identifier">caller_count</span> = <span class="ruby-ivar">@@class_caller_count</span>[ <span class="ruby-identifier">klass</span>]
44
+ 185: <span class="ruby-identifier">caller_count</span>.<span class="ruby-identifier">keys</span>.<span class="ruby-identifier">sort_by</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">call</span><span class="ruby-operator">|</span> <span class="ruby-value">-1</span><span class="ruby-operator">*</span><span class="ruby-identifier">caller_count</span>[<span class="ruby-identifier">call</span>]}.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">call</span><span class="ruby-operator">|</span>
45
+ 186: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">caller_count</span>[<span class="ruby-identifier">call</span>] <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">more_than</span>
46
+ 187: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\t** #{caller_count[call]} #{klass} objects AT:&quot;</span>
47
+ 188: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\t#{call}\n\n&quot;</span>
48
+ 189: <span class="ruby-keyword kw">else</span>
49
+ 190: <span class="ruby-identifier">below_calls</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
50
+ 191: <span class="ruby-keyword kw">end</span>
51
+ 192: <span class="ruby-keyword kw">end</span>
52
+ 193: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\t#{below_calls} more objects had calls less that #{more_than} limit.\n\n&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">below_calls</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
53
+ 194: <span class="ruby-keyword kw">else</span>
54
+ 195: <span class="ruby-identifier">below_count</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
55
+ 196: <span class="ruby-keyword kw">end</span>
56
+ 197: <span class="ruby-keyword kw">end</span>
57
+ 198:
58
+ 199: <span class="ruby-identifier">out</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;\t** #{below_count} More objects were created but the count was below the #{more_than} limit.&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">below_count</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
59
+ 200: <span class="ruby-keyword kw">end</span>
60
+ 201: <span class="ruby-keyword kw">end</span></pre>
61
61
  </body>
62
62
  </html>
@@ -10,12 +10,12 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 205</span>
14
- 205: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">reset_object_creations</span>
15
- 206: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
16
- 207: <span class="ruby-ivar">@@count</span> = <span class="ruby-value">0</span>
17
- 208: <span class="ruby-ivar">@@class_caller_count</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>,<span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)}
18
- 209: <span class="ruby-keyword kw">end</span>
19
- 210: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 203</span>
14
+ 203: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">reset_object_creations</span>
15
+ 204: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
16
+ 205: <span class="ruby-ivar">@@count</span> = <span class="ruby-value">0</span>
17
+ 206: <span class="ruby-ivar">@@class_caller_count</span> = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">hash</span>,<span class="ruby-identifier">key</span><span class="ruby-operator">|</span> <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">0</span>)}
18
+ 207: <span class="ruby-keyword kw">end</span>
19
+ 208: <span class="ruby-keyword kw">end</span></pre>
20
20
  </body>
21
21
  </html>
@@ -10,11 +10,11 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 212</span>
14
- 212: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span>
15
- 213: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">true</span>
16
- 214: <span class="ruby-keyword kw">yield</span>
17
- 215: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">false</span>
18
- 216: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 210</span>
14
+ 210: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span>
15
+ 211: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">true</span>
16
+ 212: <span class="ruby-keyword kw">yield</span>
17
+ 213: <span class="ruby-ivar">@@stopit</span> = <span class="ruby-keyword kw">false</span>
18
+ 214: <span class="ruby-keyword kw">end</span></pre>
19
19
  </body>
20
20
  </html>
@@ -10,10 +10,10 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 105</span>
14
- 105: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 106: <span class="ruby-identifier">$open_files</span>[<span class="ruby-keyword kw">self</span>] = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">inspect</span>
16
- 107: <span class="ruby-identifier">orig_open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
17
- 108: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 103</span>
14
+ 103: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
+ 104: <span class="ruby-identifier">$open_files</span>[<span class="ruby-keyword kw">self</span>] = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">inspect</span>
16
+ 105: <span class="ruby-identifier">orig_open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
17
+ 106: <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
19
19
  </html>
@@ -10,10 +10,10 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 110</span>
14
- 110: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 111: <span class="ruby-identifier">$open_files</span>.<span class="ruby-identifier">delete</span> <span class="ruby-keyword kw">self</span>
16
- 112: <span class="ruby-identifier">orig_close</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
17
- 113: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 108</span>
14
+ 108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
+ 109: <span class="ruby-identifier">$open_files</span>.<span class="ruby-identifier">delete</span> <span class="ruby-keyword kw">self</span>
16
+ 110: <span class="ruby-identifier">orig_close</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
17
+ 111: <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
19
19
  </html>
@@ -10,10 +10,10 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 120</span>
14
- 120: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 121: <span class="ruby-identifier">$open_files</span>[<span class="ruby-keyword kw">self</span>] = <span class="ruby-identifier">arg</span>[<span class="ruby-value">0</span>]
16
- 122: <span class="ruby-identifier">orig_open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
17
- 123: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 118</span>
14
+ 118: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
+ 119: <span class="ruby-identifier">$open_files</span>[<span class="ruby-keyword kw">self</span>] = <span class="ruby-identifier">arg</span>[<span class="ruby-value">0</span>]
16
+ 120: <span class="ruby-identifier">orig_open</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">arg</span>,<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
17
+ 121: <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
19
19
  </html>
@@ -10,16 +10,16 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 125</span>
14
- 125: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_open_files</span>
15
- 126: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
16
- 127: <span class="ruby-identifier">open_counts</span> = {}
17
- 128: <span class="ruby-identifier">$open_files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span>,<span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
18
- 129: <span class="ruby-identifier">open_counts</span>[<span class="ruby-identifier">args</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
19
- 130: <span class="ruby-identifier">open_counts</span>[<span class="ruby-identifier">args</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
20
- 131: <span class="ruby-keyword kw">end</span>
21
- 132: <span class="ruby-constant">MongrelDbg</span><span class="ruby-operator">::</span><span class="ruby-identifier">trace</span>(<span class="ruby-identifier">:files</span>, <span class="ruby-identifier">open_counts</span>.<span class="ruby-identifier">to_yaml</span>)
22
- 133: <span class="ruby-keyword kw">end</span>
23
- 134: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel/debug.rb, line 123</span>
14
+ 123: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_open_files</span>
15
+ 124: <span class="ruby-constant">Class</span>.<span class="ruby-identifier">stopit</span> <span class="ruby-keyword kw">do</span>
16
+ 125: <span class="ruby-identifier">open_counts</span> = {}
17
+ 126: <span class="ruby-identifier">$open_files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span>,<span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
18
+ 127: <span class="ruby-identifier">open_counts</span>[<span class="ruby-identifier">args</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
19
+ 128: <span class="ruby-identifier">open_counts</span>[<span class="ruby-identifier">args</span>] <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
20
+ 129: <span class="ruby-keyword kw">end</span>
21
+ 130: <span class="ruby-constant">MongrelDbg</span><span class="ruby-operator">::</span><span class="ruby-identifier">trace</span>(<span class="ruby-identifier">:files</span>, <span class="ruby-identifier">open_counts</span>.<span class="ruby-identifier">to_yaml</span>)
22
+ 131: <span class="ruby-keyword kw">end</span>
23
+ 132: <span class="ruby-keyword kw">end</span></pre>
24
24
  </body>
25
25
  </html>
@@ -132,6 +132,7 @@ Class <a href="Mongrel/Error404Handler.html" class="link">Mongrel::Error404Handl
132
132
  Class <a href="Mongrel/HeaderOut.html" class="link">Mongrel::HeaderOut</a><br />
133
133
  Class <a href="Mongrel/HttpHandler.html" class="link">Mongrel::HttpHandler</a><br />
134
134
  Class <a href="Mongrel/HttpParser.html" class="link">Mongrel::HttpParser</a><br />
135
+ Class <a href="Mongrel/HttpParserError.html" class="link">Mongrel::HttpParserError</a><br />
135
136
  Class <a href="Mongrel/HttpRequest.html" class="link">Mongrel::HttpRequest</a><br />
136
137
  Class <a href="Mongrel/HttpResponse.html" class="link">Mongrel::HttpResponse</a><br />
137
138
  Class <a href="Mongrel/HttpServer.html" class="link">Mongrel::HttpServer</a><br />
@@ -31,7 +31,7 @@
31
31
  52: <span class="ruby-ivar">@opt</span>.<span class="ruby-identifier">on_tail</span>(<span class="ruby-value str">&quot;--version&quot;</span>, <span class="ruby-value str">&quot;Show version&quot;</span>) <span class="ruby-keyword kw">do</span>
32
32
  53: <span class="ruby-ivar">@done_validating</span> = <span class="ruby-keyword kw">true</span>
33
33
  54: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">VERSION</span>
34
- 55: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Version #{VERSION}&quot;</span>
34
+ 55: <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Version #{MONGREL_VERSION}&quot;</span>
35
35
  56: <span class="ruby-keyword kw">end</span>
36
36
  57: <span class="ruby-keyword kw">end</span>
37
37
  58:
@@ -10,15 +10,15 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 586</span>
14
- 586: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">defaults</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 587: <span class="ruby-ivar">@listeners</span> = {}
16
- 588: <span class="ruby-ivar">@defaults</span> = <span class="ruby-identifier">defaults</span>
17
- 589: <span class="ruby-ivar">@needs_restart</span> = <span class="ruby-keyword kw">false</span>
18
- 590:
19
- 591: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
20
- 592: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
21
- 593: <span class="ruby-keyword kw">end</span>
22
- 594: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 589</span>
14
+ 589: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">defaults</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
+ 590: <span class="ruby-ivar">@listeners</span> = {}
16
+ 591: <span class="ruby-ivar">@defaults</span> = <span class="ruby-identifier">defaults</span>
17
+ 592: <span class="ruby-ivar">@needs_restart</span> = <span class="ruby-keyword kw">false</span>
18
+ 593:
19
+ 594: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
20
+ 595: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
21
+ 596: <span class="ruby-keyword kw">end</span>
22
+ 597: <span class="ruby-keyword kw">end</span></pre>
23
23
  </body>
24
24
  </html>
@@ -10,14 +10,14 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 597</span>
14
- 597: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cloaker</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>
15
- 598: (<span class="ruby-keyword kw">class</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
16
- 599: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:cloaker_</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>
17
- 600: <span class="ruby-identifier">meth</span> = <span class="ruby-identifier">instance_method</span>( <span class="ruby-identifier">:cloaker_</span> )
18
- 601: <span class="ruby-identifier">remove_method</span> <span class="ruby-identifier">:cloaker_</span>
19
- 602: <span class="ruby-identifier">meth</span>
20
- 603: <span class="ruby-keyword kw">end</span>
21
- 604: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 600</span>
14
+ 600: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cloaker</span> <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>
15
+ 601: (<span class="ruby-keyword kw">class</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">self</span>; <span class="ruby-keyword kw">end</span>).<span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
16
+ 602: <span class="ruby-identifier">define_method</span> <span class="ruby-identifier">:cloaker_</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>
17
+ 603: <span class="ruby-identifier">meth</span> = <span class="ruby-identifier">instance_method</span>( <span class="ruby-identifier">:cloaker_</span> )
18
+ 604: <span class="ruby-identifier">remove_method</span> <span class="ruby-identifier">:cloaker_</span>
19
+ 605: <span class="ruby-identifier">meth</span>
20
+ 606: <span class="ruby-keyword kw">end</span>
21
+ 607: <span class="ruby-keyword kw">end</span></pre>
22
22
  </body>
23
23
  </html>
@@ -10,9 +10,9 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 608</span>
14
- 608: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
15
- 609: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-ivar">@defaults</span>)
16
- 610: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 611</span>
14
+ 611: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
15
+ 612: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-ivar">@defaults</span>)
16
+ 613: <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -10,23 +10,23 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 624</span>
14
- 624: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listener</span>(<span class="ruby-identifier">options</span>={},<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
- 625: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
- 626: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:num_processors</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">950</span>
17
- 627: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:timeout</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
18
- 628:
19
- 629: <span class="ruby-ivar">@listener</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:host</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:port</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:num_processors</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:timeout</span>].<span class="ruby-identifier">to_i</span>)
20
- 630: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-node">&quot;#{ops[:host]}:#{ops[:port]}&quot;</span>
21
- 631: <span class="ruby-ivar">@listeners</span>[<span class="ruby-ivar">@listener_name</span>] = <span class="ruby-ivar">@listener</span>
22
- 632:
23
- 633: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
24
- 634: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
25
- 635: <span class="ruby-keyword kw">end</span>
26
- 636:
27
- 637: <span class="ruby-comment cmt"># all done processing this listener setup</span>
28
- 638: <span class="ruby-ivar">@listener</span> = <span class="ruby-keyword kw">nil</span>
29
- 639: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-keyword kw">nil</span>
30
- 640: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 627</span>
14
+ 627: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">listener</span>(<span class="ruby-identifier">options</span>={},<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>)
15
+ 628: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
+ 629: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:num_processors</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">950</span>
17
+ 630: <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:timeout</span>] <span class="ruby-operator">||=</span> <span class="ruby-value">0</span>
18
+ 631:
19
+ 632: <span class="ruby-ivar">@listener</span> = <span class="ruby-constant">Mongrel</span><span class="ruby-operator">::</span><span class="ruby-constant">HttpServer</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:host</span>], <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:port</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:num_processors</span>].<span class="ruby-identifier">to_i</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:timeout</span>].<span class="ruby-identifier">to_i</span>)
20
+ 633: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-node">&quot;#{ops[:host]}:#{ops[:port]}&quot;</span>
21
+ 634: <span class="ruby-ivar">@listeners</span>[<span class="ruby-ivar">@listener_name</span>] = <span class="ruby-ivar">@listener</span>
22
+ 635:
23
+ 636: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">blk</span>
24
+ 637: <span class="ruby-identifier">cloaker</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">blk</span>).<span class="ruby-identifier">bind</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">call</span>
25
+ 638: <span class="ruby-keyword kw">end</span>
26
+ 639:
27
+ 640: <span class="ruby-comment cmt"># all done processing this listener setup</span>
28
+ 641: <span class="ruby-ivar">@listener</span> = <span class="ruby-keyword kw">nil</span>
29
+ 642: <span class="ruby-ivar">@listener_name</span> = <span class="ruby-keyword kw">nil</span>
30
+ 643: <span class="ruby-keyword kw">end</span></pre>
31
31
  </body>
32
32
  </html>
@@ -10,10 +10,10 @@
10
10
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 649</span>
14
- 649: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">options</span>={})
15
- 650: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
- 651: <span class="ruby-ivar">@listener</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:handler</span>])
17
- 652: <span class="ruby-keyword kw">end</span></pre>
13
+ <pre> <span class="ruby-comment cmt"># File lib/mongrel.rb, line 652</span>
14
+ 652: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">uri</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">options</span>={})
15
+ 653: <span class="ruby-identifier">ops</span> = <span class="ruby-identifier">resolve_defaults</span>(<span class="ruby-identifier">options</span>)
16
+ 654: <span class="ruby-ivar">@listener</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">location</span>, <span class="ruby-identifier">ops</span>[<span class="ruby-identifier">:handler</span>])
17
+ 655: <span class="ruby-keyword kw">end</span></pre>
18
18
  </body>
19
19
  </html>