<commit_before>require 'erubis'
module DTK
  class ManageGitServerGitolite < ManageGitServer

    ALLOWED_CHARACTERS = /[a-zA-Z0-9\-_]*/

    class << self
      def create_server_repo(repo_obj,repo_user_acls,opts={})
        ret = repo_name = repo_obj[:repo_name]

        validate_repo_module_name!(repo_name)
        if repos_having_config_files().include?(repo_name)
          if opts[:delete_if_exists]
            delete_server_repo(repo_name)
          else
            raise Error.new("trying to create a repo (#{repo_name}) that exists already on gitolite server")
          end
        end

        config_dir = repo_config_directory()
        Dir.mkdir(config_dir) unless File.directory?(config_dir)
        path = repo_config_file_relative_path(repo_name)
        file_asset_hash = {:path => path}
        content = generate_config_file_content(repo_name,repo_user_acls)
        admin_repo.add_file(file_asset_hash,content)
        admin_repo.push_changes()
        ret<commit_msg>Added . to allowed characters, no_build<commit_after>require 'erubis'
module DTK
  class ManageGitServerGitolite < ManageGitServer

    ALLOWED_CHARACTERS = /[a-zA-Z0-9\-_\.]*/

    class << self
      def create_server_repo(repo_obj,repo_user_acls,opts={})
        ret = repo_name = repo_obj[:repo_name]

        validate_repo_module_name!(repo_name)
        if repos_having_config_files().include?(repo_name)
          if opts[:delete_if_exists]
            delete_server_repo(repo_name)
          else
            raise Error.new("trying to create a repo (#{repo_name}) that exists already on gitolite server")
          end
        end

        config_dir = repo_config_directory()
        Dir.mkdir(config_dir) unless File.directory?(config_dir)
        path = repo_config_file_relative_path(repo_name)
        file_asset_hash = {:path => path}
        content = generate_config_file_content(repo_name,repo_user_acls)
        admin_repo.add_file(file_asset_hash,content)
        admin_repo.push_changes()
        ret
{'fraction_non_alphanumeric': 0.08639523336643495, 'fraction_numerical': 0.0019860973187686196, 'mean_word_length': 3.038076152304609, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '6349279', 'n_tokens_mistral': 647, 'n_tokens_neox': 628, 'n_words': 109}