Module: PhusionPassenger

Defined in:
lib/phusion_passenger/events.rb,
lib/phusion_passenger/utils.rb,
lib/phusion_passenger/constants.rb,
lib/phusion_passenger/packaging.rb,
lib/phusion_passenger/exceptions.rb,
lib/phusion_passenger/admin_tools.rb,
lib/phusion_passenger/application.rb,
lib/phusion_passenger/dependencies.rb,
lib/phusion_passenger/html_template.rb,
lib/phusion_passenger/spawn_manager.rb,
lib/phusion_passenger/abstract_server.rb,
lib/phusion_passenger/message_channel.rb,
lib/phusion_passenger/railz/cgi_fixed.rb,
lib/phusion_passenger/abstract_installer.rb,
lib/phusion_passenger/rack/request_handler.rb,
lib/phusion_passenger/console_text_template.rb,
lib/phusion_passenger/railz/request_handler.rb,
lib/phusion_passenger/utils/rewindable_input.rb,
lib/phusion_passenger/railz/framework_spawner.rb,
lib/phusion_passenger/abstract_request_handler.rb,
lib/phusion_passenger/rack/application_spawner.rb,
lib/phusion_passenger/wsgi/application_spawner.rb,
lib/phusion_passenger/railz/application_spawner.rb,
lib/phusion_passenger/abstract_server_collection.rb,
lib/phusion_passenger/admin_tools/control_process.rb,
ext/phusion_passenger/native_support.c

Overview

Phusion Passenger - http://www.modrails.com/ Copyright (c) 2008, 2009 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.

Defined Under Namespace

Modules: AdminTools, Dependencies, NativeSupport, Rack, Railz, Utils, WSGI Classes: AbstractInstaller, AbstractRequestHandler, AbstractServer, AbstractServerCollection, AppInitError, Application, ConsoleTextTemplate, Dependency, FrameworkInitError, HTMLTemplate, InitializationError, InvalidPath, MessageChannel, SpawnManager, UnknownError, VersionNotFound

Constant Summary collapse

VERSION_STRING =

Phusion Passenger version number. Don't forget to edit ext/common/Version.h too.

'2.2.10'
DEFAULT_FRAMEWORK_SPAWNER_MAX_IDLE_TIME =
30 * 60
DEFAULT_APP_SPAWNER_MAX_IDLE_TIME =
10 * 60
LIBDIR =
File.expand_path(File.join(File.dirname(__FILE__), ".."))
DOCDIR =
File.expand_path(File.join(LIBDIR, "..", "doc"))
@@event_starting_worker_process =
[]
@@event_stopping_worker_process =
[]

Class Method Summary collapse

Class Method Details

.call_event(name, *args) ⇒ Object



32
33
34
35
36
# File 'lib/phusion_passenger/events.rb', line 32

def self.call_event(name, *args)
	callback_list_for_event(name).each do |callback|
		callback.call(*args)
	end
end

.natively_packaged?Boolean

Returns whether this Phusion Passenger installation is packaged using the OS's native package management system, i.e. as opposed to being installed from source or with RubyGems.

Returns:

  • (Boolean)


30
31
32
# File 'lib/phusion_passenger/packaging.rb', line 30

def self.natively_packaged?
	return !File.exist?("#{LIBDIR}/../Rakefile")
end

.on_event(name, &block) ⇒ Object



28
29
30
# File 'lib/phusion_passenger/events.rb', line 28

def self.on_event(name, &block)
	callback_list_for_event(name) << block
end