<commit_before><% case testing_framework %>
<% when :rspec %>
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:<%= test_task %>) do |<%= test_task %>|
  <%= test_task %>.rspec_opts = '-I<%= test_dir %>'
end
<% when :micronaut %>
require 'micronaut/rake_task'
Micronaut::RakeTask.new(:<%= test_task %>) do |<%= test_task %>|
  <%= test_task %>.pattern = '<%= test_pattern %>'
  <%= test_task %>.ruby_opts << '-Ilib -I<%= test_dir %>'
end
<% when :shindo %>
require 'shindo/rake'
Shindo::Rake.new
<% else %>
require 'rake/testtask'
Rake::TestTask.new(:<%= test_task %>) do |<%= test_task %>|
  <%= test_task %>.libs << 'lib' << '<%= test_dir %>'
  <%= test_task %>.pattern = '<%= test_pattern %>'
  <%= test_task %>.verbose = true
end
<% end %>

<% case testing_framework %>
<% when :rspec %>
RSpec::Core::RakeTask.new(:rcov) do |spec|
  spec.rspec_opts = '-I<%= test_dir %>'
  spec.rcov = true
end
<% when :micronaut %>
Micronaut::RakeTask.new(:rcov) do |examples|
  examples.pattern = '<%= test_pattern %>'
  examples.rcov_opts = '-Ilib -I<%= test_dir %>'
  examples.rcov = true
end
<% else %>
require 'rcov/rcovtask'
Rcov::RcovTask.new do |<%= test_task %>|
  <%= test_task %>.libs << '<%= test_dir %>'
  <%= test_task %>.pattern = '<%= test_pattern %>'
  <%= test_task %>.verbose = true
end
<% end %>

<% if use_cucumber? %>
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features)
<% end %>

<% if use_reek? %>
require 'reek/adapters/rake_task'
Reek::RakeTask.new do |t|
  t.fail_on_error = true
  t.verbose = false
  t.source_files = 'lib/**/*.rb'
end
<% end %>

<% if use_roodi? %>
require 'roodi'
require 'roodi_task'
RoodiTask.new do |t|
  t.verbose = false
end
<% end %>

task :default => :<%= default_task %>

<% case documentation_framework %>
<% when :rdoc %>
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
  version = File.exist?('VERSION') ? File.read('VERSION') : ""

  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "<%= project_name %> #{version}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
<% when :yard %>
require 'yard'
YARD::Rake::YardocTask.new
<% end %><commit_msg>Set main RDoc file<commit_after><% case testing_framework %>
<% when :rspec %>
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:<%= test_task %>) do |<%= test_task %>|
  <%= test_task %>.rspec_opts = '-I<%= test_dir %>'
end
<% when :micronaut %>
require 'micronaut/rake_task'
Micronaut::RakeTask.new(:<%= test_task %>) do |<%= test_task %>|
  <%= test_task %>.pattern = '<%= test_pattern %>'
  <%= test_task %>.ruby_opts << '-Ilib -I<%= test_dir %>'
end
<% when :shindo %>
require 'shindo/rake'
Shindo::Rake.new
<% else %>
require 'rake/testtask'
Rake::TestTask.new(:<%= test_task %>) do |<%= test_task %>|
  <%= test_task %>.libs << 'lib' << '<%= test_dir %>'
  <%= test_task %>.pattern = '<%= test_pattern %>'
  <%= test_task %>.verbose = true
end
<% end %>

<% case testing_framework %>
<% when :rspec %>
RSpec::Core::RakeTask.new(:rcov) do |spec|
  spec.rspec_opts = '-I<%= test_dir %>'
  spec.rcov = true
end
<% when :micronaut %>
Micronaut::RakeTask.new(:rcov) do |examples|
  examples.pattern = '<%= test_pattern %>'
  examples.rcov_opts = '-Ilib -I<%= test_dir %>'
  examples.rcov = true
end
<% else %>
require 'rcov/rcovtask'
Rcov::RcovTask.new do |<%= test_task %>|
  <%= test_task %>.libs << '<%= test_dir %>'
  <%= test_task %>.pattern = '<%= test_pattern %>'
  <%= test_task %>.verbose = true
end
<% end %>

<% if use_cucumber? %>
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features)
<% end %>

<% if use_reek? %>
require 'reek/adapters/rake_task'
Reek::RakeTask.new do |t|
  t.fail_on_error = true
  t.verbose = false
  t.source_files = 'lib/**/*.rb'
end
<% end %>

<% if use_roodi? %>
require 'roodi'
require 'roodi_task'
RoodiTask.new do |t|
  t.verbose = false
end
<% end %>

task :default => :<%= default_task %>

<% case documentation_framework %>
<% when :rdoc %>
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
  version = File.exist?('VERSION') ? File.read('VERSION') : ""

  rdoc.main = 'README.rdoc'
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title = "<%= project_name %> #{version}"
  rdoc.rdoc_files.include('README*')
  rdoc.rdoc_files.include('lib/**/*.rb')
end
<% when :yard %>
require 'yard'
YARD::Rake::YardocTask.new
<% end %>
{'fraction_non_alphanumeric': 0.22142360306051473, 'fraction_numerical': 0.0, 'mean_word_length': 4.537869062901155, 'pattern_counts': {'":': 0, '<': 117, '<?xml version=': 0, '>': 103, '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': '4905631', 'n_tokens_mistral': 1860, 'n_tokens_neox': 1698, 'n_words': 333}