<commit_before>namespace :apps do
  desc 'Install rails for testing'
  task :init do
    require 'fileutils'
    %w(3 4).each do |ver|
      FileUtils.mkdir_p app="test/v#{ver}"
      next if File.exists? gemfile="#{app}/Gemfile"
      system *%w(bundle init), chdir: app
      File.open gemfile, 'a' do |f|
        f.puts "gem 'rails', '~>#{ver}'"
      end
      system *%w(bundle install), chdir: app
      system *%w(bundle exec rails new . --force --skip-bundle), chdir: app
      gf=File.read(gemfile).each_line.reject{|s|/tzinfo-data/.match s}+
        <<-EOG.each_line.map(&:lstrip)
          gem 'assets-watchify', path: '../..'
          gem 'therubyracer' unless Gem.win_platform?
          gem 'tzinfo-data'      if #{'3'==ver ? 'false' : 'Gem.win_platform?'}
        EOG
      File.write gemfile, gf*""
      system *%w(bundle install), chdir: app
      system *%w(bundle exec rails g controller welcome index), chdir: app
      File.unlink "#{app}/public/index.html" rescue nil
      FileUtils.mkdir_p "#{app}/public/assets/w6y"
    end
  end

  task :clear do
    FileUtils.remove_dir 'test'
  end
end<commit_msg>Create default route<commit_after>namespace :apps do
  desc 'Install rails for testing'
  task :init do
    require 'fileutils'
    FileUtils.mkdir_p "test"
    html=File.open "test/index.html", 'a'
    %w(3 4).each do |ver|
      html.puts "<li><a href='http://localhost:300#{ver}'>v#{ver}</a>"
      FileUtils.mkdir_p app="test/v#{ver}"
      next if File.exists? gemfile="#{app}/Gemfile"
      system *%w(bundle init), chdir: app
      File.open gemfile, 'a' do |f|
        f.puts "gem 'rails', '~>#{ver}'"
      end
      system *%w(bundle install), chdir: app
      system *%w(bundle exec rails new . --force --skip-bundle), chdir: app
      gf=File.read(gemfile).each_line.reject{|s|/tzinfo-data/.match s}+
        <<-EOG.each_line.map(&:lstrip)
          gem 'assets-watchify', path: '../..'
          gem 'therubyracer' unless Gem.win_platform?
          gem 'tzinfo-data'      if #{'3'==ver ? 'false' : 'Gem.win_platform?'}
        EOG
      File.write gemfile, gf*""
      system *%w(bundle install), chdir: app
      system *%w(bundle exec rails g controller welcome index), chdir: app
      File.unlink "#{app}/public/index.html" rescue nil
      FileUtils.mkdir_p "#{app}/public/assets/w6y"
      File.open "#{app}/config/routes.rb", 'w' do |f|
        f.puts <<-EOF
Rails.application.routes.draw do
  root to: "welcome#index"
end
        EOF
      end
    end
  end

  task :clear do
    FileUtils.remove_dir 'test'
  end
end
{'fraction_non_alphanumeric': 0.15738215816127776, 'fraction_numerical': 0.004285157771717959, 'mean_word_length': 2.6220028208744712, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 8, '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': '5349996', 'n_tokens_mistral': 920, 'n_tokens_neox': 903, 'n_words': 228}