### Home Classes Methods

### In Files

- lib/phusion_passenger/platform_info/depcheck.rb

### Parent

Object

### Methods

- ::new
- #add
- #check_all
- #print_installation_instructions_for_missing_dependencies

### Class/Module Index

Quicksearch

- PhusionPassenger
- PhusionPassenger::AbstractInstaller
- PhusionPassenger::AbstractInstaller::Abort
- PhusionPassenger::AbstractInstaller::CommandError
- PhusionPassenger::AdminTools
- PhusionPassenger::AdminTools::MemoryStats
- PhusionPassenger::AdminTools::MemoryStats::Process
- PhusionPassenger::AdminTools::ServerInstance
- PhusionPassenger::AdminTools::ServerInstance::CorruptedDirectoryError
- PhusionPassenger::AdminTools::ServerInstance::GenerationsAbsentError
- PhusionPassenger::AdminTools::ServerInstance::Group
- PhusionPassenger::AdminTools::ServerInstance::Process
- PhusionPassenger::AdminTools::ServerInstance::RoleDeniedError
- PhusionPassenger::AdminTools::ServerInstance::StaleDirectoryError
- PhusionPassenger::AdminTools::ServerInstance::Stats
- PhusionPassenger::AdminTools::ServerInstance::UnsupportedGenerationStructureVersionError
- PhusionPassenger::AnalyticsLogger
- PhusionPassenger::AnalyticsLogger::Connection
- PhusionPassenger::AnalyticsLogger::Lock
- PhusionPassenger::AnalyticsLogger::Log
- PhusionPassenger::ClassicRails
- PhusionPassenger::ClassicRails::CGIFixed
- PhusionPassenger::ClassicRails::ThreadHandlerExtension
- PhusionPassenger::ConsoleTextTemplate
- PhusionPassenger::DebugLogging
- PhusionPassenger::LoaderSharedHelpers
- PhusionPassenger::MessageChannel
- PhusionPassenger::MessageChannel::InvalidHashError
- PhusionPassenger::MessageClient
- PhusionPassenger::NativeSupportLoader
- PhusionPassenger::Packaging
- PhusionPassenger::PlatformInfo
- PhusionPassenger::PlatformInfo::ApacheDetector
- PhusionPassenger::PlatformInfo::ApacheDetector::Result
- PhusionPassenger::PlatformInfo::Depcheck
- PhusionPassenger::PlatformInfo::Depcheck::ConsoleRunner
- PhusionPassenger::PlatformInfo::Depcheck::Dependency
- PhusionPassenger::PlatformInfo::RuntimeError
- PhusionPassenger::Plugin
- PhusionPassenger::PreloaderSharedHelpers
- PhusionPassenger::Rack
- PhusionPassenger::Rack::OutOfBandGc
- PhusionPassenger::Rack::ThreadHandlerExtension
- PhusionPassenger::Rails3Extensions
- PhusionPassenger::Rails3Extensions::AnalyticsLogging
- PhusionPassenger::Rails3Extensions::AnalyticsLogging::ACExtension
- PhusionPassenger::Rails3Extensions::AnalyticsLogging::ASBenchmarkableExtension
- PhusionPassenger::Rails3Extensions::AnalyticsLogging::ExceptionLogger
- PhusionPassenger::RequestHandler
- PhusionPassenger::RequestHandler::ThreadHandler
- PhusionPassenger::RequestHandler::ThreadHandler::Interrupted
- PhusionPassenger::SharedConstants
- PhusionPassenger::Standalone
- PhusionPassenger::Standalone::AppFinder
- PhusionPassenger::Standalone::Command
- PhusionPassenger::Standalone::ConfigFile
- PhusionPassenger::Standalone::ConfigFile::DisallowedContextError
- PhusionPassenger::Standalone::HelpCommand
- PhusionPassenger::Standalone::Main
- PhusionPassenger::Standalone::PackageRuntimeCommand
- PhusionPassenger::Standalone::RuntimeInstaller
- PhusionPassenger::Standalone::RuntimeLocator
- PhusionPassenger::Standalone::StartCommand
- PhusionPassenger::Standalone::StatusCommand
- PhusionPassenger::Standalone::StopCommand
- PhusionPassenger::Standalone::Utils
- PhusionPassenger::Standalone::VersionCommand
- PhusionPassenger::Utils
- PhusionPassenger::Utils::AnsiColors
- PhusionPassenger::Utils::FileSystemWatcher
- PhusionPassenger::Utils::FileSystemWatcher::DirInfo
- PhusionPassenger::Utils::FileSystemWatcher::FileInfo
- PhusionPassenger::Utils::GeneratorTest
- PhusionPassenger::Utils::HostsFileParser
- PhusionPassenger::Utils::JSON
- PhusionPassenger::Utils::JSON::Generator
- PhusionPassenger::Utils::ParserTest
- PhusionPassenger::Utils::TeeInput
- PhusionPassenger::Utils::TmpIO
- PhusionPassenger::Utils::UnseekableSocket
- CommonLibraryBuilder
- Exception
- GC
- IO
- Object
- Signal

No matching classes.

# PhusionPassenger::PlatformInfo::Depcheck::ConsoleRunner

### Attributes

missing_dependencies[R]

### Public Class Methods

new() click to toggle source

    # File lib/phusion_passenger/platform_info/depcheck.rb, line 288
    def initialize
            @stdout = STDOUT
            @dep_identifiers = []
    end

### Public Instance Methods

add(identifier) click to toggle source

    # File lib/phusion_passenger/platform_info/depcheck.rb, line 293
    def add(identifier)
            @dep_identifiers << identifier
    end

check_all() click to toggle source

    # File lib/phusion_passenger/platform_info/depcheck.rb, line 297
    def check_all
            old_log_impl = PlatformInfo.log_implementation
            begin
                    PlatformInfo.log_implementation = lambda do |message|
                            message = PlatformInfo.send(:reindent, message, 10)
                            message.sub!(/^          /, '')
                            STDOUT.puts "       -> #{message}"
                    end
                    @missing_dependencies = []
                    @dep_identifiers.each do |identifier|
                            dep = Depcheck.find(identifier)
                            raise "Cannot find depcheck spec #{identifier.inspect}" if !dep
                            puts_header "Checking for #{dep.name}..."
                            result = dep.check
                            result = { :found => false } if !result

                            if result[:found] && !result[:error]
                                    puts_detail "Found: <green>yes</green>"
                            else
                                    if result[:error]
                                            puts_detail "Found: #{result[:found] ? "<yellow>yes, but there was an error</yellow>" : "<red>no</red>"}"
                                            puts_detail "Error: <red>#{result[:error]}</red>"
                                    else
                                            puts_detail "Found: #{result[:found] ? "<green>yes</green>" : "<red>no</red>"}"
                                    end
                                    @missing_dependencies << dep
                            end

                            result.each_pair do |key, value|
                                    if key.is_a?(String)
                                            puts_detail "#{key}: #{value}"
                                    end
                            end
                    end

                    return @missing_dependencies.empty?
            ensure
                    PlatformInfo.log_implementation = old_log_impl
            end
    end

print_installation_instructions_for_missing_dependencies() click to toggle source

    # File lib/phusion_passenger/platform_info/depcheck.rb, line 338
    def print_installation_instructions_for_missing_dependencies
            @missing_dependencies.each do |dep|
                    puts " * To install <yellow>#{dep.name}</yellow>:"
                    puts "   #{dep.install_instructions}"
                    if dep.install_comments
                            puts "   #{dep.install_comments}"
                    end
                    puts
            end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.