<commit_before>class ExercismApp < Sinatra::Base

  post '/preview' do
    md(params[:comment])
  end

  get '/nitpick/:language/?' do |language|
    redirect "/nitpick/#{language}/no-nits"
  end

  get '/nitpick/:language/:slug/?' do |language, slug|
    please_login

    presenter = current_user.sees?(language) ? Workload : NullWorkload
    workload = presenter.new(current_user, language, slug || 'no-nits')

    locals = {
      show_filters: workload.show_filters?,
      submissions: workload.submissions,
      language: workload.language,
      exercise: workload.slug,
      exercises: workload.available_exercises,
      breakdown: workload.breakdown
    }
    erb :nitpick, locals: locals
  end
end
<commit_msg>Add redirects from the old dashboard<commit_after>class ExercismApp < Sinatra::Base

  post '/preview' do
    md(params[:comment])
  end

  get '/dashboard/:language/?' do |language|
    redirect "/nitpick/#{language}/no-nits"
  end

  get '/dashboard/:language/:slug/?' do |language, slug|
    redirect "/nitpick/#{language}/#{slug}"
  end

  get '/nitpick/:language/?' do |language|
    redirect "/nitpick/#{language}/no-nits"
  end

  get '/nitpick/:language/:slug/?' do |language, slug|
    please_login

    presenter = current_user.sees?(language) ? Workload : NullWorkload
    workload = presenter.new(current_user, language, slug || 'no-nits')

    locals = {
      show_filters: workload.show_filters?,
      submissions: workload.submissions,
      language: workload.language,
      exercise: workload.slug,
      exercises: workload.available_exercises,
      breakdown: workload.breakdown
    }
    erb :nitpick, locals: locals
  end
end

{'fraction_non_alphanumeric': 0.1271641791044776, 'fraction_numerical': 0.0, 'mean_word_length': 3.3989501312335957, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7176431', 'n_tokens_mistral': 541, 'n_tokens_neox': 536, 'n_words': 118}