<commit_before>Capistrano::Configuration.instance(:must_exist).load do 
  
  # a wrapper function that only sets that value if not already set
  # this is accessible to all recipe files
  def self.default(name, *args, &block)
    unless exists?(name)
      set(name, *args, &block)
    end
  end
    
  CHOICES_WEBSERVER = [:nginx, :apache, :none]
  CHOICES_APPSERVER = [:mongrel, :webrick, :none]
  CHOICES_DATABASE  = [:mysql, :postgres, :none]
  
  default :web_server_type, :nginx
  default :app_server_type, :mongrel
  default :db_server_type,  :mysql

  default(:web_server_type) do
    Capistrano::CLI.ui.choose do |menu| 
      CHOICES_WEBSERVER.each {|c| menu.choice(c)}
      menu.header = "select webserver type"
    end
  end

  default(:app_server_type) do
    Capistrano::CLI.ui.choose do |menu| 
      CHOICES_APPSERVER.each {|c| menu.choice(c)}
      menu.header = "select application server type"
    end
  end

  default(:db_server_type) do
    Capistrano::CLI.ui.choose do |menu| 
      CHOICES_DATABASE.each {|c| menu.choice(c)}
      menu.header = "select database server type"
    end
  end

  default(:application) do
    Capistrano::CLI.ui.ask "enter name of project(no spaces)" do |q|
      q.validate = /^[0-9a-z_]*$/<commit_msg>Added constants to hold config file definitions for services. These are used when generating config files and also for pushing them out to servers and setting permissions on them.<commit_after>Capistrano::Configuration.instance(:must_exist).load do 
  
  # A wrapper function that only sets that value if not already set
  # this is accessible to all recipe files
  def self.default(name, *args, &block)
    unless exists?(name)
      set(name, *args, &block)
    end
  end
  
  # The following two Constants contain details of the configuration 
  # files used by each service. They're used when generating config
  # files from templates and when configs files are pushed out to servers.
  #
  SYSTEM_CONFIG_FILES  = {} # e.g. httpd.conf
  PROJECT_CONFIG_FILES = {} # e.g. projectname-httpd-vhost.conf
  
  # Server options
  CHOICES_WEBSERVER = [:nginx, :apache, :none]
  CHOICES_APPSERVER = [:mongrel, :webrick, :none]
  CHOICES_DATABASE  = [:mysql, :postgres, :none]
  
  # Server defaults
  default :web_server_type, :nginx
  default :app_server_type, :mongrel
  default :db_server_type,  :mysql

  default(:web_server_type) do
    Capistrano::CLI.ui.choose do |menu| 
      CHOICES_WEBSERVER.each {|c| menu.choice(c)}
      menu.header = "select webserver type"
    end
  end

  default(:app_server_type) do
    Capistrano::CLI.ui.choose do |menu| 
      CHOICES_APPSERVER.each {|c| menu.choice(c)}
      menu.header = "select application server type"
    end
  end

  default(:db_server_type) do
    Capistrano::CLI.ui.choose do |menu| 
      CHOICES_DATABASE.each {|c| menu.choice(c)}
      menu.header = "select database server type"
    end
  end

  default(:application) do
    Capistrano::CLI.ui.ask "enter name of project(no spaces)" do |q|
      q.validate = /^[0-9a-z_]*$/
{'fraction_non_alphanumeric': 0.10614525139664804, 'fraction_numerical': 0.0013144922773578706, 'mean_word_length': 3.5096296296296297, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7193238', 'n_tokens_mistral': 1063, 'n_tokens_neox': 1019, 'n_words': 286}