Module PhusionPassenger |
In: | lib/phusion_passenger/abstract_installer.rb lib/phusion_passenger/abstract_request_handler.rb lib/phusion_passenger/abstract_server.rb lib/phusion_passenger/abstract_server_collection.rb lib/phusion_passenger/admin_tools.rb lib/phusion_passenger/analytics_logger.rb lib/phusion_passenger/app_process.rb lib/phusion_passenger/console_text_template.rb lib/phusion_passenger/constants.rb lib/phusion_passenger/debug_logging.rb lib/phusion_passenger/dependencies.rb lib/phusion_passenger/exceptions.rb lib/phusion_passenger/html_template.rb lib/phusion_passenger/message_channel.rb lib/phusion_passenger/message_client.rb lib/phusion_passenger/native_support.rb lib/phusion_passenger/packaging.rb lib/phusion_passenger/platform_info.rb lib/phusion_passenger/plugin.rb lib/phusion_passenger/public_api.rb lib/phusion_passenger/spawn_manager.rb lib/phusion_passenger/utils.rb lib/phusion_passenger/admin_tools/memory_stats.rb lib/phusion_passenger/admin_tools/server_instance.rb lib/phusion_passenger/classic_rails/application_spawner.rb lib/phusion_passenger/classic_rails/cgi_fixed.rb lib/phusion_passenger/classic_rails/framework_spawner.rb lib/phusion_passenger/classic_rails/request_handler.rb lib/phusion_passenger/classic_rails_extensions/init.rb lib/phusion_passenger/platform_info/apache.rb lib/phusion_passenger/platform_info/binary_compatibility.rb lib/phusion_passenger/platform_info/compiler.rb lib/phusion_passenger/platform_info/curl.rb lib/phusion_passenger/platform_info/documentation_tools.rb lib/phusion_passenger/platform_info/linux.rb lib/phusion_passenger/platform_info/operating_system.rb lib/phusion_passenger/platform_info/ruby.rb lib/phusion_passenger/platform_info/zlib.rb lib/phusion_passenger/rack/application_spawner.rb lib/phusion_passenger/rack/request_handler.rb lib/phusion_passenger/rails3_extensions/init.rb lib/phusion_passenger/standalone/app_finder.rb lib/phusion_passenger/standalone/command.rb lib/phusion_passenger/standalone/config_file.rb lib/phusion_passenger/standalone/help_command.rb lib/phusion_passenger/standalone/main.rb lib/phusion_passenger/standalone/package_runtime_command.rb lib/phusion_passenger/standalone/runtime_installer.rb lib/phusion_passenger/standalone/start_command.rb lib/phusion_passenger/standalone/status_command.rb lib/phusion_passenger/standalone/stop_command.rb lib/phusion_passenger/standalone/utils.rb lib/phusion_passenger/standalone/version_command.rb lib/phusion_passenger/utils/file_system_watcher.rb lib/phusion_passenger/utils/hosts_file_parser.rb lib/phusion_passenger/utils/rewindable_input.rb lib/phusion_passenger/utils/tmpdir.rb lib/phusion_passenger/utils/unseekable_socket.rb lib/phusion_passenger/wsgi/application_spawner.rb

Phusion Passenger - www.modrails.com/ Copyright (c) 2010 Phusion

"Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Methods

- benchmark
- call_event
- install_framework_extensions!
- log_cache_hit
- log_cache_miss
- on_event

Classes and Modules
Module PhusionPassenger::AdminTools
Module PhusionPassenger::ClassicRails
Module PhusionPassenger::ClassicRailsExtensions
Module PhusionPassenger::DebugLogging
Module PhusionPassenger::Packaging
Module PhusionPassenger::PlatformInfo
Module PhusionPassenger::Rack
Module PhusionPassenger::Rails3Extensions
Module PhusionPassenger::Standalone
Module PhusionPassenger::Utils
Module PhusionPassenger::WSGI
Class PhusionPassenger::AbstractInstaller
Class PhusionPassenger::AbstractRequestHandler
Class PhusionPassenger::AbstractServer
Class PhusionPassenger::AbstractServerCollection
Class PhusionPassenger::AnalyticsLogger
Class PhusionPassenger::AppInitError
Class PhusionPassenger::AppProcess
Class PhusionPassenger::ConsoleTextTemplate
Class PhusionPassenger::FrameworkInitError
Class PhusionPassenger::HTMLTemplate
Class PhusionPassenger::InitializationError
Class PhusionPassenger::InvalidPath
Class PhusionPassenger::MessageChannel
Class PhusionPassenger::MessageClient
Class PhusionPassenger::NativeSupportLoader
Class PhusionPassenger::Plugin
Class PhusionPassenger::SpawnManager
Class PhusionPassenger::UnknownError
Class PhusionPassenger::VersionNotFound
Constants

DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME | = | 30 * 60
DEFAULT_APP_SPAWNER_MAX_IDLE_TIME | = | 10 * 60
ROOT_UID | = | 0
ROOT_GID | = | 0
PASSENGER_ANALYTICS_WEB_LOG | = | "PASSENGER_ANALYTICS_WEB_LOG"
PASSENGER_TXN_ID | = | "PASSENGER_TXN_ID"
PASSENGER_GROUP_NAME | = | "PASSENGER_GROUP_NAME"
PASSENGER_UNION_STATION_KEY | = | "PASSENGER_UNION_STATION_KEY"

Attributes

[RW] | _spawn_options | Set during spawning, and set back to nil when spawning is done.

Public Class methods
benchmark(env = nil, title = "Benchmarking") {|| ...}

[ show source ]

        # File lib/phusion_passenger/public_api.rb, line 52
    52:         def benchmark(env = nil, title = "Benchmarking")
    53:                 log = lookup_analytics_log(env)
    54:                 if log
    55:                         log.measure("BENCHMARK: #{title}") do
    56:                                 yield
    57:                         end
    58:                 else
    59:                         yield
    60:                 end
    61:         end

call_event(name, *args)

[ show source ]

        # File lib/phusion_passenger/public_api.rb, line 38
    38:         def call_event(name, *args)
    39:                 callback_list_for_event(name).each do |callback|
    40:                         callback.call(*args)
    41:                 end
    42:         end

install_framework_extensions!()

[ show source ]

        # File lib/phusion_passenger/public_api.rb, line 44
    44:         def install_framework_extensions!
    45:                 require 'rails/version' if defined?(::Rails) && !defined?(::Rails::VERSION)
    46:                 if defined?(::Rails) && ::Rails::VERSION::MAJOR == 3
    47:                         require 'phusion_passenger/rails3_extensions/init'
    48:                         Rails3Extensions.init!(_spawn_options)
    49:                 end
    50:         end

log_cache_hit(env, name)

[ show source ]

        # File lib/phusion_passenger/public_api.rb, line 63
    63:         def log_cache_hit(env, name)
    64:                 log = lookup_analytics_log(env)
    65:                 if log
    66:                         log.message("Cache hit: #{name}")
    67:                         return true
    68:                 else
    69:                         return false
    70:                 end
    71:         end

log_cache_miss(env, name, generation_time = nil)

[ show source ]

        # File lib/phusion_passenger/public_api.rb, line 73
    73:         def log_cache_miss(env, name, generation_time = nil)
    74:                 log = lookup_analytics_log(env)
    75:                 if log
    76:                         if generation_time
    77:                                 log.message("Cache miss (#{generation_time.to_i}): #{name}")
    78:                         else
    79:                                 log.message("Cache miss: #{name}")
    80:                         end
    81:                         return true
    82:                 else
    83:                         return false
    84:                 end
    85:         end

on_event(name, &block)

[ show source ]

        # File lib/phusion_passenger/public_api.rb, line 34
    34:         def on_event(name, &block)
    35:                 callback_list_for_event(name) << block
    36:         end