<commit_before>MongoidTest::Application.routes.draw do

  # User authentication
  devise_for :users, :path => '/',
    :path_names => {:sign_in => 'login', :sign_out => 'logout', :sign_up => "welcome"},
    :controllers => {:registrations => "registrations"}

  username_regex = '[a-z\-A-Z0-9_]+'
  project_regex = '[a-z\-A-Z0-9_]+'
  github_regex = /#{username_regex}\/#{project_regex}/
  match '/gh/:project', :to => 'projects#show', :as => :github_project, :constraints => { :project => github_regex }, :via => [:get]
  match '/gh/:project', :to => 'builds#create', :as => :project_builds, :constraints => { :project => github_regex }, :via => [:post]

  match '/gh/:project/:id', :to => 'builds#show', :as => :build, :constraints => { :project => github_regex, :id => /\d+/ }, :via => [:get]


  match '/admin', :to => 'admin#show', :as => :admin
<commit_msg>Make the regexes cleaner.<commit_after>MongoidTest::Application.routes.draw do

  # User authentication
  devise_for :users, :path => '/',
    :path_names => {:sign_in => 'login', :sign_out => 'logout', :sign_up => "welcome"},
    :controllers => {:registrations => "registrations"}

  username_regex = '[a-zA-Z0-9_\-]+'
  project_regex = '[a-zA-Z0-9_\-]+'
  github_regex = /#{username_regex}\/#{project_regex}/
  match '/gh/:project', :to => 'projects#show', :as => :github_project, :constraints => { :project => github_regex }, :via => [:get]
  match '/gh/:project', :to => 'builds#create', :as => :project_builds, :constraints => { :project => github_regex }, :via => [:post]

  match '/gh/:project/:id', :to => 'builds#show', :as => :build, :constraints => { :project => github_regex, :id => /\d+/ }, :via => [:get]


  match '/admin', :to => 'admin#show', :as => :admin

{'fraction_non_alphanumeric': 0.23878020713463752, 'fraction_numerical': 0.004602991944764097, 'mean_word_length': 4.38390092879257, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 53, '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': '3463865', 'n_tokens_mistral': 640, 'n_tokens_neox': 622, 'n_words': 131}