Parent

Class/Module Index [+]

Quicksearch

PhusionPassenger::Standalone::RuntimeInstaller

Installs the Phusion Passenger Standalone runtime by downloading or compiling the Phusion Passenger support binaries and Nginx, and then storing them in the designated directories. This installer is entirely non-interactive.

The following option must be given:

If `targets` contains `:support_binaries`, then you must also specify this options:

If `targets` contains `:nginx`, then you must also specify these options:

Other optional options:

Public Class Methods

new(*args) click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 75
def initialize(*args)
        super(*args)
        raise ArgumentError, "At least one target must be given" if @targets.nil? || @targets.empty?
        if @targets.include?(:support_binaries)
                if PhusionPassenger.natively_packaged?
                        raise ArgumentError, "You cannot specify :support_binaries as a " +
                                "target when natively packaged"
                end
                raise ArgumentError, ":support_dir must be given" if !@support_dir
        end
        if @targets.include?(:nginx)
                raise ArgumentError, ":nginx_dir must be given" if !@nginx_dir
                raise ArgumentError, ":lib_dir must be given" if !@lib_dir
        end
end

Protected Instance Methods

after_install() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 140
def after_install
        super
        FileUtils.remove_entry_secure(@working_dir) if @working_dir
        @plugin.call_hook(:runtime_installer_cleanup) if @plugin
end
before_install() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 131
def before_install
        super
        @plugin.call_hook(:runtime_installer_start, self) if @plugin
        @working_dir = PhusionPassenger::Utils.mktmpdir("passenger.", PlatformInfo.tmpexedir)
        @nginx_version ||= PREFERRED_NGINX_VERSION
        @download_binaries = true if !defined?(@download_binaries)
        @binaries_url_root ||= BINARIES_URL_ROOT
end
dependencies() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 92
def dependencies
        specs = [
                'depcheck_specs/compiler_toolchain',
                'depcheck_specs/ruby',
                'depcheck_specs/gems',
                'depcheck_specs/libs',
                'depcheck_specs/utilities'
        ]
        ids = [
                'gcc',
                'g++',
                'gmake',
                'ruby-openssl',
                'rubygems',
                'rake',
                'rack',
                'libcurl-dev',
                'openssl-dev',
                'zlib-dev',
                'pcre-dev',
                'daemon_controller >= 1.1.0'
        ].compact
        return [specs, ids]
end
run_steps() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 121
def run_steps
        show_welcome_screen if @nginx_dir
        check_whether_os_is_broken
        check_for_download_tool
        download_or_compile_binaries
        puts
        puts "<green><b>All done!</b></green>"
        puts
end
users_guide() click to toggle source
# File lib/phusion_passenger/standalone/runtime_installer.rb, line 117
def users_guide
        return "#{PhusionPassenger.doc_dir}/Users guide Standalone.html"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.