<commit_before>class ExercismApp < Sinatra::Base

  get '/:username' do |username|
    please_login
    user = User.where(username: username).first
    if user
      title(user.username)
      erb :user, locals: {user: user, current: user.current_exercises, completed: user.completed_exercises}
    else
      status 404
      erb :not_found
    end
  end

end<commit_msg>Make user url case insensitive<commit_after>class ExercismApp < Sinatra::Base

  get '/:username' do |username|
    please_login
    user = User.where(username: /\A#{username}\z/i).first

    if user
      title(user.username)
      erb :user, locals: {user: user, current: user.current_exercises, completed: user.completed_exercises}
    else
      status 404
      erb :not_found
    end
  end

end
{'fraction_non_alphanumeric': 0.09715025906735751, 'fraction_numerical': 0.007772020725388601, 'mean_word_length': 3.1559139784946235, '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': '60749', 'n_tokens_mistral': 259, 'n_tokens_neox': 246, 'n_words': 65}