<commit_before>Feedbunch::Application.routes.draw do
  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  # root 'welcome#index'

  # Example of regular route:
  #   get 'products/:id' => 'catalog#view'

  # Example of named route that can be invoked with purchase_url(id: product.id)
  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

  # Example resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Example resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Example resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Example resource route with more complex sub-resources:
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', on: :collection
  #     end
  #   end
  
  # Example resource route with concerns:
  #   concern :toggleable do
  #     post 'toggle'
  #   end
  #   resources :posts, concerns: :toggleable
  #   resources :photos, concerns: :toggleable

  # Example resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end

  # Custom dynamic error pages
  %w( 404 422 500 ).each do |code|
    get code, :to => 'errors#show', :code => code
  end

  devise_for :users, skip: [:sessions, :passwords, :registrations, :confirmations, :unlocks, :invitations]

  # Customize login, logout etc routes instead of the Devise defaults.
  # See this[https://github.com/plataformatec/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes].
  devise_scope :user do
    # sessions
    get '/login' => 'devise/sessions#new', as: :new_user_session
    post '/login' => 'devise/sessions#create', as: :user_session
    delete '/logout' => 'devise/sessions#destroy', as: :destroy_user_session,via: Devise.mappings[:user].sign_out_via

    # passwords
    get '/password/new' => 'devise/passwords#new', as: :new_user_password
    post '/password/new' => 'devise/passwords#create', as: :user_password
    get '/password/edit' => 'devise/passwords#edit', as: :edit_user_password
    put '/password/edit' => 'devise/passwords#update'

    # registrations
    get '/signup' => 'devise/registrations#new', as: :new_user_registration
    post '/signup' => 'devise/registrations#create', as: :user_registration
    get '/profile' => 'devise/registrations#edit', as: :edit_user_registration
    put '/profile' => 'devise/registrations#update'
    delete '/profile' => 'devise/profiles#destroy', as: :delete_user_registration

    # confirmations
    get '/resend_confirmation' => 'devise/confirmations#new', as: :new_user_confirmation
    post '/resend_confirmation' => 'devise/confirmations#create', as: :user_confirmation
    get '/confirmation' => 'devise/confirmations#show'

    # unlocks
    get '/unlock' => 'devise/unlocks#new', as: :new_user_unlock
    post '/unlock' => 'devise/unlocks#create', as: :user_unlock
    get '/unlock_account' => 'devise/unlocks#show'

    # invitations
    get '/accept_invitation' => 'devise/invitations#edit', as: :accept_user_invitation
    delete '/remove_invitation' => 'devise/invitations#destroy', as: :remove_user_invitation
    post '/invitation' => 'devise/invitations#create', as: :user_invitation
    get '/invite_friend' => 'devise/invitations#new', as: :new_user_invitation
    patch '/invitation' => 'devise/invitations#update'
    put '/invitation' => 'devise/invitations#update'
  end

  # Redirect authenticated users that access the root URL to '/read'
  authenticated :user do
    get '/'  => redirect('/read')
  end

  # Static pages served with High_voltage gem
  root :to => 'high_voltage/pages#show', id: 'index'

  # Main app page
  get '/read' => 'read#index', as: :read

  namespace :api do

    # Change entries state
    match '/entries/update' => 'entries#update', via: [:patch, :put], as: 'entries_update'

    # Resourceful routes for feeds
    resources :feeds, only: [:index, :show, :create, :update, :destroy] do
      resources :entries, only: [:index]
    end

    # Resourceful routes for folders<commit_msg>Minor reorganization of routes for better readability.<commit_after>Feedbunch::Application.routes.draw do
  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  # root 'welcome#index'

  # Example of regular route:
  #   get 'products/:id' => 'catalog#view'

  # Example of named route that can be invoked with purchase_url(id: product.id)
  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

  # Example resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Example resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Example resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Example resource route with more complex sub-resources:
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', on: :collection
  #     end
  #   end
  
  # Example resource route with concerns:
  #   concern :toggleable do
  #     post 'toggle'
  #   end
  #   resources :posts, concerns: :toggleable
  #   resources :photos, concerns: :toggleable

  # Example resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end

  # Custom dynamic error pages
  %w( 404 422 500 ).each do |code|
    get code, :to => 'errors#show', :code => code
  end

  devise_for :users, skip: [:sessions, :passwords, :registrations, :confirmations, :unlocks, :invitations]

  # Customize login, logout etc routes instead of the Devise defaults.
  # See this[https://github.com/plataformatec/devise/wiki/How-To:-Change-the-default-sign_in-and-sign_out-routes].
  devise_scope :user do
    # sessions
    get '/login' => 'devise/sessions#new', as: :new_user_session
    post '/login' => 'devise/sessions#create', as: :user_session
    delete '/logout' => 'devise/sessions#destroy', as: :destroy_user_session,via: Devise.mappings[:user].sign_out_via

    # passwords
    get '/password/new' => 'devise/passwords#new', as: :new_user_password
    post '/password/new' => 'devise/passwords#create', as: :user_password
    get '/password/edit' => 'devise/passwords#edit', as: :edit_user_password
    put '/password/edit' => 'devise/passwords#update'

    # registrations
    get '/signup' => 'devise/registrations#new', as: :new_user_registration
    post '/signup' => 'devise/registrations#create', as: :user_registration
    get '/profile' => 'devise/registrations#edit', as: :edit_user_registration
    put '/profile' => 'devise/registrations#update'
    delete '/profile' => 'devise/profiles#destroy', as: :delete_user_registration

    # confirmations
    get '/resend_confirmation' => 'devise/confirmations#new', as: :new_user_confirmation
    post '/resend_confirmation' => 'devise/confirmations#create', as: :user_confirmation
    get '/confirmation' => 'devise/confirmations#show'

    # unlocks
    get '/unlock' => 'devise/unlocks#new', as: :new_user_unlock
    post '/unlock' => 'devise/unlocks#create', as: :user_unlock
    get '/unlock_account' => 'devise/unlocks#show'

    # invitations
    get '/invite_friend' => 'devise/invitations#new', as: :new_user_invitation
    post '/invitation' => 'devise/invitations#create', as: :user_invitation
    patch '/invitation' => 'devise/invitations#update'
    put '/invitation' => 'devise/invitations#update'
    get '/accept_invitation' => 'devise/invitations#edit', as: :accept_user_invitation
    delete '/remove_invitation' => 'devise/invitations#destroy', as: :remove_user_invitation
  end

  # Redirect authenticated users that access the root URL to '/read'
  authenticated :user do
    get '/'  => redirect('/read')
  end

  # Static pages served with High_voltage gem
  root :to => 'high_voltage/pages#show', id: 'index'

  # Main app page
  get '/read' => 'read#index', as: :read

  namespace :api do

    # Change entries state
    match '/entries/update' => 'entries#update', via: [:patch, :put], as: 'entries_update'

    # Resourceful routes for feeds
    resources :feeds, only: [:index, :show, :create, :update, :destroy] do
      resources :entries, only: [:index]
    end

    # Resourceful routes for folders
{'fraction_non_alphanumeric': 0.12613103673825357, 'fraction_numerical': 0.001962280606126676, 'mean_word_length': 3.5778443113772456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 69, 'https://': 2, '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': '4499797', 'n_tokens_mistral': 2941, 'n_tokens_neox': 2844, 'n_words': 791}