<commit_before>require 'rake'
require 'spec/rake/spectask'
require 'rake/testtask'
require 'rake/rdoctask'

task :default  => [:spec, :test, :cleanup_test]
desc "Update vendor directory and run tests"
task :ci => ["poolparty:vendor:setup", "poolparty:vendor:update", :spec, :test]

task :cleanup_test do
  ::FileUtils.rm_rf "/tmp/poolparty"
end

Spec::Rake::SpecTask.new(:spec) do |t|
  t.warning = t.rcov = false
  t.spec_files = Dir["spec/**/*_spec.rb"]
end

Spec::Rake::SpecTask.new(:spec_v) do |t|
  t.rcov = true
  t.rcov_opts = ['--exclude', 'gems*,spec*,website*,test*']
  t.ruby_opts = []
  t.spec_files = Dir["spec/**/*_spec.rb"]
end

# task :test do
#   sh "ruby -Ilib:test #{Dir["#{File.dirname(__FILE__)}/../test/poolparty/*/*.rb"].join(" ")}"
# end

Rake::TestTask.new(:test) do |t|
  t.test_files = FileList['test/lib/**/*_test.rb']
  t.warning = false
  t.verbose = false
end

begin
  require 'rcov/rcovtask'
 
  Rcov::RcovTask.new(:rcov) do |t|
    t.libs << FileList['lib/poolparty/**/*.rb']
    dot_rakes = 
    t.rcov_opts = [
      '-xRakefile', '-xrakefile',
      '-xlib/erlang',
      '--text-report',
      '--sort coverage'
    ] + FileList['tasks/*.rake'].pathmap("-x%p")
    t.test_files = FileList['test/poolparty/**/*_test.rb']
    t.output_dir = 'coverage'
    t.verbose = true
  end
rescue LoadError
  puts "RCov is not available"
end<commit_msg>Updated rcov task<commit_after>require 'rake'
require 'spec/rake/spectask'
require 'rake/testtask'
require 'rake/rdoctask'

task :default  => [:spec, :test, :cleanup_test]
desc "Update vendor directory and run tests"
task :ci => ["poolparty:vendor:setup", "poolparty:vendor:update", :spec, :test]

task :cleanup_test do
  ::FileUtils.rm_rf "/tmp/poolparty"
end

Spec::Rake::SpecTask.new(:spec) do |t|
  t.warning = t.rcov = false
  t.spec_files = Dir["spec/**/*_spec.rb"]
end

Spec::Rake::SpecTask.new(:spec_v) do |t|
  t.rcov = true
  t.rcov_opts = ['--exclude', 'gems*,spec*,website*,test*']
  t.ruby_opts = []
  t.spec_files = Dir["spec/**/*_spec.rb"]
end

# task :test do
#   sh "ruby -Ilib:test #{Dir["#{File.dirname(__FILE__)}/../test/poolparty/*/*.rb"].join(" ")}"
# end

Rake::TestTask.new(:test) do |t|
  t.test_files = FileList['test/lib/**/*_test.rb']
  t.warning = true
  t.verbose = true
end

begin
  require 'rcov/rcovtask'
 
  Rcov::RcovTask.new(:rcov) do |t|
    t.libs << FileList['lib/**/*.rb']
    t.rcov_opts = [
      '-xRakefile', '-xrakefile',
      '-xlib/erlang',
      '--text-report',
      '--sort coverage'
    ]# + FileList['tasks/*.rake'].pathmap("-x%p")
    t.test_files = FileList['test/lib/**/*_test.rb']
    t.output_dir = 'coverage'
    t.verbose = true
  end
rescue LoadError
  puts "RCov is not available"
end
{'fraction_non_alphanumeric': 0.20154185022026433, 'fraction_numerical': 0.0, 'mean_word_length': 3.7063903281519863, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6225118', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1071, 'n_words': 206}