passenger 2.2.8 → 2.2.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (64) hide show
  1. data/NEWS +56 -0
  2. data/bin/passenger-install-nginx-module +2 -2
  3. data/doc/Users guide Apache.html +43 -4
  4. data/doc/Users guide Nginx.html +43 -4
  5. data/doc/cxxapi/Bucket_8h-source.html +1 -1
  6. data/doc/cxxapi/Configuration_8h-source.html +1 -1
  7. data/doc/cxxapi/DirectoryMapper_8h-source.html +1 -1
  8. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  9. data/doc/cxxapi/annotated.html +1 -1
  10. data/doc/cxxapi/classHooks-members.html +1 -1
  11. data/doc/cxxapi/classHooks.html +1 -1
  12. data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +1 -1
  13. data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +1 -1
  14. data/doc/cxxapi/classes.html +1 -1
  15. data/doc/cxxapi/definitions_8h-source.html +1 -1
  16. data/doc/cxxapi/files.html +1 -1
  17. data/doc/cxxapi/functions.html +1 -1
  18. data/doc/cxxapi/functions_func.html +1 -1
  19. data/doc/cxxapi/graph_legend.html +1 -1
  20. data/doc/cxxapi/group__Configuration.html +1 -1
  21. data/doc/cxxapi/group__Core.html +1 -1
  22. data/doc/cxxapi/group__Hooks.html +1 -1
  23. data/doc/cxxapi/group__Support.html +1 -1
  24. data/doc/cxxapi/main.html +1 -1
  25. data/doc/cxxapi/modules.html +1 -1
  26. data/doc/rdoc/classes/PhusionPassenger.html +1 -1
  27. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html +247 -0
  28. data/doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html +120 -0
  29. data/doc/rdoc/created.rid +1 -1
  30. data/doc/rdoc/files/DEVELOPERS_TXT.html +1 -1
  31. data/doc/rdoc/files/README.html +1 -1
  32. data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
  33. data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +1 -1
  34. data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +1 -1
  35. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +1 -1
  36. data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +1 -1
  37. data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +1 -1
  38. data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +1 -1
  39. data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +1 -1
  40. data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +1 -1
  41. data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +1 -1
  42. data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +1 -1
  43. data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +1 -1
  44. data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +1 -1
  45. data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +1 -1
  46. data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +1 -1
  47. data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +1 -1
  48. data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +1 -1
  49. data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +1 -1
  50. data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +1 -1
  51. data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +1 -1
  52. data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +1 -1
  53. data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +1 -1
  54. data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +1 -1
  55. data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +1 -1
  56. data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +1 -1
  57. data/doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html +100 -0
  58. data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +1 -1
  59. data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +1 -1
  60. data/doc/rdoc/files/misc/rake/extensions_rb.html +1 -1
  61. data/ext/common/Version.h +1 -1
  62. data/lib/phusion_passenger/constants.rb +1 -1
  63. data/lib/phusion_passenger/railz/application_spawner.rb +19 -4
  64. metadata +5 -2
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Tue Dec 15 11:58:39 -0800 2009</td>
66
+ <td>Fri Jan 08 11:24:07 +0100 2010</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Tue Dec 15 11:58:39 -0800 2009</td>
66
+ <td>Fri Jan 08 11:24:07 +0100 2010</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu Apr 16 10:42:12 -0700 2009</td>
66
+ <td>Thu Apr 16 19:42:12 +0200 2009</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
data/ext/common/Version.h CHANGED
@@ -26,6 +26,6 @@
26
26
  #define _PASSENGER_VERSION_H_
27
27
 
28
28
  /* Don't forget to update lib/phusion_passenger/constants.rb too. */
29
- #define PASSENGER_VERSION "2.2.8"
29
+ #define PASSENGER_VERSION "2.2.9"
30
30
 
31
31
  #endif /* _PASSENGER_VERSION_H */
@@ -24,7 +24,7 @@
24
24
  module PhusionPassenger
25
25
  # Phusion Passenger version number.
26
26
  # Don't forget to edit ext/common/Version.h too.
27
- VERSION_STRING = '2.2.8'
27
+ VERSION_STRING = '2.2.9'
28
28
 
29
29
  DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME = 30 * 60
30
30
  DEFAULT_APP_SPAWNER_MAX_IDLE_TIME = 10 * 60
@@ -328,7 +328,7 @@ private
328
328
  # isn't copy-on-write friendly.
329
329
  # - Rails >= 2.2 already preloads application sources by default, so no need
330
330
  # to do that again.
331
- if GC.copy_on_write_friendly? && !::Rails::Initializer.method_defined?(:load_application_classes)
331
+ if GC.copy_on_write_friendly? && !rails_will_preload_app_code?
332
332
  ['models','controllers','helpers'].each do |section|
333
333
  Dir.glob("app/#{section}}/*.rb").each do |file|
334
334
  require_dependency canonicalize_path(file)
@@ -336,6 +336,14 @@ private
336
336
  end
337
337
  end
338
338
  end
339
+
340
+ def rails_will_preload_app_code?
341
+ if defined?(Rails::Initializer)
342
+ return ::Rails::Initializer.method_defined?(:load_application_classes)
343
+ else
344
+ return defined?(::Rails3)
345
+ end
346
+ end
339
347
 
340
348
  def handle_spawn_application
341
349
  safe_fork('application', true) do
@@ -359,11 +367,18 @@ private
359
367
  $0 = "Rails: #{@app_root}"
360
368
  reader, writer = IO.pipe
361
369
  begin
362
- # Re-establish connection if a connection was established
370
+ # Clear or re-establish connection if a connection was established
363
371
  # in environment.rb. This prevents us from concurrently
364
372
  # accessing the same MySQL connection handle.
365
- if defined?(::ActiveRecord::Base) && ::ActiveRecord::Base.connected?
366
- ::ActiveRecord::Base.establish_connection
373
+ if defined?(::ActiveRecord::Base)
374
+ if ::ActiveRecord::Base.respond_to?(:clear_all_connections!)
375
+ ::ActiveRecord::Base.clear_all_connections!
376
+ elsif ::ActiveRecord::Base.respond_to?(:clear_active_connections!)
377
+ ::ActiveRecord::Base.clear_active_connections!
378
+ elsif ::ActiveRecord::Base.respond_to?(:connected?) &&
379
+ ::ActiveRecord::Base.connected?
380
+ ::ActiveRecord::Base.establish_connection
381
+ end
367
382
  end
368
383
 
369
384
  reader.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.8
4
+ version: 2.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-15 00:00:00 -08:00
12
+ date: 2010-01-08 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -432,6 +432,7 @@ files:
432
432
  - doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html
433
433
  - doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html
434
434
  - doc/rdoc/classes/PhusionPassenger/Utils/PseudoIO.html
435
+ - doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput.html
435
436
  - doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html
436
437
  - doc/rdoc/files/ext/phusion_passenger/native_support_c.html
437
438
  - doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html
@@ -456,6 +457,7 @@ files:
456
457
  - doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html
457
458
  - doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html
458
459
  - doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html
460
+ - doc/rdoc/classes/PhusionPassenger/Utils/RewindableInput/Tempfile.html
459
461
  - doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html
460
462
  - doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html
461
463
  - doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html
@@ -463,6 +465,7 @@ files:
463
465
  - doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html
464
466
  - doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html
465
467
  - doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html
468
+ - doc/rdoc/files/lib/phusion_passenger/utils/rewindable_input_rb.html
466
469
  - doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html
467
470
  - man/passenger-config.1
468
471
  - man/passenger-make-enterprisey.8