# File lib/phusion_passenger/platform_info/depcheck.rb, line 293 def add(identifier) @dep_identifiers << identifier end
# 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
# 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
Generated with the Darkfish Rdoc Generator 2.