Flowdock
method

validate

Importance_0
v2.2.1 - Show latest stable - 0 notes - Class: Rails::MongrelServer::Start
validate() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/mongrel_server/commands.rb, line 82
      def validate
        if @config_file
          valid_exists?(@config_file, "Config file not there: #@config_file")
          return false unless @valid
          @config_file = File.expand_path(@config_file)
          load_config
          return false unless @valid
        end

        @cwd = File.expand_path(@cwd)
        valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd"

        # Change there to start, then we'll have to come back after daemonize
        Dir.chdir(@cwd)

        valid?(@prefix[0] == ?/ && @prefix[-1] != ?/, "Prefix must begin with / and not end in /") if @prefix
        valid_dir? File.dirname(@log_file), "Path to log file not valid: #@log_file"
        valid_dir? File.dirname(@pid_file), "Path to pid file not valid: #@pid_file"
        valid_dir? @docroot, "Path to docroot not valid: #@docroot"
        valid_exists? @mime_map, "MIME mapping file does not exist: #@mime_map" if @mime_map
        valid_exists? @config_file, "Config file not there: #@config_file" if @config_file
        valid_dir? File.dirname(@generate), "Problem accessing directory to #@generate" if @generate
        valid_user? @user if @user
        valid_group? @group if @group

        return @valid
      end
Register or log in to add new notes.