<commit_before># == Route Map
#
#                   Prefix Verb   URI Pattern                          Controller#Action
#       authenticated_root GET    /                                    groups#index
#                     root GET    /                                    static_pages#home
#         new_user_session GET    /login(.:format)                     devise/sessions#new
#             user_session POST   /login(.:format)                     devise/sessions#create
#     destroy_user_session DELETE /logout(.:format)                    devise/sessions#destroy
#            user_password POST   /password(.:format)                  devise/passwords#create
#        new_user_password GET    /password/new(.:format)              devise/passwords#new
#       edit_user_password GET    /password/edit(.:format)             devise/passwords#edit
#                          PATCH  /password(.:format)                  devise/passwords#update
#                          PUT    /password(.:format)                  devise/passwords#update
# cancel_user_registration GET    /cancel(.:format)                    users/registrations#cancel
#        user_registration POST   /                                    users/registrations#create
#    new_user_registration GET    /register(.:format)                  users/registrations#new
#   edit_user_registration GET    /account_settings(.:format)          users/registrations#edit
#                          PATCH  /                                    users/registrations#update
#                          PUT    /                                    users/registrations#update
#                          DELETE /                                    users/registrations#destroy
#         account_settings GET    /account_settings(.:format)          users/registrations#edit
#             logout_index GET    /exit(.:format)                      sessions#destroy
#                          POST   /exit(.:format)                      sessions#destroy
#               new_logout GET    /exit/new(.:format)                  sessions#destroy
#              edit_logout GET    /exit/:id/edit(.:format)             sessions#destroy
#                   logout GET    /exit/:id(.:format)                  sessions#destroy
#                          PATCH  /exit/:id(.:format)                  sessions#destroy
#                          PUT    /exit/:id(.:format)                  sessions#destroy
#                          DELETE /exit/:id(.:format)                  sessions#destroy
#                edit_user GET    /users/:id/edit(.:format)            users#edit
#                     user GET    /users/:id(.:format)                 users#show
#                          PATCH  /users/:id(.:format)                 users#update
#                          PUT    /users/:id(.:format)                 users#update
#                   groups GET    /groups(.:format)                    groups#index
#                          POST   /groups(.:format)                    groups#create
#                new_group GET    /groups/new(.:format)                groups#new
#               edit_group GET    /groups/:id/edit(.:format)           groups#edit
#                    group GET    /groups/:id(.:format)                groups#show
#                          PATCH  /groups/:id(.:format)                groups#update
#                          PUT    /groups/:id(.:format)                groups#update
#                          DELETE /groups/:id(.:format)                groups#destroy
#           member_listing GET    /groups/:id/member_listing(.:format) groups#member_listing
#

Rails.application.routes.draw do
  mount RailsAdmin::Engine => '/admin', as: 'rails_admin'
  ##################################################
  # General
  ##################################################
  authenticated :user do
    root :to => "groups#index", :as => "authenticated_root"
  end
  root 'static_pages#home'

  ##################################################
  # Devise
  ##################################################
  devise_for :users, :path => '',
  :path_names => {:sign_up => 'register', :sign_in => 'login', :sign_out => 'logout', :edit => 'users/:id/account_settings'},
  :controllers => {:registrations => 'users/registrations'}
  devise_scope :users do
    get "users/:id/account_settings" => "users/registrations#edit", :as => "account_settings"
    # TODO (Shannon): Refactor routes.
  end

  ##################################################
  # Sessions
  ##################################################
  resources 'exit', to: 'sessions#destroy', as: :logout

  ##################################################
  # Users
  ##################################################
  resources :users, :only => [:show, :edit, :update]

  ##################################################
  # Groups
  ##################################################
  resources :groups, shallow: true do
    member do
      get "member_listing"
      put "join"
      put "leave"
    end
    resources :posts do
      resources :replies
    end
  end

  ##################################################
  # Posts
  ##################################################

end<commit_msg>Refactor routes<commit_after># == Route Map
#
#                   Prefix Verb   URI Pattern                          Controller#Action
#       authenticated_root GET    /                                    groups#index
#                     root GET    /                                    static_pages#home
#         new_user_session GET    /login(.:format)                     devise/sessions#new
#             user_session POST   /login(.:format)                     devise/sessions#create
#     destroy_user_session DELETE /logout(.:format)                    devise/sessions#destroy
#            user_password POST   /password(.:format)                  devise/passwords#create
#        new_user_password GET    /password/new(.:format)              devise/passwords#new
#       edit_user_password GET    /password/edit(.:format)             devise/passwords#edit
#                          PATCH  /password(.:format)                  devise/passwords#update
#                          PUT    /password(.:format)                  devise/passwords#update
# cancel_user_registration GET    /cancel(.:format)                    users/registrations#cancel
#        user_registration POST   /                                    users/registrations#create
#    new_user_registration GET    /register(.:format)                  users/registrations#new
#   edit_user_registration GET    /account_settings(.:format)          users/registrations#edit
#                          PATCH  /                                    users/registrations#update
#                          PUT    /                                    users/registrations#update
#                          DELETE /                                    users/registrations#destroy
#         account_settings GET    /account_settings(.:format)          users/registrations#edit
#             logout_index GET    /exit(.:format)                      sessions#destroy
#                          POST   /exit(.:format)                      sessions#destroy
#               new_logout GET    /exit/new(.:format)                  sessions#destroy
#              edit_logout GET    /exit/:id/edit(.:format)             sessions#destroy
#                   logout GET    /exit/:id(.:format)                  sessions#destroy
#                          PATCH  /exit/:id(.:format)                  sessions#destroy
#                          PUT    /exit/:id(.:format)                  sessions#destroy
#                          DELETE /exit/:id(.:format)                  sessions#destroy
#                edit_user GET    /users/:id/edit(.:format)            users#edit
#                     user GET    /users/:id(.:format)                 users#show
#                          PATCH  /users/:id(.:format)                 users#update
#                          PUT    /users/:id(.:format)                 users#update
#                   groups GET    /groups(.:format)                    groups#index
#                          POST   /groups(.:format)                    groups#create
#                new_group GET    /groups/new(.:format)                groups#new
#               edit_group GET    /groups/:id/edit(.:format)           groups#edit
#                    group GET    /groups/:id(.:format)                groups#show
#                          PATCH  /groups/:id(.:format)                groups#update
#                          PUT    /groups/:id(.:format)                groups#update
#                          DELETE /groups/:id(.:format)                groups#destroy
#           member_listing GET    /groups/:id/member_listing(.:format) groups#member_listing
#

Rails.application.routes.draw do
  mount RailsAdmin::Engine => "/admin", as: "rails_admin"
  ##################################################
  # General
  ##################################################
  authenticated :user do
    root to: "groups#index", as: "authenticated_root"
  end
  root 'static_pages#home'

  ##################################################
  # Devise
  ##################################################
  devise_for :users, path: "", path_names: {sign_up: "register", sign_in: "login", sign_out: "logout", edit: "users/:id/account_settings"}, controllers: {registrations: "users/registrations"}
  devise_scope :users do
    get "users/:id/account_settings" => "users/registrations#edit", :as => "account_settings"
    # TODO(Shannon): Refactor routes.
  end

  ##################################################
  # Sessions
  ##################################################
  resources "exit", to: 'sessions#destroy', as: :logout

  ##################################################
  # Users
  ##################################################
  resources :users, only: [:show, :edit, :update]

  ##################################################
  # Groups
  ##################################################
  resources :groups, shallow: true do
    member do
      get "member_listing"
      put "join"
      put "leave"
    end
    resources :posts do
      resources :replies
    end
  end

  ##################################################
  # Posts
  ##################################################

end
{'fraction_non_alphanumeric': 0.20019157088122605, 'fraction_numerical': 0.0, 'mean_word_length': 1.5603236880823934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5663275', 'n_tokens_mistral': 2580, 'n_tokens_neox': 2440, 'n_words': 457}