<commit_before>unless defined? GitoriousConfig
  GitoriousConfig = c = YAML::load_file(File.join(Rails.root,"config/gitorious.yml"))[RAILS_ENV]

  # make the default be publicly open
  GitoriousConfig['public_mode'] = true if GitoriousConfig['public_mode'].nil?
  GitoriousConfig["locale"] = "en" if GitoriousConfig["locale"].nil?

  # require the use of SSL by default
  GitoriousConfig["use_ssl"] = true if GitoriousConfig["use_ssl"].nil?
  GitoriousConfig["scheme"] = GitoriousConfig["use_ssl"] ? "https" : "http"

  # set global locale
  I18n.default_locale = GitoriousConfig["locale"]
  I18n.locale         = GitoriousConfig["locale"]

  # set default tos/privacy policy urls
  GitoriousConfig["terms_of_service_url"] = "http://en.gitorious.org/tos" if GitoriousConfig["terms_of_service_url"].blank?
  GitoriousConfig["privacy_policy_url"] = "http://en.gitorious.org/privacy_policy" if GitoriousConfig["privacy_policy_url"].blank?

  require "subdomain_validation"
  GitoriousConfig.extend(SubdomainValidation)

  GitoriousConfig["messaging_adapter"] ||= "stomp"

  if !GitoriousConfig.valid_subdomain?
    Rails.logger.warn "Invalid subdomain name #{GitoriousConfig['gitorious_host']}. Session cookies will not work!\n" + 
      "See http://gitorious.org/gitorious/pages/ErrorMessages for further explanation"
  end

  if GitoriousConfig.using_reserved_hostname?
    Rails.logger.warn "The specified gitorious_host is reserved in Gitorious\n" + 
      "See http://gitorious.org/gitorious/pages/ErrorMessages for further explanation"
  end
end<commit_msg>Make the test messaging adapter default when RAILS_ENV is "test"<commit_after>unless defined? GitoriousConfig
  GitoriousConfig = c = YAML::load_file(File.join(Rails.root,"config/gitorious.yml"))[RAILS_ENV]

  # make the default be publicly open
  GitoriousConfig['public_mode'] = true if GitoriousConfig['public_mode'].nil?
  GitoriousConfig["locale"] = "en" if GitoriousConfig["locale"].nil?

  # require the use of SSL by default
  GitoriousConfig["use_ssl"] = true if GitoriousConfig["use_ssl"].nil?
  GitoriousConfig["scheme"] = GitoriousConfig["use_ssl"] ? "https" : "http"

  # set global locale
  I18n.default_locale = GitoriousConfig["locale"]
  I18n.locale         = GitoriousConfig["locale"]

  # set default tos/privacy policy urls
  GitoriousConfig["terms_of_service_url"] = "http://en.gitorious.org/tos" if GitoriousConfig["terms_of_service_url"].blank?
  GitoriousConfig["privacy_policy_url"] = "http://en.gitorious.org/privacy_policy" if GitoriousConfig["privacy_policy_url"].blank?

  require "subdomain_validation"
  GitoriousConfig.extend(SubdomainValidation)

  default_messaging_adapter = RAILS_ENV == "test" ? "test" : "stomp"
  GitoriousConfig["messaging_adapter"] ||= default_messaging_adapter

  if !GitoriousConfig.valid_subdomain?
    Rails.logger.warn "Invalid subdomain name #{GitoriousConfig['gitorious_host']}. Session cookies will not work!\n" + 
      "See http://gitorious.org/gitorious/pages/ErrorMessages for further explanation"
  end

  if GitoriousConfig.using_reserved_hostname?
    Rails.logger.warn "The specified gitorious_host is reserved in Gitorious\n" + 
      "See http://gitorious.org/gitorious/pages/ErrorMessages for further explanation"
  end
end
{'fraction_non_alphanumeric': 0.11632903621853898, 'fraction_numerical': 0.0024554941682013503, 'mean_word_length': 5.637474541751527, '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': '4997468', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1052, 'n_words': 203}