<commit_before>require 'find'

def scm
  scm = ENV['SCM'] || 'git'
  if !(scm == 'svn' || scm == 'git' || scm == 'git_with_svn')
    puts "#{scm} is not supported. Please use svn or git."
    exit
  end
  scm
end

# Extract project name.
def project_name
  File.expand_path(Rails.root).split("/").last
end

# Run coverage test to check project coverage.
def rcov_verify
  sh "ruby #{File.expand_path(File.dirname(__FILE__) + '/../test/coverage_test.rb')}" 
end

# Stop mongrel server.
def stop_mongrel
  sh "mongrel_rails stop" if FileTest.exists?('log/mongrel.pid') 
end

# Print message with separator.
def p80(message)
  puts "-"*80
  puts message if message
  yield if block_given?
end

# Extract environment parameters
def environment_parameters(key)
  return ENV[key].split(/\s*\,\s*/) if ENV[key]
  []
end

# Remove old backups<commit_msg>fix test coverage call<commit_after>require 'find'

def scm
  scm = ENV['SCM'] || 'git'
  if !(scm == 'svn' || scm == 'git' || scm == 'git_with_svn')
    puts "#{scm} is not supported. Please use svn or git."
    exit
  end
  scm
end

# Extract project name.
def project_name
  File.expand_path(Rails.root).split("/").last
end

# Run coverage test to check project coverage.
def rcov_verify
  sh "ruby #{File.expand_path(File.dirname(__FILE__) + '/../../test/coverage_test.rb')}" 
end

# Stop mongrel server.
def stop_mongrel
  sh "mongrel_rails stop" if FileTest.exists?('log/mongrel.pid') 
end

# Print message with separator.
def p80(message)
  puts "-"*80
  puts message if message
  yield if block_given?
end

# Extract environment parameters
def environment_parameters(key)
  return ENV[key].split(/\s*\,\s*/) if ENV[key]
  []
end

# Remove old backups
{'fraction_non_alphanumeric': 0.13908450704225353, 'fraction_numerical': 0.004694835680751174, 'mean_word_length': 3.830028328611898, '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': '3915919', 'n_tokens_mistral': 626, 'n_tokens_neox': 619, 'n_words': 180}