<commit_before>desc 'Initial setup of the application'
task :install => :environment do
  puts 'Creating database... '
  system 'bundle exec rake db:create'
  system 'bundle exec rake db:migrate'

  puts "\n"
  print 'Creating config/initializers/secret_token.rb... '
  secret_token = Rails.root.join('config', 'initializers', 'secret_token.rb')

  # Only create if it doesn't exit yet
  if !File.exists?(secret_token)
    File.open(secret_token, 'w') do |f|
      f.write "Boxroom::Application.config.secret_key_base = '#{SecureRandom.hex(64)}'"
    end

    puts 'OK'
  else
    puts "\n"
    puts 'config/initializers/secret_token.rb already exists'
  end

  puts "\n"
  puts 'Boxroom was installed succesfully.'
  puts "\n"
  puts 'Start the server by executing the following command:'
  puts "\n"
  puts '  bundle exec rails server'
  puts "\n"
  puts 'Point your browser to http://localhost:3000/ and enjoy!'
  puts "\n"<commit_msg>Removed :environment option from task<commit_after>desc 'Initial setup of the application'
task :install do
  puts 'Creating database... '
  system 'bundle exec rake db:create'
  system 'bundle exec rake db:migrate'

  puts "\n"
  print 'Creating config/initializers/secret_token.rb... '
  secret_token = Rails.root.join('config', 'initializers', 'secret_token.rb')

  # Only create if it doesn't exit yet
  if !File.exists?(secret_token)
    File.open(secret_token, 'w') do |f|
      f.write "Boxroom::Application.config.secret_key_base = '#{SecureRandom.hex(64)}'"
    end

    puts 'OK'
  else
    puts "\n"
    puts 'config/initializers/secret_token.rb already exists'
  end

  puts "\n"
  puts 'Boxroom was installed succesfully.'
  puts "\n"
  puts 'Start the server by executing the following command:'
  puts "\n"
  puts '  bundle exec rails server'
  puts "\n"
  puts 'Point your browser to http://localhost:3000/ and enjoy!'
  puts "\n"
{'fraction_non_alphanumeric': 0.12314225053078556, 'fraction_numerical': 0.006369426751592357, 'mean_word_length': 3.60880195599022, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '2188809', 'n_tokens_mistral': 622, 'n_tokens_neox': 625, 'n_words': 194}