passenger 2.1.3 → 2.2.0
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.
- data/DEVELOPERS.TXT +2 -0
- data/INSTALL +3 -1
- data/LICENSE +19 -355
- data/NEWS +3 -0
- data/README +11 -4
- data/Rakefile +435 -236
- data/bin/passenger-config +20 -14
- data/bin/passenger-install-apache2-module +67 -201
- data/bin/passenger-install-nginx-module +477 -0
- data/bin/passenger-make-enterprisey +17 -12
- data/bin/passenger-memory-stats +33 -23
- data/bin/passenger-spawn-server +17 -12
- data/bin/passenger-status +18 -13
- data/bin/passenger-stress-test +17 -12
- data/doc/{Users guide.html → Users guide Apache.html } +79 -61
- data/doc/{Users guide.txt → Users guide Apache.txt } +43 -939
- data/doc/Users guide Nginx.html +2276 -0
- data/doc/Users guide Nginx.txt +776 -0
- data/doc/cxxapi/ApplicationPoolServer_8h-source.html +9 -4
- data/doc/cxxapi/ApplicationPool_8h-source.html +9 -4
- data/doc/cxxapi/Application_8h-source.html +26 -21
- data/doc/cxxapi/Bucket_8h-source.html +54 -44
- data/doc/cxxapi/CachedFileStat_8h-source.html +9 -4
- data/doc/cxxapi/Configuration_8h-source.html +357 -339
- data/doc/cxxapi/DirectoryMapper_8h-source.html +294 -280
- data/doc/cxxapi/DummySpawnManager_8h-source.html +9 -4
- data/doc/cxxapi/Exceptions_8h-source.html +9 -4
- data/doc/cxxapi/FileChecker_8h-source.html +9 -4
- data/doc/cxxapi/Hooks_8h-source.html +50 -40
- data/doc/cxxapi/Logging_8h-source.html +9 -4
- data/doc/cxxapi/MessageChannel_8h-source.html +20 -15
- data/doc/cxxapi/PoolOptions_8h-source.html +10 -5
- data/doc/cxxapi/SpawnManager_8h-source.html +9 -4
- data/doc/cxxapi/StandardApplicationPool_8h-source.html +10 -5
- data/doc/cxxapi/SystemTime_8h-source.html +9 -4
- data/doc/cxxapi/Utils_8h-source.html +242 -214
- data/doc/cxxapi/annotated.html +4 -28
- data/doc/cxxapi/classClient-members.html +4 -4
- data/doc/cxxapi/classClient.html +14 -11
- data/doc/cxxapi/classHooks-members.html +4 -5
- data/doc/cxxapi/classHooks.html +26 -24
- data/doc/cxxapi/classPassenger_1_1Application-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1Application.html +40 -37
- data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +95 -92
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +26 -23
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +17 -17
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +139 -136
- data/doc/cxxapi/classPassenger_1_1BufferedUpload-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1BufferedUpload.html +13 -10
- data/doc/cxxapi/classPassenger_1_1BusyException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1BusyException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +4 -5
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +45 -43
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +13 -10
- data/doc/cxxapi/classPassenger_1_1FileChecker-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileChecker.html +22 -19
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +12 -9
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1FileSystemException.html +14 -11
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1IOException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1IOException.html +12 -9
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1MessageChannel.html +228 -225
- data/doc/cxxapi/classPassenger_1_1RuntimeException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1RuntimeException.html +11 -8
- data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SpawnException.html +14 -11
- data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SpawnManager.html +50 -47
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +73 -70
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemException-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SystemException.html +17 -14
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.map +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.md5 +1 -1
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemTime-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1SystemTime.html +14 -11
- data/doc/cxxapi/classes.html +35 -0
- data/doc/cxxapi/definitions_8h-source.html +9 -4
- data/doc/cxxapi/doxygen.css +311 -303
- data/doc/cxxapi/files.html +9 -18
- data/doc/cxxapi/functions.html +5 -224
- data/doc/cxxapi/functions_func.html +5 -185
- data/doc/cxxapi/functions_type.html +4 -4
- data/doc/cxxapi/functions_vars.html +4 -4
- data/doc/cxxapi/graph_legend.dot +19 -19
- data/doc/cxxapi/graph_legend.html +5 -5
- data/doc/cxxapi/graph_legend.png +0 -0
- data/doc/cxxapi/group__Configuration.html +11 -13
- data/doc/cxxapi/group__Configuration.png +0 -0
- data/doc/cxxapi/group__Core.html +10 -12
- data/doc/cxxapi/group__Core.png +0 -0
- data/doc/cxxapi/group__Exceptions.html +5 -7
- data/doc/cxxapi/group__Hooks.html +5 -7
- data/doc/cxxapi/group__Hooks.png +0 -0
- data/doc/cxxapi/group__Support.html +5 -624
- data/doc/cxxapi/hierarchy.html +6 -6
- data/doc/cxxapi/inherit__graph__0.map +1 -1
- data/doc/cxxapi/inherit__graph__0.md5 +1 -1
- data/doc/cxxapi/inherit__graph__0.png +0 -0
- data/doc/cxxapi/inherit__graph__1.map +1 -1
- data/doc/cxxapi/inherit__graph__1.md5 +1 -1
- data/doc/cxxapi/inherit__graph__1.png +0 -0
- data/doc/cxxapi/inherit__graph__10.map +1 -1
- data/doc/cxxapi/inherit__graph__10.md5 +1 -1
- data/doc/cxxapi/inherit__graph__10.png +0 -0
- data/doc/cxxapi/inherit__graph__11.map +1 -1
- data/doc/cxxapi/inherit__graph__11.md5 +1 -1
- data/doc/cxxapi/inherit__graph__11.png +0 -0
- data/doc/cxxapi/inherit__graph__12.map +1 -1
- data/doc/cxxapi/inherit__graph__12.md5 +1 -1
- data/doc/cxxapi/inherit__graph__12.png +0 -0
- data/doc/cxxapi/inherit__graph__13.map +1 -2
- data/doc/cxxapi/inherit__graph__13.md5 +1 -1
- data/doc/cxxapi/inherit__graph__13.png +0 -0
- data/doc/cxxapi/inherit__graph__14.map +2 -1
- data/doc/cxxapi/inherit__graph__14.md5 +1 -1
- data/doc/cxxapi/inherit__graph__14.png +0 -0
- data/doc/cxxapi/inherit__graph__15.map +1 -1
- data/doc/cxxapi/inherit__graph__15.md5 +1 -1
- data/doc/cxxapi/inherit__graph__15.png +0 -0
- data/doc/cxxapi/inherit__graph__16.map +1 -1
- data/doc/cxxapi/inherit__graph__16.md5 +1 -1
- data/doc/cxxapi/inherit__graph__16.png +0 -0
- data/doc/cxxapi/inherit__graph__17.map +1 -1
- data/doc/cxxapi/inherit__graph__17.md5 +1 -1
- data/doc/cxxapi/inherit__graph__17.png +0 -0
- data/doc/cxxapi/inherit__graph__18.map +1 -1
- data/doc/cxxapi/inherit__graph__18.md5 +1 -1
- data/doc/cxxapi/inherit__graph__18.png +0 -0
- data/doc/cxxapi/inherit__graph__19.map +1 -1
- data/doc/cxxapi/inherit__graph__19.md5 +1 -1
- data/doc/cxxapi/inherit__graph__19.png +0 -0
- data/doc/cxxapi/inherit__graph__2.map +1 -1
- data/doc/cxxapi/inherit__graph__2.md5 +1 -1
- data/doc/cxxapi/inherit__graph__2.png +0 -0
- data/doc/cxxapi/inherit__graph__20.map +2 -2
- data/doc/cxxapi/inherit__graph__20.md5 +1 -1
- data/doc/cxxapi/inherit__graph__20.png +0 -0
- data/doc/cxxapi/inherit__graph__21.map +1 -1
- data/doc/cxxapi/inherit__graph__21.md5 +1 -1
- data/doc/cxxapi/inherit__graph__21.png +0 -0
- data/doc/cxxapi/inherit__graph__3.map +1 -1
- data/doc/cxxapi/inherit__graph__3.md5 +1 -1
- data/doc/cxxapi/inherit__graph__3.png +0 -0
- data/doc/cxxapi/inherit__graph__4.map +1 -1
- data/doc/cxxapi/inherit__graph__4.md5 +1 -1
- data/doc/cxxapi/inherit__graph__4.png +0 -0
- data/doc/cxxapi/inherit__graph__5.map +1 -2
- data/doc/cxxapi/inherit__graph__5.md5 +1 -1
- data/doc/cxxapi/inherit__graph__5.png +0 -0
- data/doc/cxxapi/inherit__graph__6.map +2 -1
- data/doc/cxxapi/inherit__graph__6.md5 +1 -1
- data/doc/cxxapi/inherit__graph__6.png +0 -0
- data/doc/cxxapi/inherit__graph__7.map +1 -1
- data/doc/cxxapi/inherit__graph__7.md5 +1 -1
- data/doc/cxxapi/inherit__graph__7.png +0 -0
- data/doc/cxxapi/inherit__graph__8.map +1 -1
- data/doc/cxxapi/inherit__graph__8.md5 +1 -1
- data/doc/cxxapi/inherit__graph__8.png +0 -0
- data/doc/cxxapi/inherit__graph__9.map +1 -1
- data/doc/cxxapi/inherit__graph__9.md5 +1 -1
- data/doc/cxxapi/inherit__graph__9.png +0 -0
- data/doc/cxxapi/inherits.html +41 -41
- data/doc/cxxapi/main.html +4 -4
- data/doc/cxxapi/modules.html +4 -5
- data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +4 -4
- data/doc/cxxapi/structPassenger_1_1AnythingToString.html +13 -10
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +5 -5
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +16 -13
- data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +4 -4
- data/doc/cxxapi/structPassenger_1_1PoolOptions.html +63 -60
- data/doc/cxxapi/tabs.css +5 -2
- data/doc/cxxapi/tree.html +7 -81
- data/doc/rdoc/classes/ConditionVariable.html +59 -59
- data/doc/rdoc/classes/Exception.html +11 -11
- data/doc/rdoc/classes/GC.html +4 -4
- data/doc/rdoc/classes/IO.html +14 -14
- data/doc/rdoc/classes/PhusionPassenger.html +75 -20
- data/doc/rdoc/classes/PhusionPassenger/AbstractInstaller.html +153 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +125 -130
- data/doc/rdoc/classes/PhusionPassenger/AbstractServer.html +236 -236
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +213 -213
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +28 -28
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +91 -75
- data/doc/rdoc/classes/PhusionPassenger/AppInitError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/Application.html +64 -64
- data/doc/rdoc/classes/PhusionPassenger/ConsoleTextTemplate.html +34 -34
- data/doc/rdoc/classes/PhusionPassenger/FrameworkInitError.html +13 -13
- data/doc/rdoc/classes/PhusionPassenger/HTMLTemplate.html +30 -30
- data/doc/rdoc/classes/PhusionPassenger/InitializationError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/MessageChannel.html +136 -136
- data/doc/rdoc/classes/PhusionPassenger/NativeSupport.html +24 -24
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +42 -42
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +55 -53
- data/doc/rdoc/classes/PhusionPassenger/Railz.html +1 -1
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +25 -30
- data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +23 -23
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +116 -117
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +22 -22
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +118 -124
- data/doc/rdoc/classes/PhusionPassenger/UnknownError.html +10 -10
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +354 -354
- data/doc/rdoc/classes/PhusionPassenger/VersionNotFound.html +9 -9
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +37 -37
- data/doc/rdoc/classes/PlatformInfo.html +282 -261
- data/doc/rdoc/classes/RakeExtensions.html +7 -7
- data/doc/rdoc/classes/Signal.html +26 -26
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/DEVELOPERS_TXT.html +6 -1
- data/doc/rdoc/files/README.html +15 -6
- data/doc/rdoc/files/ext/phusion_passenger/native_support_c.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/abstract_installer_rb.html +129 -0
- data/doc/rdoc/files/lib/phusion_passenger/abstract_request_handler_rb.html +20 -13
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +31 -1
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +31 -1
- data/doc/rdoc/files/lib/phusion_passenger/application_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/console_text_template_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/constants_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/dependencies_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/exceptions_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/html_template_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/message_channel_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/packaging_rb.html +122 -0
- data/doc/rdoc/files/lib/phusion_passenger/platform_info_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +22 -12
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/railz/application_spawner_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +1 -1
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +21 -12
- data/doc/rdoc/files/lib/phusion_passenger/simple_benchmarking_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/spawn_manager_rb.html +19 -13
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +27 -21
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +21 -12
- data/doc/rdoc/files/misc/rake/extensions_rb.html +21 -12
- data/doc/rdoc/fr_class_index.html +1 -0
- data/doc/rdoc/fr_file_index.html +2 -0
- data/doc/rdoc/fr_method_index.html +116 -112
- data/doc/users_guide_snippets/analysis_and_system_maintenance_tools.txt +144 -0
- data/doc/users_guide_snippets/appendix_a_about.txt +13 -0
- data/doc/users_guide_snippets/appendix_b_terminology.txt +63 -0
- data/doc/users_guide_snippets/appendix_c_spawning_methods.txt +304 -0
- data/doc/users_guide_snippets/global_queueing_explained.txt +78 -0
- data/doc/users_guide_snippets/rackup_specifications.txt +75 -0
- data/doc/users_guide_snippets/rails_spawn_method.txt +48 -0
- data/doc/users_guide_snippets/tips.txt +173 -0
- data/ext/apache2/Bucket.cpp +17 -12
- data/ext/apache2/Bucket.h +17 -12
- data/ext/apache2/Configuration.cpp +17 -12
- data/ext/apache2/Configuration.h +27 -14
- data/ext/apache2/DirectoryMapper.h +21 -12
- data/ext/apache2/Hooks.cpp +67 -21
- data/ext/apache2/Hooks.h +17 -12
- data/ext/apache2/mod_passenger.c +17 -12
- data/ext/{apache2 → common}/Application.h +19 -14
- data/ext/{apache2 → common}/ApplicationPool.h +17 -12
- data/ext/{apache2 → common}/ApplicationPoolServer.h +18 -72
- data/ext/{apache2 → common}/ApplicationPoolServerExecutable.cpp +45 -104
- data/ext/common/ApplicationPoolStatusReporter.h +212 -0
- data/ext/{apache2 → common}/CachedFileStat.cpp +17 -12
- data/ext/{apache2 → common}/CachedFileStat.h +17 -12
- data/ext/{apache2 → common}/DummySpawnManager.h +17 -12
- data/ext/{apache2 → common}/Exceptions.h +17 -12
- data/ext/{apache2 → common}/FileChecker.h +17 -12
- data/ext/common/Logging.cpp +65 -0
- data/ext/{apache2 → common}/Logging.h +17 -12
- data/ext/{apache2 → common}/MessageChannel.h +17 -12
- data/ext/{apache2 → common}/PoolOptions.h +17 -12
- data/ext/{apache2 → common}/SpawnManager.h +17 -12
- data/ext/{apache2 → common}/StandardApplicationPool.h +17 -12
- data/ext/common/StaticString.h +147 -0
- data/ext/common/SystemTime.cpp +33 -0
- data/ext/{apache2 → common}/SystemTime.h +17 -12
- data/ext/{apache2 → common}/Utils.cpp +69 -12
- data/ext/{apache2 → common}/Utils.h +41 -12
- data/ext/nginx/Configuration.c +1091 -0
- data/ext/nginx/Configuration.h +71 -0
- data/ext/nginx/ContentHandler.c +1154 -0
- data/ext/nginx/ContentHandler.h +64 -0
- data/ext/nginx/HelperServer.cpp +857 -0
- data/ext/nginx/HttpStatusExtractor.h +161 -0
- data/ext/nginx/ScgiRequestParser.h +317 -0
- data/ext/nginx/StaticContentHandler.c +222 -0
- data/ext/nginx/StaticContentHandler.h +37 -0
- data/ext/nginx/config +41 -0
- data/ext/nginx/ngx_http_passenger_module.c +572 -0
- data/ext/nginx/ngx_http_passenger_module.h +72 -0
- data/ext/oxt/backtrace.cpp +8 -1
- data/ext/oxt/system_calls.cpp +40 -0
- data/ext/oxt/system_calls.hpp +14 -7
- data/ext/phusion_passenger/extconf.rb +17 -12
- data/ext/phusion_passenger/native_support.c +19 -12
- data/lib/phusion_passenger/abstract_installer.rb +196 -0
- data/lib/phusion_passenger/abstract_request_handler.rb +19 -24
- data/lib/phusion_passenger/abstract_server.rb +17 -12
- data/lib/phusion_passenger/abstract_server_collection.rb +17 -12
- data/lib/phusion_passenger/admin_tools.rb +23 -0
- data/lib/phusion_passenger/admin_tools/control_process.rb +39 -13
- data/lib/phusion_passenger/application.rb +17 -12
- data/lib/phusion_passenger/console_text_template.rb +17 -12
- data/lib/phusion_passenger/constants.rb +22 -11
- data/lib/phusion_passenger/dependencies.rb +47 -12
- data/lib/phusion_passenger/events.rb +17 -12
- data/lib/phusion_passenger/exceptions.rb +17 -12
- data/lib/phusion_passenger/html_template.rb +17 -12
- data/lib/phusion_passenger/message_channel.rb +17 -12
- data/lib/phusion_passenger/packaging.rb +39 -0
- data/lib/phusion_passenger/platform_info.rb +48 -22
- data/lib/phusion_passenger/rack/application_spawner.rb +22 -11
- data/lib/phusion_passenger/rack/request_handler.rb +21 -12
- data/lib/phusion_passenger/railz/application_spawner.rb +23 -23
- data/lib/phusion_passenger/railz/framework_spawner.rb +18 -14
- data/lib/phusion_passenger/railz/request_handler.rb +18 -11
- data/lib/phusion_passenger/simple_benchmarking.rb +17 -12
- data/lib/phusion_passenger/spawn_manager.rb +17 -20
- data/lib/phusion_passenger/templates/{apache_must_be_compiled_with_compatible_mpm.txt.erb → apache2/apache_must_be_compiled_with_compatible_mpm.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{apache2_config_snippets.txt.erb → apache2/config_snippets.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{deployment_example.txt.erb → apache2/deployment_example.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{no_write_permission_to_passenger_root.txt.erb → apache2/no_write_permission_to_passenger_root.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{possible_solutions_for_compilation_and_installation_problems.txt.erb → apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{run_installer_as_root.txt.erb → apache2/run_installer_as_root.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/{welcome.txt.erb → apache2/welcome.txt.erb} +0 -0
- data/lib/phusion_passenger/templates/nginx/ask_for_extra_configure_flags.txt.erb +8 -0
- data/lib/phusion_passenger/templates/nginx/cannot_write_to_dir.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/config_snippets.txt.erb +17 -0
- data/lib/phusion_passenger/templates/nginx/config_snippets_inserted.txt.erb +20 -0
- data/lib/phusion_passenger/templates/nginx/confirm_extra_configure_flags.txt.erb +5 -0
- data/lib/phusion_passenger/templates/nginx/deployment_example.txt.erb +22 -0
- data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_downloaded.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/pcre_could_not_be_extracted.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +11 -0
- data/lib/phusion_passenger/templates/nginx/possible_solutions_for_download_and_extraction_problems.txt.erb +20 -0
- data/lib/phusion_passenger/templates/nginx/query_download_and_install.txt.erb +21 -0
- data/lib/phusion_passenger/templates/nginx/run_installer_as_root.txt.erb +8 -0
- data/lib/phusion_passenger/templates/nginx/welcome.txt.erb +15 -0
- data/lib/phusion_passenger/utils.rb +20 -15
- data/lib/phusion_passenger/wsgi/application_spawner.rb +18 -11
- data/lib/phusion_passenger/wsgi/request_handler.py +23 -0
- data/misc/copy_boost_headers.rb +23 -0
- data/misc/find_owner_pipe_leaks.rb +18 -11
- data/misc/rake/cplusplus.rb +18 -11
- data/misc/rake/extensions.rb +21 -14
- data/misc/render_error_pages.rb +18 -11
- data/test/ApplicationPoolServerTest.cpp +1 -3
- data/test/ApplicationPoolServer_ApplicationPoolTest.cpp +1 -1
- data/test/CxxTestMain.cpp +19 -3
- data/test/HttpStatusExtractorTest.cpp +181 -0
- data/test/ScgiRequestParserTest.cpp +337 -0
- data/test/StaticStringTest.cpp +51 -0
- data/test/UtilsTest.cpp +32 -0
- data/test/config.yml.example +5 -0
- data/test/{integration_tests.rb → integration_tests/apache2_tests.rb} +7 -299
- data/test/integration_tests/hello_world_rack_spec.rb +36 -0
- data/test/integration_tests/hello_world_wsgi_spec.rb +41 -0
- data/test/integration_tests/mycook_spec.rb +192 -0
- data/test/integration_tests/nginx_tests.rb +98 -0
- data/test/ruby/rack/application_spawner_spec.rb +40 -0
- data/test/stub/nginx/koi-utf +109 -0
- data/test/stub/nginx/koi-win +103 -0
- data/test/stub/nginx/mime.types +70 -0
- data/test/stub/nginx/nginx.conf.erb +57 -0
- data/test/stub/nginx/win-utf +126 -0
- data/test/stub/rails_apps/mycook/app/controllers/uploads_controller.rb +4 -0
- data/test/stub/rails_apps/mycook/config/routes.rb +1 -1
- data/test/stub/wsgi/passenger_wsgi.pyc +0 -0
- data/test/support/Support.h +40 -0
- data/test/support/nginx_controller.rb +98 -0
- data/test/support/test_helper.rb +79 -0
- metadata +1091 -1028
- data/benchmark/DummyRequestHandler.cpp +0 -101
- data/ext/apache2/Logging.cpp +0 -60
- data/ext/apache2/SystemTime.cpp +0 -28
@@ -75,8 +75,8 @@
|
|
75
75
|
|
76
76
|
<div class="sectiontitle">Methods</div>
|
77
77
|
<ul>
|
78
|
-
<li><a href="#
|
79
|
-
<li><a href="#
|
78
|
+
<li><a href="#M000065">process_is_alive?</a></li>
|
79
|
+
<li><a href="#M000064">tmpdir</a></li>
|
80
80
|
</ul>
|
81
81
|
|
82
82
|
|
@@ -90,44 +90,44 @@
|
|
90
90
|
<div class="sectiontitle">Public Class methods</div>
|
91
91
|
<div class="method">
|
92
92
|
<div class="title">
|
93
|
-
<a name="
|
93
|
+
<a name="M000065"></a><b>process_is_alive?</b>(pid)
|
94
94
|
</div>
|
95
95
|
<div class="sourcecode">
|
96
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
97
|
-
<div id="
|
96
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000065_source')" id="l_M000065_source">show source</a> ]</p>
|
97
|
+
<div id="M000065_source" class="dyn-source">
|
98
98
|
<pre>
|
99
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools.rb, line
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
99
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools.rb, line 36</span>
|
100
|
+
36: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">process_is_alive?</span>(<span class="ruby-identifier">pid</span>)
|
101
|
+
37: <span class="ruby-keyword kw">begin</span>
|
102
|
+
38: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">kill</span>(<span class="ruby-value">0</span>, <span class="ruby-identifier">pid</span>)
|
103
|
+
39: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
104
|
+
40: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Errno</span><span class="ruby-operator">::</span><span class="ruby-constant">ESRCH</span>
|
105
|
+
41: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">false</span>
|
106
|
+
42: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SystemCallError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
107
|
+
43: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span>
|
108
|
+
44: <span class="ruby-keyword kw">end</span>
|
109
|
+
45: <span class="ruby-keyword kw">end</span>
|
110
110
|
</pre>
|
111
111
|
</div>
|
112
112
|
</div>
|
113
113
|
</div>
|
114
114
|
<div class="method">
|
115
115
|
<div class="title">
|
116
|
-
<a name="
|
116
|
+
<a name="M000064"></a><b>tmpdir</b>()
|
117
117
|
</div>
|
118
118
|
<div class="sourcecode">
|
119
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
120
|
-
<div id="
|
119
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000064_source')" id="l_M000064_source">show source</a> ]</p>
|
120
|
+
<div id="M000064_source" class="dyn-source">
|
121
121
|
<pre>
|
122
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools.rb, line
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
122
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools.rb, line 27</span>
|
123
|
+
27: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">tmpdir</span>
|
124
|
+
28: [<span class="ruby-value str">"PASSENGER_TEMP_DIR"</span>, <span class="ruby-value str">"PASSENGER_TMPDIR"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
125
|
+
29: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">ENV</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">&&</span> <span class="ruby-operator">!</span><span class="ruby-constant">ENV</span>[<span class="ruby-identifier">name</span>].<span class="ruby-identifier">empty?</span>
|
126
|
+
30: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-identifier">name</span>]
|
127
|
+
31: <span class="ruby-keyword kw">end</span>
|
128
|
+
32: <span class="ruby-keyword kw">end</span>
|
129
|
+
33: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"/tmp"</span>
|
130
|
+
34: <span class="ruby-keyword kw">end</span>
|
131
131
|
</pre>
|
132
132
|
</div>
|
133
133
|
</div>
|
@@ -80,12 +80,13 @@ Object
|
|
80
80
|
|
81
81
|
<div class="sectiontitle">Methods</div>
|
82
82
|
<ul>
|
83
|
-
<li><a href="#
|
84
|
-
<li><a href="#
|
85
|
-
<li><a href="#
|
86
|
-
<li><a href="#M000066">
|
87
|
-
<li><a href="#
|
88
|
-
<li><a href="#
|
83
|
+
<li><a href="#M000071">domains</a></li>
|
84
|
+
<li><a href="#M000067">for_pid</a></li>
|
85
|
+
<li><a href="#M000072">instances</a></li>
|
86
|
+
<li><a href="#M000066">list</a></li>
|
87
|
+
<li><a href="#M000068">new</a></li>
|
88
|
+
<li><a href="#M000069">status</a></li>
|
89
|
+
<li><a href="#M000070">xml</a></li>
|
89
90
|
</ul>
|
90
91
|
|
91
92
|
|
@@ -116,56 +117,71 @@ Object
|
|
116
117
|
<div class="sectiontitle">Public Class methods</div>
|
117
118
|
<div class="method">
|
118
119
|
<div class="title">
|
119
|
-
<a name="
|
120
|
+
<a name="M000067"></a><b>for_pid</b>(pid)
|
120
121
|
</div>
|
121
122
|
<div class="sourcecode">
|
122
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
123
|
-
<div id="
|
123
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000067_source')" id="l_M000067_source">show source</a> ]</p>
|
124
|
+
<div id="M000067_source" class="dyn-source">
|
124
125
|
<pre>
|
125
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
21: <span class="ruby-identifier">dir</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/passenger.(\d+)\Z/</span>
|
130
|
-
22: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$1</span>
|
131
|
-
23: <span class="ruby-identifier">pid</span> = <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">to_i</span>
|
132
|
-
24: <span class="ruby-keyword kw">begin</span>
|
133
|
-
25: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">ControlProcess</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">pid</span>, <span class="ruby-identifier">dir</span>)
|
134
|
-
26: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span>
|
135
|
-
27: <span class="ruby-comment cmt"># Stale Passenger temp folder. Clean it up if instructed.</span>
|
136
|
-
28: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">clean_stale</span>
|
137
|
-
29: <span class="ruby-identifier">puts</span> <span class="ruby-node">"*** Cleaning stale folder #{dir}"</span>
|
138
|
-
30: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">chmod_R</span>(<span class="ruby-value">0700</span>, <span class="ruby-identifier">dir</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">dir</span>)
|
139
|
-
31: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">dir</span>)
|
140
|
-
32: <span class="ruby-keyword kw">end</span>
|
141
|
-
33: <span class="ruby-keyword kw">end</span>
|
142
|
-
34: <span class="ruby-keyword kw">end</span>
|
143
|
-
35: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
|
144
|
-
36: <span class="ruby-keyword kw">end</span>
|
126
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line 59</span>
|
127
|
+
59: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">for_pid</span>(<span class="ruby-identifier">pid</span>)
|
128
|
+
60: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">list</span>(<span class="ruby-keyword kw">false</span>).<span class="ruby-identifier">find</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">pid</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">pid</span> }
|
129
|
+
61: <span class="ruby-keyword kw">end</span>
|
145
130
|
</pre>
|
146
131
|
</div>
|
147
132
|
</div>
|
148
133
|
</div>
|
149
134
|
<div class="method">
|
150
135
|
<div class="title">
|
151
|
-
<a name="M000066"></a><b>
|
136
|
+
<a name="M000066"></a><b>list</b>(clean_stale = true)
|
152
137
|
</div>
|
153
138
|
<div class="sourcecode">
|
154
139
|
<p class="source-link">[ <a href="javascript:toggleSource('M000066_source')" id="l_M000066_source">show source</a> ]</p>
|
155
140
|
<div id="M000066_source" class="dyn-source">
|
156
141
|
<pre>
|
157
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
142
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line 41</span>
|
143
|
+
41: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">list</span>(<span class="ruby-identifier">clean_stale</span> = <span class="ruby-keyword kw">true</span>)
|
144
|
+
42: <span class="ruby-identifier">results</span> = []
|
145
|
+
43: <span class="ruby-constant">Dir</span>[<span class="ruby-node">"#{AdminTools.tmpdir}/passenger.*"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span>
|
146
|
+
44: <span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">dir</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/passenger.(\d+)\Z/</span>
|
147
|
+
45: <span class="ruby-keyword kw">begin</span>
|
148
|
+
46: <span class="ruby-identifier">results</span> <span class="ruby-operator"><<</span> <span class="ruby-constant">ControlProcess</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">dir</span>)
|
149
|
+
47: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span>
|
150
|
+
48: <span class="ruby-comment cmt"># Stale Passenger temp folder. Clean it up if instructed.</span>
|
151
|
+
49: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">clean_stale</span>
|
152
|
+
50: <span class="ruby-identifier">puts</span> <span class="ruby-node">"*** Cleaning stale folder #{dir}"</span>
|
153
|
+
51: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">chmod_R</span>(<span class="ruby-value">0700</span>, <span class="ruby-identifier">dir</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
154
|
+
52: <span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">rm_rf</span>(<span class="ruby-identifier">dir</span>)
|
155
|
+
53: <span class="ruby-keyword kw">end</span>
|
156
|
+
54: <span class="ruby-keyword kw">end</span>
|
157
|
+
55: <span class="ruby-keyword kw">end</span>
|
158
|
+
56: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">results</span>
|
159
|
+
57: <span class="ruby-keyword kw">end</span>
|
160
|
+
</pre>
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
<div class="method">
|
165
|
+
<div class="title">
|
166
|
+
<a name="M000068"></a><b>new</b>(path)
|
167
|
+
</div>
|
168
|
+
<div class="sourcecode">
|
169
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000068_source')" id="l_M000068_source">show source</a> ]</p>
|
170
|
+
<div id="M000068_source" class="dyn-source">
|
171
|
+
<pre>
|
172
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line 63</span>
|
173
|
+
63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">path</span>)
|
174
|
+
64: <span class="ruby-ivar">@path</span> = <span class="ruby-identifier">path</span>
|
175
|
+
65: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-node">"#{path}/control_process.pid"</span>)
|
176
|
+
66: <span class="ruby-ivar">@pid</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">"#{path}/control_process.pid"</span>).<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">to_i</span>
|
177
|
+
67: <span class="ruby-keyword kw">else</span>
|
178
|
+
68: <span class="ruby-identifier">path</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/passenger.(\d+)\Z/</span>
|
179
|
+
69: <span class="ruby-ivar">@pid</span> = <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">to_i</span>
|
180
|
+
70: <span class="ruby-keyword kw">end</span>
|
181
|
+
71: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-constant">AdminTools</span>.<span class="ruby-identifier">process_is_alive?</span>(<span class="ruby-ivar">@pid</span>)
|
182
|
+
72: <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>, <span class="ruby-node">"There is no control process with PID #{@pid}."</span>
|
183
|
+
73: <span class="ruby-keyword kw">end</span>
|
184
|
+
74: <span class="ruby-keyword kw">end</span>
|
169
185
|
</pre>
|
170
186
|
</div>
|
171
187
|
</div>
|
@@ -173,69 +189,69 @@ Object
|
|
173
189
|
<div class="sectiontitle">Public Instance methods</div>
|
174
190
|
<div class="method">
|
175
191
|
<div class="title">
|
176
|
-
<a name="
|
192
|
+
<a name="M000071"></a><b>domains</b>()
|
177
193
|
</div>
|
178
194
|
<div class="sourcecode">
|
179
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
180
|
-
<div id="
|
195
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000071_source')" id="l_M000071_source">show source</a> ]</p>
|
196
|
+
<div id="M000071_source" class="dyn-source">
|
181
197
|
<pre>
|
182
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
198
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line 86</span>
|
199
|
+
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">domains</span>
|
200
|
+
87: <span class="ruby-identifier">reload</span>
|
201
|
+
88: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@domains</span>
|
202
|
+
89: <span class="ruby-keyword kw">end</span>
|
187
203
|
</pre>
|
188
204
|
</div>
|
189
205
|
</div>
|
190
206
|
</div>
|
191
207
|
<div class="method">
|
192
208
|
<div class="title">
|
193
|
-
<a name="
|
209
|
+
<a name="M000072"></a><b>instances</b>()
|
194
210
|
</div>
|
195
211
|
<div class="sourcecode">
|
196
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
197
|
-
<div id="
|
212
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000072_source')" id="l_M000072_source">show source</a> ]</p>
|
213
|
+
<div id="M000072_source" class="dyn-source">
|
198
214
|
<pre>
|
199
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
215
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line 91</span>
|
216
|
+
91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">instances</span>
|
217
|
+
92: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">domains</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">domain</span><span class="ruby-operator">|</span>
|
218
|
+
93: <span class="ruby-identifier">domain</span>[<span class="ruby-identifier">:instances</span>]
|
219
|
+
94: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">flatten</span>
|
220
|
+
95: <span class="ruby-keyword kw">end</span>
|
205
221
|
</pre>
|
206
222
|
</div>
|
207
223
|
</div>
|
208
224
|
</div>
|
209
225
|
<div class="method">
|
210
226
|
<div class="title">
|
211
|
-
<a name="
|
227
|
+
<a name="M000069"></a><b>status</b>()
|
212
228
|
</div>
|
213
229
|
<div class="sourcecode">
|
214
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
215
|
-
<div id="
|
230
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000069_source')" id="l_M000069_source">show source</a> ]</p>
|
231
|
+
<div id="M000069_source" class="dyn-source">
|
216
232
|
<pre>
|
217
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
233
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line 76</span>
|
234
|
+
76: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span>
|
235
|
+
77: <span class="ruby-identifier">reload</span>
|
236
|
+
78: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@status</span>
|
237
|
+
79: <span class="ruby-keyword kw">end</span>
|
222
238
|
</pre>
|
223
239
|
</div>
|
224
240
|
</div>
|
225
241
|
</div>
|
226
242
|
<div class="method">
|
227
243
|
<div class="title">
|
228
|
-
<a name="
|
244
|
+
<a name="M000070"></a><b>xml</b>()
|
229
245
|
</div>
|
230
246
|
<div class="sourcecode">
|
231
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
232
|
-
<div id="
|
247
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000070_source')" id="l_M000070_source">show source</a> ]</p>
|
248
|
+
<div id="M000070_source" class="dyn-source">
|
233
249
|
<pre>
|
234
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
250
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/admin_tools/control_process.rb, line 81</span>
|
251
|
+
81: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">xml</span>
|
252
|
+
82: <span class="ruby-identifier">reload</span>
|
253
|
+
83: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@xml</span>
|
254
|
+
84: <span class="ruby-keyword kw">end</span>
|
239
255
|
</pre>
|
240
256
|
</div>
|
241
257
|
</div>
|
@@ -96,7 +96,7 @@ instance of <tt>SystemExit</tt>.
|
|
96
96
|
|
97
97
|
<div class="sectiontitle">Methods</div>
|
98
98
|
<ul>
|
99
|
-
<li><a href="#
|
99
|
+
<li><a href="#M000091">new</a></li>
|
100
100
|
</ul>
|
101
101
|
|
102
102
|
|
@@ -130,18 +130,18 @@ Any messages printed to stderr before the failure. May be nil.
|
|
130
130
|
<div class="sectiontitle">Public Class methods</div>
|
131
131
|
<div class="method">
|
132
132
|
<div class="title">
|
133
|
-
<a name="
|
133
|
+
<a name="M000091"></a><b>new</b>(message, child_exception = nil, app_type = "rails", stderr = nil)
|
134
134
|
</div>
|
135
135
|
<div class="sourcecode">
|
136
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
137
|
-
<div id="
|
136
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000091_source')" id="l_M000091_source">show source</a> ]</p>
|
137
|
+
<div id="M000091_source" class="dyn-source">
|
138
138
|
<pre>
|
139
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
139
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 66</span>
|
140
|
+
66: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">app_type</span> = <span class="ruby-value str">"rails"</span>, <span class="ruby-identifier">stderr</span> = <span class="ruby-keyword kw">nil</span>)
|
141
|
+
67: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">child_exception</span>)
|
142
|
+
68: <span class="ruby-ivar">@app_type</span> = <span class="ruby-identifier">app_type</span>
|
143
|
+
69: <span class="ruby-ivar">@stderr</span> = <span class="ruby-identifier">stderr</span>
|
144
|
+
70: <span class="ruby-keyword kw">end</span>
|
145
145
|
</pre>
|
146
146
|
</div>
|
147
147
|
</div>
|
@@ -84,9 +84,9 @@ Represents a single application instance.
|
|
84
84
|
|
85
85
|
<div class="sectiontitle">Methods</div>
|
86
86
|
<ul>
|
87
|
-
<li><a href="#
|
88
|
-
<li><a href="#
|
89
|
-
<li><a href="#
|
87
|
+
<li><a href="#M000111">close</a></li>
|
88
|
+
<li><a href="#M000109">detect_framework_version</a></li>
|
89
|
+
<li><a href="#M000110">new</a></li>
|
90
90
|
</ul>
|
91
91
|
|
92
92
|
|
@@ -113,7 +113,7 @@ The root directory of this application, i.e. the directory that contains
|
|
113
113
|
<td class='attr-name'>listen_socket_name</td>
|
114
114
|
<td class='attr-desc'>
|
115
115
|
The name of the socket on which the application instance will accept <a
|
116
|
-
href="Application.html#
|
116
|
+
href="Application.html#M000110">new</a> connections. See
|
117
117
|
#listen_socket_type on how one should interpret this value.
|
118
118
|
|
119
119
|
</td>
|
@@ -156,7 +156,7 @@ The process ID of this application instance.
|
|
156
156
|
<div class="sectiontitle">Public Class methods</div>
|
157
157
|
<div class="method">
|
158
158
|
<div class="title">
|
159
|
-
<a name="
|
159
|
+
<a name="M000109"></a><b>detect_framework_version</b>(app_root)
|
160
160
|
</div>
|
161
161
|
<div class="description">
|
162
162
|
<ul>
|
@@ -176,74 +176,74 @@ Rails version is not installed.
|
|
176
176
|
</p>
|
177
177
|
</div>
|
178
178
|
<div class="sourcecode">
|
179
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
180
|
-
<div id="
|
179
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000109_source')" id="l_M000109_source">show source</a> ]</p>
|
180
|
+
<div id="M000109_source" class="dyn-source">
|
181
181
|
<pre>
|
182
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/application.rb, line
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
182
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/application.rb, line 55</span>
|
183
|
+
55: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">detect_framework_version</span>(<span class="ruby-identifier">app_root</span>)
|
184
|
+
56: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-node">"#{app_root}/vendor/rails/railties"</span>)
|
185
|
+
57: <span class="ruby-comment cmt"># NOTE: We must check for 'rails/railties' and not just 'rails'.</span>
|
186
|
+
58: <span class="ruby-comment cmt"># Typo's vendor directory contains an empty 'rails' directory.</span>
|
187
|
+
59: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:vendor</span>
|
188
|
+
60: <span class="ruby-keyword kw">end</span>
|
189
|
+
61:
|
190
|
+
62: <span class="ruby-identifier">environment_rb</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-node">"#{app_root}/config/environment.rb"</span>)
|
191
|
+
63: <span class="ruby-identifier">environment_rb</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/</span>
|
192
|
+
64: <span class="ruby-identifier">gem_version_spec</span> = <span class="ruby-identifier">$1</span>
|
193
|
+
65: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">gem_version_spec</span>.<span class="ruby-identifier">nil?</span>
|
194
|
+
66: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
195
|
+
67: <span class="ruby-keyword kw">end</span>
|
196
|
+
68:
|
197
|
+
69: <span class="ruby-identifier">search_results</span> = <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">cache</span>.<span class="ruby-identifier">search</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Dependency</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'rails'</span>, <span class="ruby-identifier">gem_version_spec</span>), <span class="ruby-keyword kw">true</span>)
|
198
|
+
70: <span class="ruby-identifier">found_version</span> = <span class="ruby-identifier">search_results</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
|
199
|
+
71: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">version</span>
|
200
|
+
72: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">last</span>
|
201
|
+
73: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">found_version</span>.<span class="ruby-identifier">nil?</span>
|
202
|
+
74: <span class="ruby-comment cmt"># If this error was reported before, then the cache might be out of</span>
|
203
|
+
75: <span class="ruby-comment cmt"># date because the Rails version may have been installed now.</span>
|
204
|
+
76: <span class="ruby-comment cmt"># So we reload the RubyGems cache and try again.</span>
|
205
|
+
77: <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">clear_paths</span>
|
206
|
+
78: <span class="ruby-identifier">search_results</span> = <span class="ruby-constant">Gem</span>.<span class="ruby-identifier">cache</span>.<span class="ruby-identifier">search</span>(<span class="ruby-constant">Gem</span><span class="ruby-operator">::</span><span class="ruby-constant">Dependency</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'rails'</span>, <span class="ruby-identifier">gem_version_spec</span>), <span class="ruby-keyword kw">true</span>)
|
207
|
+
79: <span class="ruby-identifier">found_version</span> = <span class="ruby-identifier">search_results</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">x</span><span class="ruby-operator">|</span>
|
208
|
+
80: <span class="ruby-identifier">x</span>.<span class="ruby-identifier">version</span>.<span class="ruby-identifier">version</span>
|
209
|
+
81: <span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">last</span>
|
210
|
+
82: <span class="ruby-keyword kw">end</span>
|
211
|
+
83:
|
212
|
+
84: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">found_version</span>.<span class="ruby-identifier">nil?</span>
|
213
|
+
85: <span class="ruby-identifier">raise</span> <span class="ruby-constant">VersionNotFound</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">"There is no Ruby on Rails version "</span> <span class="ruby-operator"><<</span>
|
214
|
+
86: <span class="ruby-node">"installed that matches version \"#{gem_version_spec}\""</span>,
|
215
|
+
87: <span class="ruby-identifier">gem_version_spec</span>)
|
216
|
+
88: <span class="ruby-keyword kw">else</span>
|
217
|
+
89: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">found_version</span>
|
218
|
+
90: <span class="ruby-keyword kw">end</span>
|
219
|
+
91: <span class="ruby-keyword kw">end</span>
|
220
220
|
</pre>
|
221
221
|
</div>
|
222
222
|
</div>
|
223
223
|
</div>
|
224
224
|
<div class="method">
|
225
225
|
<div class="title">
|
226
|
-
<a name="
|
226
|
+
<a name="M000110"></a><b>new</b>(app_root, pid, listen_socket_name, listen_socket_type, owner_pipe)
|
227
227
|
</div>
|
228
228
|
<div class="description">
|
229
229
|
<p>
|
230
|
-
Creates a <a href="Application.html#
|
230
|
+
Creates a <a href="Application.html#M000110">new</a> instance of <a
|
231
231
|
href="Application.html">Application</a>. The parameters correspond with the
|
232
232
|
attributes of the same names. No exceptions will be thrown.
|
233
233
|
</p>
|
234
234
|
</div>
|
235
235
|
<div class="sourcecode">
|
236
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
237
|
-
<div id="
|
236
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000110_source')" id="l_M000110_source">show source</a> ]</p>
|
237
|
+
<div id="M000110_source" class="dyn-source">
|
238
238
|
<pre>
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
239
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/application.rb, line 95</span>
|
240
|
+
95: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">listen_socket_name</span>, <span class="ruby-identifier">listen_socket_type</span>, <span class="ruby-identifier">owner_pipe</span>)
|
241
|
+
96: <span class="ruby-ivar">@app_root</span> = <span class="ruby-identifier">app_root</span>
|
242
|
+
97: <span class="ruby-ivar">@pid</span> = <span class="ruby-identifier">pid</span>
|
243
|
+
98: <span class="ruby-ivar">@listen_socket_name</span> = <span class="ruby-identifier">listen_socket_name</span>
|
244
|
+
99: <span class="ruby-ivar">@listen_socket_type</span> = <span class="ruby-identifier">listen_socket_type</span>
|
245
|
+
100: <span class="ruby-ivar">@owner_pipe</span> = <span class="ruby-identifier">owner_pipe</span>
|
246
|
+
101: <span class="ruby-keyword kw">end</span>
|
247
247
|
</pre>
|
248
248
|
</div>
|
249
249
|
</div>
|
@@ -251,7 +251,7 @@ attributes of the same names. No exceptions will be thrown.
|
|
251
251
|
<div class="sectiontitle">Public Instance methods</div>
|
252
252
|
<div class="method">
|
253
253
|
<div class="title">
|
254
|
-
<a name="
|
254
|
+
<a name="M000111"></a><b>close</b>()
|
255
255
|
</div>
|
256
256
|
<div class="description">
|
257
257
|
<p>
|
@@ -264,13 +264,13 @@ See also AbstractRequestHandler#owner_pipe.
|
|
264
264
|
</p>
|
265
265
|
</div>
|
266
266
|
<div class="sourcecode">
|
267
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
268
|
-
<div id="
|
267
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000111_source')" id="l_M000111_source">show source</a> ]</p>
|
268
|
+
<div id="M000111_source" class="dyn-source">
|
269
269
|
<pre>
|
270
|
-
<span class="ruby-comment cmt"># File lib/phusion_passenger/application.rb, line
|
271
|
-
|
272
|
-
|
273
|
-
|
270
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/application.rb, line 108</span>
|
271
|
+
108: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">close</span>
|
272
|
+
109: <span class="ruby-ivar">@owner_pipe</span>.<span class="ruby-identifier">close</span> <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
273
|
+
110: <span class="ruby-keyword kw">end</span>
|
274
274
|
</pre>
|
275
275
|
</div>
|
276
276
|
</div>
|