passenger 5.0.4 → 5.0.5
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.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/.editorconfig +10 -0
- data/CHANGELOG +21 -0
- data/build/agents.rb +2 -2
- data/build/apache2.rb +6 -5
- data/build/common_library.rb +22 -7
- data/build/cxx_tests.rb +0 -3
- data/build/misc.rb +1 -1
- data/dev/parse_file_descriptor_log +119 -0
- data/doc/CloudLicensingConfiguration.html +387 -0
- data/doc/Design and Architecture.html +2430 -0
- data/doc/Packaging.html +488 -0
- data/doc/Security of user switching support.html +1833 -0
- data/doc/ServerOptimizationGuide.html +659 -0
- data/doc/ServerOptimizationGuide.txt.md +8 -0
- data/doc/Users guide Apache.html +9116 -0
- data/doc/Users guide Apache.idmap.txt +6 -2
- data/doc/Users guide Apache.txt +26 -7
- data/doc/Users guide Nginx.html +9025 -0
- data/doc/Users guide Nginx.idmap.txt +7 -3
- data/doc/Users guide Nginx.txt +29 -6
- data/doc/Users guide Standalone.html +3983 -0
- data/doc/Users guide.html +1748 -0
- data/doc/users_guide_snippets/installation.txt +4 -4
- data/ext/apache2/Configuration.cpp +16 -5
- data/ext/apache2/Configuration.hpp +4 -2
- data/ext/apache2/Hooks.cpp +44 -19
- data/ext/boost/libs/thread/src/pthread/once.cpp +2 -0
- data/ext/boost/libs/thread/src/pthread/once_atomic.cpp +6 -0
- data/ext/common/AgentsStarter.h +3 -2
- data/ext/common/ApplicationPool2/DirectSpawner.h +14 -4
- data/ext/common/ApplicationPool2/DummySpawner.h +12 -7
- data/ext/common/ApplicationPool2/Implementation.cpp +1 -1
- data/ext/common/ApplicationPool2/Process.h +2 -1
- data/ext/common/ApplicationPool2/Session.h +6 -6
- data/ext/common/ApplicationPool2/SmartSpawner.h +19 -4
- data/ext/common/ApplicationPool2/Socket.h +59 -27
- data/ext/common/ApplicationPool2/Spawner.h +2 -2
- data/ext/common/BackgroundEventLoop.cpp +6 -1
- data/ext/common/Constants.h +1 -1
- data/ext/common/EventedClient.h +1 -1
- data/ext/common/EventedServer.h +2 -2
- data/ext/common/FileDescriptor.h +25 -6
- data/ext/common/Logging.cpp +107 -52
- data/ext/common/Logging.h +146 -19
- data/ext/common/MessageClient.h +2 -2
- data/ext/common/MessageServer.h +3 -2
- data/ext/common/RandomGenerator.h +8 -7
- data/ext/common/SafeLibev.h +5 -1
- data/ext/common/ServerKit/AcceptLoadBalancer.h +9 -4
- data/ext/common/ServerKit/FdSinkChannel.h +5 -2
- data/ext/common/ServerKit/FdSourceChannel.h +5 -2
- data/ext/common/ServerKit/FileBufferedChannel.h +2 -0
- data/ext/common/ServerKit/FileBufferedFdSinkChannel.h +7 -2
- data/ext/common/ServerKit/HttpServer.h +6 -0
- data/ext/common/ServerKit/Server.h +40 -3
- data/ext/common/StaticString.h +20 -0
- data/ext/common/UnionStation/Connection.h +3 -1
- data/ext/common/UnionStation/Core.h +6 -4
- data/ext/common/Utils.cpp +4 -3
- data/ext/common/Utils/DateParsing.h +19 -5
- data/ext/common/Utils/FastStringStream.h +183 -0
- data/ext/common/Utils/IOUtils.cpp +47 -28
- data/ext/common/Utils/IOUtils.h +56 -12
- data/ext/common/Utils/MessagePassing.h +3 -3
- data/ext/common/Utils/ProcessMetricsCollector.h +2 -2
- data/ext/common/Utils/ScopeGuard.h +16 -5
- data/ext/common/Utils/SpeedMeter.h +2 -2
- data/ext/common/Utils/StrIntUtils.cpp +6 -6
- data/ext/common/Utils/StrIntUtils.h +2 -1
- data/ext/common/agents/Base.cpp +56 -4
- data/ext/common/agents/Base.h +2 -1
- data/ext/common/agents/HelperAgent/AdminServer.h +122 -11
- data/ext/common/agents/HelperAgent/Main.cpp +16 -5
- data/ext/common/agents/HelperAgent/OptionParser.h +7 -1
- data/ext/common/agents/HelperAgent/RequestHandler.h +1 -1
- data/ext/common/agents/HelperAgent/RequestHandler/Hooks.cpp +10 -1
- data/ext/common/agents/HelperAgent/RequestHandler/Request.h +8 -0
- data/ext/common/agents/HelperAgent/RequestHandler/TurboCaching.h +4 -3
- data/ext/common/agents/LoggingAgent/AdminServer.h +57 -11
- data/ext/common/agents/LoggingAgent/LoggingServer.h +3 -3
- data/ext/common/agents/LoggingAgent/Main.cpp +11 -3
- data/ext/common/agents/Watchdog/AdminServer.h +53 -11
- data/ext/common/agents/Watchdog/AgentWatcher.cpp +3 -3
- data/ext/common/agents/Watchdog/Main.cpp +13 -6
- data/ext/libeio/ecb.h +1 -1
- data/ext/libev/ev.c +13 -1
- data/ext/libev/ev.h +3 -0
- data/ext/nginx/Configuration.c +28 -6
- data/ext/nginx/Configuration.h +2 -1
- data/ext/nginx/ngx_http_passenger_module.c +5 -4
- data/ext/oxt/dynamic_thread_group.hpp +38 -5
- data/lib/phusion_passenger.rb +1 -1
- data/lib/phusion_passenger/common_library.rb +9 -5
- data/lib/phusion_passenger/config/reopen_logs_command.rb +2 -2
- data/lib/phusion_passenger/packaging.rb +23 -37
- data/passenger.gemspec +21 -21
- metadata +4 -453
- metadata.gz.asc +7 -7
- data/.gitignore +0 -68
- data/.travis.yml +0 -16
- data/Gemfile +0 -17
- data/Gemfile.lock +0 -39
- data/Vagrantfile +0 -54
- data/debian.template/README.Debian +0 -15
- data/debian.template/changelog +0 -316
- data/debian.template/compat +0 -1
- data/debian.template/control.erb +0 -91
- data/debian.template/copyright +0 -385
- data/debian.template/libapache2-mod-passenger.install +0 -3
- data/debian.template/libapache2-mod-passenger.postinst +0 -36
- data/debian.template/libapache2-mod-passenger.prerm +0 -15
- data/debian.template/locations.ini.erb +0 -14
- data/debian.template/passenger-dev.install.erb +0 -3
- data/debian.template/passenger-doc.install.erb +0 -2
- data/debian.template/passenger.conf +0 -6
- data/debian.template/passenger.docs +0 -4
- data/debian.template/passenger.install.erb +0 -14
- data/debian.template/passenger.load +0 -3
- data/debian.template/passenger.manpages +0 -3
- data/debian.template/patches/series +0 -0
- data/debian.template/rules.erb +0 -76
- data/debian.template/source/format +0 -1
- data/ext/common/EventedBufferedInput.h +0 -458
- data/packaging/rpm/LICENSE.txt +0 -19
- data/packaging/rpm/Makefile +0 -13
- data/packaging/rpm/README.md +0 -41
- data/packaging/rpm/Vagrantfile +0 -38
- data/packaging/rpm/Vagrantfile.centos +0 -30
- data/packaging/rpm/build +0 -170
- data/packaging/rpm/create_project +0 -41
- data/packaging/rpm/git_update +0 -88
- data/packaging/rpm/image/Dockerfile +0 -37
- data/packaging/rpm/image/Gemfile +0 -3
- data/packaging/rpm/image/Gemfile.lock +0 -12
- data/packaging/rpm/image/RPM-GPG-KEY-amazon-ga +0 -19
- data/packaging/rpm/image/amazon2014-i386.cfg +0 -96
- data/packaging/rpm/image/amazon2014-x86_64.cfg +0 -96
- data/packaging/rpm/image/site-defaults.cfg +0 -168
- data/packaging/rpm/internal/build_tasks.rb +0 -238
- data/packaging/rpm/internal/dummygpg +0 -11
- data/packaging/rpm/internal/exec_build +0 -42
- data/packaging/rpm/internal/get_distro_arch +0 -14
- data/packaging/rpm/internal/get_distro_id +0 -10
- data/packaging/rpm/internal/git_update +0 -27
- data/packaging/rpm/internal/inituidgid +0 -17
- data/packaging/rpm/internal/my_init +0 -344
- data/packaging/rpm/internal/python27 +0 -3
- data/packaging/rpm/internal/repo_update +0 -46
- data/packaging/rpm/internal/setuser +0 -26
- data/packaging/rpm/internal/tracking_helper +0 -40
- data/packaging/rpm/jenkins_release +0 -99
- data/packaging/rpm/lib/build_tasks_support.rb +0 -402
- data/packaging/rpm/lib/preprocessor.rb +0 -341
- data/packaging/rpm/nginx_spec/404.html +0 -119
- data/packaging/rpm/nginx_spec/50x.html +0 -119
- data/packaging/rpm/nginx_spec/index.html +0 -116
- data/packaging/rpm/nginx_spec/nginx-auto-cc-gcc.patch +0 -13
- data/packaging/rpm/nginx_spec/nginx-logo.png +0 -0
- data/packaging/rpm/nginx_spec/nginx-upgrade +0 -13
- data/packaging/rpm/nginx_spec/nginx-upgrade.8 +0 -151
- data/packaging/rpm/nginx_spec/nginx.conf +0 -131
- data/packaging/rpm/nginx_spec/nginx.init +0 -144
- data/packaging/rpm/nginx_spec/nginx.logrotate +0 -13
- data/packaging/rpm/nginx_spec/nginx.service +0 -15
- data/packaging/rpm/nginx_spec/nginx.spec.template +0 -560
- data/packaging/rpm/nginx_spec/nginx.sysconfig +0 -4
- data/packaging/rpm/nginx_spec/passenger.conf +0 -9
- data/packaging/rpm/nginx_spec/poweredby.png +0 -0
- data/packaging/rpm/passenger_spec/apache-passenger.conf.in +0 -26
- data/packaging/rpm/passenger_spec/config.json +0 -30
- data/packaging/rpm/passenger_spec/passenger.logrotate +0 -7
- data/packaging/rpm/passenger_spec/passenger.spec.template +0 -478
- data/packaging/rpm/passenger_spec/passenger_dynamic_thread_group.patch +0 -16
- data/packaging/rpm/passenger_spec/passenger_tests_default_config_example.patch +0 -44
- data/packaging/rpm/passenger_spec/rubygem-passenger-4.0.18-GLIBC_HAVE_LONG_LONG.patch +0 -21
- data/packaging/rpm/repo_update +0 -114
- data/packaging/rpm/setup-system +0 -61
- data/packaging/rpm/shell +0 -10
- data/test/.rspec +0 -4
- data/test/config.json.example +0 -42
- data/test/config.json.rpm-automation +0 -15
- data/test/config.json.travis +0 -15
- data/test/config.json.vagrant +0 -30
- data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +0 -124
- data/test/cxx/ApplicationPool2/OptionsTest.cpp +0 -30
- data/test/cxx/ApplicationPool2/PoolTest.cpp +0 -2062
- data/test/cxx/ApplicationPool2/ProcessTest.cpp +0 -130
- data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +0 -243
- data/test/cxx/ApplicationPool2/SpawnerTestCases.cpp +0 -823
- data/test/cxx/BufferedIOTest.cpp +0 -364
- data/test/cxx/CachedFileStatTest.cpp +0 -402
- data/test/cxx/CxxTestMain.cpp +0 -181
- data/test/cxx/DataStructures/LStringTest.cpp +0 -275
- data/test/cxx/DataStructures/StringKeyTableTest.cpp +0 -199
- data/test/cxx/DateParsingTest.cpp +0 -75
- data/test/cxx/DechunkerTest.cpp +0 -250
- data/test/cxx/EventedBufferedInputTest.cpp +0 -758
- data/test/cxx/EventedClientTest.cpp +0 -523
- data/test/cxx/FileChangeCheckerTest.cpp +0 -331
- data/test/cxx/FileDescriptorTest.cpp +0 -69
- data/test/cxx/FilterSupportTest.cpp +0 -433
- data/test/cxx/IOUtilsTest.cpp +0 -861
- data/test/cxx/MemoryKit/MbufTest.cpp +0 -213
- data/test/cxx/MessageIOTest.cpp +0 -360
- data/test/cxx/MessagePassingTest.cpp +0 -81
- data/test/cxx/MessageReadersWritersTest.cpp +0 -576
- data/test/cxx/MessageServerTest.cpp +0 -393
- data/test/cxx/ProcessMetricsCollectorTest.cpp +0 -123
- data/test/cxx/RequestHandlerTest.cpp +0 -1463
- data/test/cxx/ResponseCacheTest.cpp +0 -322
- data/test/cxx/ServerKit/ChannelTest.cpp +0 -1467
- data/test/cxx/ServerKit/CookieUtilsTest.cpp +0 -274
- data/test/cxx/ServerKit/FileBufferedChannelTest.cpp +0 -992
- data/test/cxx/ServerKit/HeaderTableTest.cpp +0 -177
- data/test/cxx/ServerKit/HttpServerTest.cpp +0 -1580
- data/test/cxx/ServerKit/ServerTest.cpp +0 -408
- data/test/cxx/StaticStringTest.cpp +0 -220
- data/test/cxx/StringMapTest.cpp +0 -131
- data/test/cxx/SystemTimeTest.cpp +0 -37
- data/test/cxx/TemplateTest.cpp +0 -118
- data/test/cxx/TestSupport.cpp +0 -207
- data/test/cxx/TestSupport.h +0 -333
- data/test/cxx/UnionStationTest.cpp +0 -741
- data/test/cxx/Utils/StrIntUtilsTest.cpp +0 -39
- data/test/cxx/UtilsTest.cpp +0 -672
- data/test/cxx/VariantMapTest.cpp +0 -191
- data/test/gdbinit.example +0 -34
- data/test/integration_tests/apache2_tests.rb +0 -585
- data/test/integration_tests/downloaded_binaries_tests.rb +0 -185
- data/test/integration_tests/native_packaging_spec.rb +0 -368
- data/test/integration_tests/nginx_tests.rb +0 -402
- data/test/integration_tests/shared/example_webapp_tests.rb +0 -289
- data/test/integration_tests/source_packaging_test.rb +0 -201
- data/test/integration_tests/spec_helper.rb +0 -22
- data/test/integration_tests/standalone_tests.rb +0 -392
- data/test/node/line_reader_spec.js +0 -338
- data/test/node/spec_helper.js +0 -65
- data/test/oxt/backtrace_test.cpp +0 -88
- data/test/oxt/counter.hpp +0 -55
- data/test/oxt/dynamic_thread_group_test.cpp +0 -131
- data/test/oxt/oxt_test_main.cpp +0 -27
- data/test/oxt/spin_lock_test.cpp +0 -59
- data/test/oxt/syscall_interruption_test.cpp +0 -39
- data/test/ruby/debug_logging_spec.rb +0 -145
- data/test/ruby/message_channel_spec.rb +0 -196
- data/test/ruby/rack/loader_spec.rb +0 -42
- data/test/ruby/rack/preloader_spec.rb +0 -48
- data/test/ruby/rails3.0/loader_spec.rb +0 -26
- data/test/ruby/rails3.0/preloader_spec.rb +0 -32
- data/test/ruby/rails3.1/loader_spec.rb +0 -26
- data/test/ruby/rails3.1/preloader_spec.rb +0 -32
- data/test/ruby/rails3.2/loader_spec.rb +0 -26
- data/test/ruby/rails3.2/preloader_spec.rb +0 -32
- data/test/ruby/rails4.0/loader_spec.rb +0 -28
- data/test/ruby/rails4.0/preloader_spec.rb +0 -34
- data/test/ruby/rails4.1/loader_spec.rb +0 -28
- data/test/ruby/rails4.1/preloader_spec.rb +0 -34
- data/test/ruby/request_handler_spec.rb +0 -747
- data/test/ruby/shared/loader_sharedspec.rb +0 -247
- data/test/ruby/shared/rails/union_station_extensions_sharedspec.rb +0 -357
- data/test/ruby/shared/ruby_loader_sharedspec.rb +0 -55
- data/test/ruby/spec_helper.rb +0 -114
- data/test/ruby/standalone/runtime_installer_spec.rb +0 -402
- data/test/ruby/union_station_spec.rb +0 -288
- data/test/ruby/utils/file_system_watcher_spec.rb +0 -229
- data/test/ruby/utils/hosts_file_parser.rb +0 -258
- data/test/ruby/utils/tee_input_spec.rb +0 -235
- data/test/ruby/utils/unseekable_socket_spec.rb +0 -66
- data/test/ruby/utils_spec.rb +0 -41
- data/test/stub/apache2/httpd.conf.erb +0 -122
- data/test/stub/apache2/mime.types +0 -748
- data/test/stub/garbage1.dat +0 -0
- data/test/stub/garbage2.dat +0 -0
- data/test/stub/garbage3.dat +0 -0
- data/test/stub/http_request.yml +0 -23
- data/test/stub/index.html +0 -1
- data/test/stub/nginx/koi-utf +0 -109
- data/test/stub/nginx/koi-win +0 -103
- data/test/stub/nginx/mime.types +0 -70
- data/test/stub/nginx/nginx.conf.erb +0 -70
- data/test/stub/nginx/win-utf +0 -126
- data/test/stub/node/app.js +0 -133
- data/test/stub/node/public/.gitignore +0 -0
- data/test/stub/node/tmp/.gitignore +0 -0
- data/test/stub/rack/config.ru +0 -95
- data/test/stub/rack/library.rb +0 -16
- data/test/stub/rack/public/.gitignore +0 -0
- data/test/stub/rack/start.rb +0 -52
- data/test/stub/rack/tmp/.gitignore +0 -0
- data/test/stub/rails3.0/.gitignore +0 -4
- data/test/stub/rails3.0/Gemfile +0 -22
- data/test/stub/rails3.0/Gemfile.lock +0 -80
- data/test/stub/rails3.0/Rakefile +0 -10
- data/test/stub/rails3.0/app/controllers/application_controller.rb +0 -4
- data/test/stub/rails3.0/app/helpers/application_helper.rb +0 -2
- data/test/stub/rails3.0/app/views/layouts/application.html.erb +0 -14
- data/test/stub/rails3.0/config.ru +0 -4
- data/test/stub/rails3.0/config/application.rb +0 -48
- data/test/stub/rails3.0/config/boot.rb +0 -13
- data/test/stub/rails3.0/config/database.yml +0 -22
- data/test/stub/rails3.0/config/environment.rb +0 -5
- data/test/stub/rails3.0/config/environments/development.rb +0 -19
- data/test/stub/rails3.0/config/environments/production.rb +0 -48
- data/test/stub/rails3.0/config/environments/test.rb +0 -32
- data/test/stub/rails3.0/config/initializers/backtrace_silencers.rb +0 -7
- data/test/stub/rails3.0/config/initializers/inflections.rb +0 -10
- data/test/stub/rails3.0/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails3.0/config/initializers/passenger.rb +0 -2
- data/test/stub/rails3.0/config/initializers/secret_token.rb +0 -7
- data/test/stub/rails3.0/config/initializers/session_store.rb +0 -8
- data/test/stub/rails3.0/config/locales/en.yml +0 -5
- data/test/stub/rails3.0/config/routes.rb +0 -58
- data/test/stub/rails3.0/db/seeds.rb +0 -7
- data/test/stub/rails3.0/doc/README_FOR_APP +0 -2
- data/test/stub/rails3.0/lib/tasks/.gitkeep +0 -0
- data/test/stub/rails3.0/log/.gitignore +0 -0
- data/test/stub/rails3.0/public/404.html +0 -26
- data/test/stub/rails3.0/public/422.html +0 -26
- data/test/stub/rails3.0/public/500.html +0 -26
- data/test/stub/rails3.0/public/favicon.ico +0 -0
- data/test/stub/rails3.0/public/index.html +0 -279
- data/test/stub/rails3.0/public/robots.txt +0 -5
- data/test/stub/rails3.0/public/stylesheets/.gitkeep +0 -0
- data/test/stub/rails3.0/script/rails +0 -9
- data/test/stub/rails3.0/test/performance/browsing_test.rb +0 -9
- data/test/stub/rails3.0/test/test_helper.rb +0 -13
- data/test/stub/rails3.0/vendor/plugins/.gitkeep +0 -0
- data/test/stub/rails3.1/.gitignore +0 -15
- data/test/stub/rails3.1/Gemfile +0 -37
- data/test/stub/rails3.1/Gemfile.lock +0 -115
- data/test/stub/rails3.1/README +0 -261
- data/test/stub/rails3.1/Rakefile +0 -7
- data/test/stub/rails3.1/app/assets/images/rails.png +0 -0
- data/test/stub/rails3.1/app/assets/stylesheets/application.css +0 -7
- data/test/stub/rails3.1/app/controllers/application_controller.rb +0 -3
- data/test/stub/rails3.1/app/helpers/application_helper.rb +0 -2
- data/test/stub/rails3.1/app/mailers/.gitkeep +0 -0
- data/test/stub/rails3.1/app/models/.gitkeep +0 -0
- data/test/stub/rails3.1/app/views/layouts/application.html.erb +0 -14
- data/test/stub/rails3.1/config.ru +0 -4
- data/test/stub/rails3.1/config/application.rb +0 -48
- data/test/stub/rails3.1/config/boot.rb +0 -6
- data/test/stub/rails3.1/config/database.yml +0 -25
- data/test/stub/rails3.1/config/environment.rb +0 -5
- data/test/stub/rails3.1/config/environments/development.rb +0 -30
- data/test/stub/rails3.1/config/environments/production.rb +0 -60
- data/test/stub/rails3.1/config/environments/test.rb +0 -39
- data/test/stub/rails3.1/config/initializers/backtrace_silencers.rb +0 -7
- data/test/stub/rails3.1/config/initializers/inflections.rb +0 -10
- data/test/stub/rails3.1/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails3.1/config/initializers/passenger.rb +0 -2
- data/test/stub/rails3.1/config/initializers/secret_token.rb +0 -7
- data/test/stub/rails3.1/config/initializers/session_store.rb +0 -8
- data/test/stub/rails3.1/config/initializers/wrap_parameters.rb +0 -14
- data/test/stub/rails3.1/config/locales/en.yml +0 -5
- data/test/stub/rails3.1/config/routes.rb +0 -58
- data/test/stub/rails3.1/db/seeds.rb +0 -7
- data/test/stub/rails3.1/doc/README_FOR_APP +0 -2
- data/test/stub/rails3.1/lib/assets/.gitkeep +0 -0
- data/test/stub/rails3.1/lib/tasks/.gitkeep +0 -0
- data/test/stub/rails3.1/log/.gitkeep +0 -0
- data/test/stub/rails3.1/public/404.html +0 -26
- data/test/stub/rails3.1/public/422.html +0 -26
- data/test/stub/rails3.1/public/500.html +0 -26
- data/test/stub/rails3.1/public/favicon.ico +0 -0
- data/test/stub/rails3.1/public/index.html +0 -241
- data/test/stub/rails3.1/public/robots.txt +0 -5
- data/test/stub/rails3.1/script/rails +0 -6
- data/test/stub/rails3.1/test/fixtures/.gitkeep +0 -0
- data/test/stub/rails3.1/test/functional/.gitkeep +0 -0
- data/test/stub/rails3.1/test/integration/.gitkeep +0 -0
- data/test/stub/rails3.1/test/performance/browsing_test.rb +0 -12
- data/test/stub/rails3.1/test/test_helper.rb +0 -13
- data/test/stub/rails3.1/test/unit/.gitkeep +0 -0
- data/test/stub/rails3.1/vendor/assets/stylesheets/.gitkeep +0 -0
- data/test/stub/rails3.1/vendor/plugins/.gitkeep +0 -0
- data/test/stub/rails3.2/.gitignore +0 -15
- data/test/stub/rails3.2/Gemfile +0 -39
- data/test/stub/rails3.2/Gemfile.lock +0 -113
- data/test/stub/rails3.2/Rakefile +0 -7
- data/test/stub/rails3.2/app/assets/images/rails.png +0 -0
- data/test/stub/rails3.2/app/assets/stylesheets/application.css +0 -13
- data/test/stub/rails3.2/app/controllers/application_controller.rb +0 -3
- data/test/stub/rails3.2/app/helpers/application_helper.rb +0 -2
- data/test/stub/rails3.2/app/mailers/.gitkeep +0 -0
- data/test/stub/rails3.2/app/models/.gitkeep +0 -0
- data/test/stub/rails3.2/app/views/layouts/application.html.erb +0 -14
- data/test/stub/rails3.2/config.ru +0 -4
- data/test/stub/rails3.2/config/application.rb +0 -62
- data/test/stub/rails3.2/config/boot.rb +0 -6
- data/test/stub/rails3.2/config/database.yml +0 -25
- data/test/stub/rails3.2/config/environment.rb +0 -5
- data/test/stub/rails3.2/config/environments/development.rb +0 -37
- data/test/stub/rails3.2/config/environments/production.rb +0 -67
- data/test/stub/rails3.2/config/environments/test.rb +0 -37
- data/test/stub/rails3.2/config/initializers/backtrace_silencers.rb +0 -7
- data/test/stub/rails3.2/config/initializers/inflections.rb +0 -15
- data/test/stub/rails3.2/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails3.2/config/initializers/passenger.rb +0 -2
- data/test/stub/rails3.2/config/initializers/secret_token.rb +0 -7
- data/test/stub/rails3.2/config/initializers/session_store.rb +0 -8
- data/test/stub/rails3.2/config/initializers/wrap_parameters.rb +0 -14
- data/test/stub/rails3.2/config/locales/en.yml +0 -5
- data/test/stub/rails3.2/config/routes.rb +0 -58
- data/test/stub/rails3.2/db/seeds.rb +0 -7
- data/test/stub/rails3.2/doc/README_FOR_APP +0 -2
- data/test/stub/rails3.2/lib/assets/.gitkeep +0 -0
- data/test/stub/rails3.2/lib/tasks/.gitkeep +0 -0
- data/test/stub/rails3.2/log/.gitkeep +0 -0
- data/test/stub/rails3.2/public/404.html +0 -26
- data/test/stub/rails3.2/public/422.html +0 -26
- data/test/stub/rails3.2/public/500.html +0 -25
- data/test/stub/rails3.2/public/favicon.ico +0 -0
- data/test/stub/rails3.2/public/index.html +0 -241
- data/test/stub/rails3.2/public/robots.txt +0 -5
- data/test/stub/rails3.2/script/rails +0 -6
- data/test/stub/rails3.2/test/fixtures/.gitkeep +0 -0
- data/test/stub/rails3.2/test/functional/.gitkeep +0 -0
- data/test/stub/rails3.2/test/integration/.gitkeep +0 -0
- data/test/stub/rails3.2/test/performance/browsing_test.rb +0 -12
- data/test/stub/rails3.2/test/test_helper.rb +0 -13
- data/test/stub/rails3.2/test/unit/.gitkeep +0 -0
- data/test/stub/rails3.2/vendor/assets/stylesheets/.gitkeep +0 -0
- data/test/stub/rails3.2/vendor/plugins/.gitkeep +0 -0
- data/test/stub/rails4.0/.gitignore +0 -16
- data/test/stub/rails4.0/Gemfile +0 -45
- data/test/stub/rails4.0/Gemfile.lock +0 -126
- data/test/stub/rails4.0/README.rdoc +0 -28
- data/test/stub/rails4.0/Rakefile +0 -6
- data/test/stub/rails4.0/app/assets/images/.keep +0 -0
- data/test/stub/rails4.0/app/assets/javascripts/application.js +0 -16
- data/test/stub/rails4.0/app/assets/stylesheets/application.css +0 -13
- data/test/stub/rails4.0/app/controllers/application_controller.rb +0 -5
- data/test/stub/rails4.0/app/controllers/concerns/.keep +0 -0
- data/test/stub/rails4.0/app/helpers/application_helper.rb +0 -2
- data/test/stub/rails4.0/app/mailers/.keep +0 -0
- data/test/stub/rails4.0/app/models/.keep +0 -0
- data/test/stub/rails4.0/app/models/concerns/.keep +0 -0
- data/test/stub/rails4.0/app/views/layouts/application.html.erb +0 -14
- data/test/stub/rails4.0/bin/bundle +0 -3
- data/test/stub/rails4.0/bin/rails +0 -4
- data/test/stub/rails4.0/bin/rake +0 -4
- data/test/stub/rails4.0/config.ru +0 -4
- data/test/stub/rails4.0/config/application.rb +0 -23
- data/test/stub/rails4.0/config/boot.rb +0 -4
- data/test/stub/rails4.0/config/database.yml +0 -25
- data/test/stub/rails4.0/config/environment.rb +0 -5
- data/test/stub/rails4.0/config/environments/development.rb +0 -29
- data/test/stub/rails4.0/config/environments/production.rb +0 -80
- data/test/stub/rails4.0/config/environments/test.rb +0 -36
- data/test/stub/rails4.0/config/initializers/backtrace_silencers.rb +0 -7
- data/test/stub/rails4.0/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/stub/rails4.0/config/initializers/inflections.rb +0 -16
- data/test/stub/rails4.0/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails4.0/config/initializers/passenger.rb +0 -2
- data/test/stub/rails4.0/config/initializers/secret_token.rb +0 -12
- data/test/stub/rails4.0/config/initializers/session_store.rb +0 -3
- data/test/stub/rails4.0/config/initializers/wrap_parameters.rb +0 -14
- data/test/stub/rails4.0/config/locales/en.yml +0 -23
- data/test/stub/rails4.0/config/routes.rb +0 -57
- data/test/stub/rails4.0/db/seeds.rb +0 -7
- data/test/stub/rails4.0/lib/assets/.keep +0 -0
- data/test/stub/rails4.0/lib/tasks/.keep +0 -0
- data/test/stub/rails4.0/log/.keep +0 -0
- data/test/stub/rails4.0/public/404.html +0 -58
- data/test/stub/rails4.0/public/422.html +0 -58
- data/test/stub/rails4.0/public/500.html +0 -57
- data/test/stub/rails4.0/public/favicon.ico +0 -0
- data/test/stub/rails4.0/public/robots.txt +0 -5
- data/test/stub/rails4.0/test/controllers/.keep +0 -0
- data/test/stub/rails4.0/test/fixtures/.keep +0 -0
- data/test/stub/rails4.0/test/helpers/.keep +0 -0
- data/test/stub/rails4.0/test/integration/.keep +0 -0
- data/test/stub/rails4.0/test/mailers/.keep +0 -0
- data/test/stub/rails4.0/test/models/.keep +0 -0
- data/test/stub/rails4.0/test/test_helper.rb +0 -15
- data/test/stub/rails4.0/vendor/assets/javascripts/.keep +0 -0
- data/test/stub/rails4.0/vendor/assets/stylesheets/.keep +0 -0
- data/test/stub/rails4.1/.gitignore +0 -16
- data/test/stub/rails4.1/Gemfile +0 -45
- data/test/stub/rails4.1/Gemfile.lock +0 -129
- data/test/stub/rails4.1/README.rdoc +0 -28
- data/test/stub/rails4.1/Rakefile +0 -6
- data/test/stub/rails4.1/app/assets/images/.keep +0 -0
- data/test/stub/rails4.1/app/assets/javascripts/application.js +0 -16
- data/test/stub/rails4.1/app/assets/stylesheets/application.css +0 -13
- data/test/stub/rails4.1/app/controllers/application_controller.rb +0 -5
- data/test/stub/rails4.1/app/controllers/concerns/.keep +0 -0
- data/test/stub/rails4.1/app/helpers/application_helper.rb +0 -2
- data/test/stub/rails4.1/app/mailers/.keep +0 -0
- data/test/stub/rails4.1/app/models/.keep +0 -0
- data/test/stub/rails4.1/app/models/concerns/.keep +0 -0
- data/test/stub/rails4.1/app/views/layouts/application.html.erb +0 -14
- data/test/stub/rails4.1/bin/bundle +0 -3
- data/test/stub/rails4.1/bin/rails +0 -4
- data/test/stub/rails4.1/bin/rake +0 -4
- data/test/stub/rails4.1/config.ru +0 -4
- data/test/stub/rails4.1/config/application.rb +0 -23
- data/test/stub/rails4.1/config/boot.rb +0 -4
- data/test/stub/rails4.1/config/database.yml +0 -25
- data/test/stub/rails4.1/config/environment.rb +0 -5
- data/test/stub/rails4.1/config/environments/development.rb +0 -29
- data/test/stub/rails4.1/config/environments/production.rb +0 -80
- data/test/stub/rails4.1/config/environments/test.rb +0 -36
- data/test/stub/rails4.1/config/initializers/backtrace_silencers.rb +0 -7
- data/test/stub/rails4.1/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/stub/rails4.1/config/initializers/inflections.rb +0 -16
- data/test/stub/rails4.1/config/initializers/mime_types.rb +0 -5
- data/test/stub/rails4.1/config/initializers/passenger.rb +0 -5
- data/test/stub/rails4.1/config/initializers/secret_token.rb +0 -12
- data/test/stub/rails4.1/config/initializers/session_store.rb +0 -3
- data/test/stub/rails4.1/config/initializers/wrap_parameters.rb +0 -14
- data/test/stub/rails4.1/config/locales/en.yml +0 -23
- data/test/stub/rails4.1/config/routes.rb +0 -57
- data/test/stub/rails4.1/db/seeds.rb +0 -7
- data/test/stub/rails4.1/lib/assets/.keep +0 -0
- data/test/stub/rails4.1/lib/tasks/.keep +0 -0
- data/test/stub/rails4.1/log/.keep +0 -0
- data/test/stub/rails4.1/public/404.html +0 -58
- data/test/stub/rails4.1/public/422.html +0 -58
- data/test/stub/rails4.1/public/500.html +0 -57
- data/test/stub/rails4.1/public/favicon.ico +0 -0
- data/test/stub/rails4.1/public/robots.txt +0 -5
- data/test/stub/rails4.1/test/controllers/.keep +0 -0
- data/test/stub/rails4.1/test/fixtures/.keep +0 -0
- data/test/stub/rails4.1/test/helpers/.keep +0 -0
- data/test/stub/rails4.1/test/integration/.keep +0 -0
- data/test/stub/rails4.1/test/mailers/.keep +0 -0
- data/test/stub/rails4.1/test/models/.keep +0 -0
- data/test/stub/rails4.1/test/test_helper.rb +0 -15
- data/test/stub/rails4.1/vendor/assets/javascripts/.keep +0 -0
- data/test/stub/rails4.1/vendor/assets/stylesheets/.keep +0 -0
- data/test/stub/start_error.pl +0 -24
- data/test/stub/upload_data.txt +0 -494
- data/test/stub/wsgi/passenger_wsgi.py +0 -212
- data/test/stub/wsgi/public/.gitignore +0 -0
- data/test/stub/wsgi/tmp/.gitignore +0 -0
- data/test/support/allocate_memory.c +0 -14
- data/test/support/apache2_controller.rb +0 -258
- data/test/support/multipart.rb +0 -62
- data/test/support/nginx_controller.rb +0 -97
- data/test/support/placebo-preloader.rb +0 -88
- data/test/support/test_helper.rb +0 -455
- data/test/support/valgrind.h +0 -2539
- data/test/tut/tut.h +0 -1310
- data/test/tut/tut_reporter.h +0 -256
- data/test/valgrind-osx.supp +0 -7
@@ -1,196 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
-
require 'socket'
|
3
|
-
PhusionPassenger.require_passenger_lib 'message_channel'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe MessageChannel do
|
8
|
-
describe "scenarios with a single channel" do
|
9
|
-
before :each do
|
10
|
-
@reader_pipe, @writer_pipe = IO.pipe
|
11
|
-
@reader = MessageChannel.new(@reader_pipe)
|
12
|
-
@writer = MessageChannel.new(@writer_pipe)
|
13
|
-
end
|
14
|
-
|
15
|
-
after :each do
|
16
|
-
@reader_pipe.close unless @reader_pipe.closed?
|
17
|
-
@writer_pipe.close unless @writer_pipe.closed?
|
18
|
-
end
|
19
|
-
|
20
|
-
it "can read a single written array message" do
|
21
|
-
@writer.write("hello")
|
22
|
-
@reader.read.should == ["hello"]
|
23
|
-
end
|
24
|
-
|
25
|
-
it "can handle array messages that contain spaces" do
|
26
|
-
@writer.write("hello world", "! ")
|
27
|
-
@reader.read.should == ["hello world", "! "]
|
28
|
-
end
|
29
|
-
|
30
|
-
it "can handle array messages that have only a single empty string" do
|
31
|
-
@writer.write("")
|
32
|
-
@reader.read.should == [""]
|
33
|
-
end
|
34
|
-
|
35
|
-
it "can handle array messages with empty arguments" do
|
36
|
-
@writer.write("hello", "", "world")
|
37
|
-
@reader.read.should == ["hello", "", "world"]
|
38
|
-
|
39
|
-
@writer.write("")
|
40
|
-
@reader.read.should == [""]
|
41
|
-
|
42
|
-
@writer.write(nil, "foo")
|
43
|
-
@reader.read.should == ["", "foo"]
|
44
|
-
end
|
45
|
-
|
46
|
-
it "properly detects end-of-file when reading an array message" do
|
47
|
-
@writer.close
|
48
|
-
@reader.read.should be_nil
|
49
|
-
end
|
50
|
-
|
51
|
-
specify "#read_hash works" do
|
52
|
-
@writer.write("hello", "world")
|
53
|
-
@reader.read_hash.should == { "hello" => "world" }
|
54
|
-
|
55
|
-
@writer.write("hello", "world", "foo", "bar", "", "...")
|
56
|
-
@reader.read_hash.should == { "hello" => "world", "foo" => "bar", "" => "..." }
|
57
|
-
end
|
58
|
-
|
59
|
-
specify "#read_hash throws an exception if the array message doesn't have an even number of items" do
|
60
|
-
@writer.write("foo")
|
61
|
-
lambda { @reader.read_hash }.should raise_error(MessageChannel::InvalidHashError)
|
62
|
-
|
63
|
-
@writer.write("foo", "bar", "baz")
|
64
|
-
lambda { @reader.read_hash }.should raise_error(MessageChannel::InvalidHashError)
|
65
|
-
end
|
66
|
-
|
67
|
-
it "can read a single written scalar message" do
|
68
|
-
@writer.write_scalar("hello world")
|
69
|
-
@reader.read_scalar.should == "hello world"
|
70
|
-
end
|
71
|
-
|
72
|
-
it "can handle empty scalar messages" do
|
73
|
-
@writer.write_scalar("")
|
74
|
-
@reader.read_scalar.should == ""
|
75
|
-
end
|
76
|
-
|
77
|
-
it "properly detects end-of-file when reading a scalar message" do
|
78
|
-
@writer.close
|
79
|
-
@reader.read_scalar.should be_nil
|
80
|
-
end
|
81
|
-
|
82
|
-
it "puts the data into the given buffer" do
|
83
|
-
buffer = ''
|
84
|
-
@writer.write_scalar("x" * 100)
|
85
|
-
result = @reader.read_scalar(buffer)
|
86
|
-
result.object_id.should == buffer.object_id
|
87
|
-
buffer.should == "x" * 100
|
88
|
-
end
|
89
|
-
|
90
|
-
it "raises SecurityError when a received scalar message's size is larger than a specified maximum" do
|
91
|
-
@writer.write_scalar(" " * 100)
|
92
|
-
lambda { @reader.read_scalar('', 99) }.should raise_error(SecurityError)
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
describe "scenarios with 2 channels and 2 concurrent processes" do
|
97
|
-
after :each do
|
98
|
-
@parent_socket.close
|
99
|
-
Process.waitpid(@pid) rescue nil
|
100
|
-
end
|
101
|
-
|
102
|
-
def spawn_process
|
103
|
-
@parent_socket, @child_socket = UNIXSocket.pair
|
104
|
-
@pid = fork do
|
105
|
-
@parent_socket.close
|
106
|
-
@channel = MessageChannel.new(@child_socket)
|
107
|
-
begin
|
108
|
-
yield
|
109
|
-
rescue Exception => e
|
110
|
-
print_exception("child", e)
|
111
|
-
ensure
|
112
|
-
@child_socket.close
|
113
|
-
exit!
|
114
|
-
end
|
115
|
-
end
|
116
|
-
@child_socket.close
|
117
|
-
@channel = MessageChannel.new(@parent_socket)
|
118
|
-
end
|
119
|
-
|
120
|
-
it "both processes can read and write a single array message" do
|
121
|
-
spawn_process do
|
122
|
-
x = @channel.read
|
123
|
-
@channel.write("#{x[0]}!")
|
124
|
-
end
|
125
|
-
@channel.write("hello")
|
126
|
-
@channel.read.should == ["hello!"]
|
127
|
-
end
|
128
|
-
|
129
|
-
it "can handle scalar messages with arbitrary binary data" do
|
130
|
-
garbage_files = ["garbage1.dat", "garbage2.dat", "garbage3.dat"]
|
131
|
-
spawn_process do
|
132
|
-
garbage_files.each do |name|
|
133
|
-
data = File.binread("stub/#{name}")
|
134
|
-
@channel.write_scalar(data)
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
garbage_files.each do |name|
|
139
|
-
data = File.binread("stub/#{name}")
|
140
|
-
@channel.read_scalar.should == data
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
it "supports IO object (file descriptor) passing" do
|
145
|
-
spawn_process do
|
146
|
-
writer = @channel.recv_io
|
147
|
-
writer.write("it works")
|
148
|
-
writer.close
|
149
|
-
end
|
150
|
-
reader, writer = IO.pipe
|
151
|
-
@channel.send_io(writer)
|
152
|
-
writer.close
|
153
|
-
reader.read.should == "it works"
|
154
|
-
reader.close
|
155
|
-
end
|
156
|
-
|
157
|
-
it "supports large amounts of data" do
|
158
|
-
iterations = 1000
|
159
|
-
blob = "123" * 1024
|
160
|
-
spawn_process do
|
161
|
-
iterations.times do |i|
|
162
|
-
@channel.write(blob)
|
163
|
-
end
|
164
|
-
end
|
165
|
-
iterations.times do
|
166
|
-
@channel.read.should == [blob]
|
167
|
-
end
|
168
|
-
end
|
169
|
-
|
170
|
-
it "has stream properties" do
|
171
|
-
garbage = File.binread("stub/garbage1.dat")
|
172
|
-
spawn_process do
|
173
|
-
@channel.write("hello", "world")
|
174
|
-
@channel.write_scalar(garbage)
|
175
|
-
@channel.send_io(STDIN)
|
176
|
-
@channel.write_scalar(":-)")
|
177
|
-
|
178
|
-
a = @channel.read_scalar
|
179
|
-
b = @channel.read
|
180
|
-
b << a
|
181
|
-
@channel.write(*b)
|
182
|
-
end
|
183
|
-
@channel.read.should == ["hello", "world"]
|
184
|
-
@channel.read_scalar.should == garbage
|
185
|
-
@channel.recv_io.close
|
186
|
-
@channel.read_scalar.should == ":-)"
|
187
|
-
|
188
|
-
@channel.write_scalar("TASTE MY WRATH! ULTIMATE SWORD TECHNIQUE!! DRAGON'S BREATH SL--")
|
189
|
-
@channel.write("Uhm, watch your step.", "WAAHH?!", "Calm down, Motoko!!")
|
190
|
-
@channel.read.should == ["Uhm, watch your step.", "WAAHH?!", "Calm down, Motoko!!",
|
191
|
-
"TASTE MY WRATH! ULTIMATE SWORD TECHNIQUE!! DRAGON'S BREATH SL--"]
|
192
|
-
end
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
end # module PhusionPassenger
|
@@ -1,42 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require 'ruby/shared/loader_sharedspec'
|
3
|
-
require 'ruby/shared/ruby_loader_sharedspec'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe "Rack loader" do
|
8
|
-
include LoaderSpecHelper
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
@stub = register_stub(RackStub.new("rack"))
|
12
|
-
end
|
13
|
-
|
14
|
-
def start(options = {})
|
15
|
-
@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root)
|
16
|
-
return @loader.start(options)
|
17
|
-
end
|
18
|
-
|
19
|
-
it_should_behave_like "a loader"
|
20
|
-
it_should_behave_like "a Ruby loader"
|
21
|
-
|
22
|
-
it "calls the starting_worker_process event with forked=false" do
|
23
|
-
File.prepend(@stub.startup_file, %q{
|
24
|
-
history_file = "history.txt"
|
25
|
-
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
26
|
-
::File.open(history_file, 'a') do |f|
|
27
|
-
f.puts "worker_process_started: forked=#{forked}\n"
|
28
|
-
end
|
29
|
-
end
|
30
|
-
::File.open(history_file, 'a') do |f|
|
31
|
-
f.puts "end of startup file\n"
|
32
|
-
end
|
33
|
-
})
|
34
|
-
result = start
|
35
|
-
result[:status].should == "Ready"
|
36
|
-
File.read("#{@stub.app_root}/history.txt").should ==
|
37
|
-
"end of startup file\n" +
|
38
|
-
"worker_process_started: forked=false\n"
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
end # module PhusionPassenger
|
@@ -1,48 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require 'ruby/shared/loader_sharedspec'
|
3
|
-
require 'ruby/shared/ruby_loader_sharedspec'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe "Rack preloader" do
|
8
|
-
include LoaderSpecHelper
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
@stub = register_stub(RackStub.new("rack"))
|
12
|
-
end
|
13
|
-
|
14
|
-
def start(options = {})
|
15
|
-
@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
|
16
|
-
result = @preloader.start(options)
|
17
|
-
if result[:status] == "Ready"
|
18
|
-
@loader = @preloader.spawn(options)
|
19
|
-
return @loader.start(options)
|
20
|
-
else
|
21
|
-
return result
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
it_should_behave_like "a loader"
|
26
|
-
it_should_behave_like "a Ruby loader"
|
27
|
-
|
28
|
-
it "calls the starting_worker_process event with forked=true" do
|
29
|
-
File.prepend(@stub.startup_file, %q{
|
30
|
-
history_file = "history.txt"
|
31
|
-
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
32
|
-
::File.open(history_file, 'a') do |f|
|
33
|
-
f.puts "worker_process_started: forked=#{forked}\n"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
::File.open(history_file, 'a') do |f|
|
37
|
-
f.puts "end of startup file\n"
|
38
|
-
end
|
39
|
-
})
|
40
|
-
result = start
|
41
|
-
result[:status].should == "Ready"
|
42
|
-
File.read("#{@stub.app_root}/history.txt").should ==
|
43
|
-
"end of startup file\n" +
|
44
|
-
"worker_process_started: forked=true\n"
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
end # module PhusionPassenger
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require 'ruby/shared/loader_sharedspec'
|
3
|
-
require 'ruby/shared/rails/union_station_extensions_sharedspec'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe "Rack loader with Rails 3.0" do
|
8
|
-
include LoaderSpecHelper
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
@stub = register_stub(RackStub.new("rails3.0"))
|
12
|
-
end
|
13
|
-
|
14
|
-
def start(options = {})
|
15
|
-
@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root)
|
16
|
-
return @loader.start(options)
|
17
|
-
end
|
18
|
-
|
19
|
-
def rails_version
|
20
|
-
return "3.0"
|
21
|
-
end
|
22
|
-
|
23
|
-
include_examples "Union Station extensions for Rails"
|
24
|
-
end
|
25
|
-
|
26
|
-
end # module PhusionPassenger
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require 'ruby/shared/loader_sharedspec'
|
3
|
-
require 'ruby/shared/rails/union_station_extensions_sharedspec'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe "Rack preloader with Rails 3.0" do
|
8
|
-
include LoaderSpecHelper
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
@stub = register_stub(RackStub.new("rails3.0"))
|
12
|
-
end
|
13
|
-
|
14
|
-
def start(options = {})
|
15
|
-
@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
|
16
|
-
result = @preloader.start(options)
|
17
|
-
if result[:status] == "Ready"
|
18
|
-
@loader = @preloader.spawn(options)
|
19
|
-
return @loader.start(options)
|
20
|
-
else
|
21
|
-
return result
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def rails_version
|
26
|
-
return "3.0"
|
27
|
-
end
|
28
|
-
|
29
|
-
include_examples "Union Station extensions for Rails"
|
30
|
-
end
|
31
|
-
|
32
|
-
end # module PhusionPassenger
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require 'ruby/shared/loader_sharedspec'
|
3
|
-
require 'ruby/shared/rails/union_station_extensions_sharedspec'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe "Rack loader with Rails 3.1" do
|
8
|
-
include LoaderSpecHelper
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
@stub = register_stub(RackStub.new("rails3.1"))
|
12
|
-
end
|
13
|
-
|
14
|
-
def start(options = {})
|
15
|
-
@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root)
|
16
|
-
return @loader.start(options)
|
17
|
-
end
|
18
|
-
|
19
|
-
def rails_version
|
20
|
-
return "3.1"
|
21
|
-
end
|
22
|
-
|
23
|
-
include_examples "Union Station extensions for Rails"
|
24
|
-
end
|
25
|
-
|
26
|
-
end # module PhusionPassenger
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require 'ruby/shared/loader_sharedspec'
|
3
|
-
require 'ruby/shared/rails/union_station_extensions_sharedspec'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe "Rack preloader with Rails 3.1" do
|
8
|
-
include LoaderSpecHelper
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
@stub = register_stub(RackStub.new("rails3.1"))
|
12
|
-
end
|
13
|
-
|
14
|
-
def start(options = {})
|
15
|
-
@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
|
16
|
-
result = @preloader.start(options)
|
17
|
-
if result[:status] == "Ready"
|
18
|
-
@loader = @preloader.spawn(options)
|
19
|
-
return @loader.start(options)
|
20
|
-
else
|
21
|
-
return result
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def rails_version
|
26
|
-
return "3.1"
|
27
|
-
end
|
28
|
-
|
29
|
-
include_examples "Union Station extensions for Rails"
|
30
|
-
end
|
31
|
-
|
32
|
-
end # module PhusionPassenger
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require 'ruby/shared/loader_sharedspec'
|
3
|
-
require 'ruby/shared/rails/union_station_extensions_sharedspec'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe "Rack loader with Rails 3.2" do
|
8
|
-
include LoaderSpecHelper
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
@stub = register_stub(RackStub.new("rails3.2"))
|
12
|
-
end
|
13
|
-
|
14
|
-
def start(options = {})
|
15
|
-
@loader = Loader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-loader.rb"], @stub.app_root)
|
16
|
-
return @loader.start(options)
|
17
|
-
end
|
18
|
-
|
19
|
-
def rails_version
|
20
|
-
return "3.2"
|
21
|
-
end
|
22
|
-
|
23
|
-
include_examples "Union Station extensions for Rails"
|
24
|
-
end
|
25
|
-
|
26
|
-
end # module PhusionPassenger
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
-
require 'ruby/shared/loader_sharedspec'
|
3
|
-
require 'ruby/shared/rails/union_station_extensions_sharedspec'
|
4
|
-
|
5
|
-
module PhusionPassenger
|
6
|
-
|
7
|
-
describe "Rack preloader with Rails 3.2" do
|
8
|
-
include LoaderSpecHelper
|
9
|
-
|
10
|
-
before :each do
|
11
|
-
@stub = register_stub(RackStub.new("rails3.2"))
|
12
|
-
end
|
13
|
-
|
14
|
-
def start(options = {})
|
15
|
-
@preloader = Preloader.new(["ruby", "#{PhusionPassenger.helper_scripts_dir}/rack-preloader.rb"], @stub.app_root)
|
16
|
-
result = @preloader.start(options)
|
17
|
-
if result[:status] == "Ready"
|
18
|
-
@loader = @preloader.spawn(options)
|
19
|
-
return @loader.start(options)
|
20
|
-
else
|
21
|
-
return result
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def rails_version
|
26
|
-
return "3.2"
|
27
|
-
end
|
28
|
-
|
29
|
-
include_examples "Union Station extensions for Rails"
|
30
|
-
end
|
31
|
-
|
32
|
-
end # module PhusionPassenger
|