lib/open_project/gitolite/gitolite_wrapper/projects.rb
def clear_gitolite_config
      @admin.transaction do
        gitolite_admin_dir = OpenProject::Gitolite::Config.get_setting(:gitolite_admin_dir)
        config_file = OpenProject::Gitolite::GitoliteWrapper.gitolite_admin_settings[:config_file]
        config_file_full_pat = File.join(gitolite_admin_dir, 'conf', config_file)

        # Delete old config file to recreate it form scratch
        logger.info("#{@action} : Cleaning Gitolite configuration file '#{config_file}' ...")
        if File.exists?(config_file_full_pat)
          FileUtils.rm_f(config_file_full_pat)
        end
        FileUtils.touch(config_file_full_pat)

        @admin.reload!
        gitolite_admin_repo_commit("Cleaning Gitolite configuration from '#{config_file}'")
      end
    end
##
# Truncates the +openproject.conf+ file prior to synchronization
# so that all configurations made from the plugin are reset.
Truncates the +openproject.conf+ file prior to synchronization
so that all configurations made from the plugin are reset.
Truncates the + openproject . conf + file prior to synchronization so that all configurations made from the plugin are reset .
def clear_gitolite_config
      @admin.transaction do
        gitolite_admin_dir = OpenProject::Gitolite::Config.get_setting(:gitolite_admin_dir)
        config_file = OpenProject::Gitolite::GitoliteWrapper.gitolite_admin_settings[:config_file]
        config_file_full_pat = File.join(gitolite_admin_dir, 'conf', config_file)
        logger.info("#{@action} : Cleaning Gitolite configuration file '#{config_file}' ...")
        if File.exists?(config_file_full_pat)
          FileUtils.rm_f(config_file_full_pat)
        end
        FileUtils.touch(config_file_full_pat)
        @admin.reload!
        gitolite_admin_repo_commit("Cleaning Gitolite configuration from '#{config_file}'")
      end
    end
def clear_gitolite_config @admin . transaction do gitolite_admin_dir = OpenProject :: Gitolite :: Config . get_setting ( :gitolite_admin_dir ) config_file = OpenProject :: Gitolite :: GitoliteWrapper . gitolite_admin_settings [ :config_file ] config_file_full_pat = File . join ( gitolite_admin_dir , 'conf' , config_file ) logger . info ( "#{@action} : Cleaning Gitolite configuration file '#{config_file}' ..." ) if File . exists? ( config_file_full_pat ) FileUtils . rm_f ( config_file_full_pat ) end FileUtils . touch ( config_file_full_pat ) @admin . reload! gitolite_admin_repo_commit ( "Cleaning Gitolite configuration from '#{config_file}'" ) end end
Truncates the +openproject.conf+ file prior to synchronization
so that all configurations made from the plugin are reset.
Truncates the + openproject . conf + file prior to synchronization so that all configurations made from the plugin are reset .
# Delete old config file to recreate it form scratch