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.
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
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" |
[RW] | _spawn_options | Set during spawning, and set back to nil when spawning is done. |
[ 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
[ 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
[ show source ]
# File lib/phusion_passenger/public_api.rb, line 44 44: def install_framework_extensions!(*args) 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, *args) 49: end 50: end
[ 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
[ 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
[ 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