<commit_before>Rails.application.routes.draw do
  # The root page is kind of dynamic
  root 'meta_welcome#index'

  if Rails.env.development?
    get '/sandbox' => 'sandbox#index'
    get '/sandbox/*template' => 'sandbox#show'
  end

  # Admin module
  namespace :gobierto_admin, as: :admin, path: :admin do
    get '/' => 'welcome#index', as: :root
    get '/login' => 'sessions#new'

    resource :sessions, only: [:new, :create, :destroy]
    resources :sites, only: [:index, :new, :create, :edit, :update, :destroy]

    namespace :sites do
      resource :sessions, only: [:create, :destroy]
    end

    resources :admins, only: [:index, :show, :new, :create, :edit, :update]

    namespace :admin do
      resource :invitations, only: [:new, :create]
      resource :confirmations, only: [:new, :create, :show]
      resource :invitation_acceptances, only: [:show]
      resource :passwords, only: [:new, :create, :edit, :update]
    end

    resources :users, only: [:index, :show, :edit, :update] do
      resource :welcome_messages, only: [:create], controller: "users/welcome_messages"
      resource :passwords, only: [:new, :create], controller: "users/passwords"
    end

    namespace :census do
      resource :imports, only: [:new, :create]
    end

    resources :activities, only: [:index]

    namespace :gobierto_budget_consultations, as: :budget, path: :budgets do
      resources :consultations, only: [:index, :show, :new, :create, :edit, :update] do
        resources :consultation_items, controller: "consultations/consultation_items", path: :items
        resource :consultation_items_sort, only: [:create], controller: "consultations/consultation_items_sort", path: :items_sort
        resources :consultation_responses, only: [:index, :show], controller: "consultations/consultation_responses", path: :responses
        resource :consultation_reports, only: [:show], controller: "consultations/consultation_reports", path: :reports
      end
    end
  end

  # User module
  namespace :user do
    constraints GobiertoSiteConstraint.new do
      get '/' => 'welcome#index', as: :root
      get '/login' => 'sessions#new'
      get '/signup' => 'registrations#new'

      resource :sessions, only: [:new, :create, :destroy]
      resource :registrations, only: [:new, :create]
      resource :confirmations, only: [:new, :create, :show]
      resource :passwords, only: [:new, :create, :edit, :update]
      resource :census_verifications, only: [:show, :new, :create], path: :verifications
    end
  end

  # Gobierto Budget Consultations module
  namespace :gobierto_budget_consultations, path: 'presupuestos' do
    constraints GobiertoSiteConstraint.new do
      resources :consultations, only: [:index, :show], path: 'consultas' do
        get 'participa', to: 'consultations/consultation_responses#new', as: :new_response
        match :participate, to: 'consultations/consultation_responses#create', as: :response, via: [:post, :patch]

        get 'resumen', to: 'consultations/consultation_confirmations#new', as: :new_confirmation
        post 'confirma', to: 'consultations/consultation_confirmations#create', as: :confirmation
        get 'terminado', to: 'consultations/consultation_confirmations#show', as: :show_confirmation
      end

      resources :consultation_participations, only: [:show], path: :participations
    end
  end

  # Gobierto Budgets module
  namespace :gobierto_budgets, path: nil do
    constraints GobiertoSiteConstraint.new do
      get 'site' => 'sites#show'

      # legal pages (TODO: we should merge them)
      get 'privacy' => 'pages#privacy'
      get 'legal' => 'pages#legal'
      get 'cookie_warning' => 'pages#cookie_warning'

      resources :featured_budget_lines, only: [:show]

      get 'presupuestos/resumen(/:year)' => 'budgets#index', as: :budgets
      get 'presupuestos/partidas/:year/:area_name/:kind' => 'budget_lines#index', as: :budget_lines
      get 'presupuestos/partidas/:id/:year/:area_name/:kind' => 'budget_lines#show', as: :budget_line
      get 'budget_line_descendants/:year/:area_name/:kind' => 'budget_line_descendants#index', as: :budget_line_descendants
      get 'presupuestos/ejecucion(/:year)' => 'budgets_execution#index', as: :budgets_execution
      get 'budgets/treemap(/:year)' => 'budget_lines#treemap', as: :budget_lines_treemap

      # TODO: move to an API > move to the big indexer
      get 'all_categories/:slug/:year' => 'search#all_categories', as: :search_all_categories

      namespace :api do
        get '/categories' => 'categories#index'
        get '/categories/:area/:kind' => 'categories#index'
        get '/data/widget/budget/:ine_code/:year/:code/:area/:kind' => 'data#budget', as: :data_budget
        get '/data/widget/budget_per_inhabitant/:ine_code/:year/:code/:area/:kind' => 'data#budget_per_inhabitant', as: :data_budget_per_inhabitant
        get '/data/lines/:ine_code/:year/:what' => 'data#lines', as: :data_lines
        get '/data/lines/budget_line/:ine_code/:year/:what/:kind/:code/:area' => 'data#lines', as: :data_lines_budget_line
        get '/data/widget/budget_execution_deviation/:ine_code/:year/:kind' => 'data#budget_execution_deviation', as: :data_budget_execution_deviation
      end
    end
  end
end
<commit_msg>Update `GobiertoBudgetConsultations` module base path<commit_after>Rails.application.routes.draw do
  # The root page is kind of dynamic
  root 'meta_welcome#index'

  if Rails.env.development?
    get '/sandbox' => 'sandbox#index'
    get '/sandbox/*template' => 'sandbox#show'
  end

  # Admin module
  namespace :gobierto_admin, as: :admin, path: :admin do
    get '/' => 'welcome#index', as: :root
    get '/login' => 'sessions#new'

    resource :sessions, only: [:new, :create, :destroy]
    resources :sites, only: [:index, :new, :create, :edit, :update, :destroy]

    namespace :sites do
      resource :sessions, only: [:create, :destroy]
    end

    resources :admins, only: [:index, :show, :new, :create, :edit, :update]

    namespace :admin do
      resource :invitations, only: [:new, :create]
      resource :confirmations, only: [:new, :create, :show]
      resource :invitation_acceptances, only: [:show]
      resource :passwords, only: [:new, :create, :edit, :update]
    end

    resources :users, only: [:index, :show, :edit, :update] do
      resource :welcome_messages, only: [:create], controller: "users/welcome_messages"
      resource :passwords, only: [:new, :create], controller: "users/passwords"
    end

    namespace :census do
      resource :imports, only: [:new, :create]
    end

    resources :activities, only: [:index]

    namespace :gobierto_budget_consultations, as: :budget, path: :budgets do
      resources :consultations, only: [:index, :show, :new, :create, :edit, :update] do
        resources :consultation_items, controller: "consultations/consultation_items", path: :items
        resource :consultation_items_sort, only: [:create], controller: "consultations/consultation_items_sort", path: :items_sort
        resources :consultation_responses, only: [:index, :show], controller: "consultations/consultation_responses", path: :responses
        resource :consultation_reports, only: [:show], controller: "consultations/consultation_reports", path: :reports
      end
    end
  end

  # User module
  namespace :user do
    constraints GobiertoSiteConstraint.new do
      get '/' => 'welcome#index', as: :root
      get '/login' => 'sessions#new'
      get '/signup' => 'registrations#new'

      resource :sessions, only: [:new, :create, :destroy]
      resource :registrations, only: [:new, :create]
      resource :confirmations, only: [:new, :create, :show]
      resource :passwords, only: [:new, :create, :edit, :update]
      resource :census_verifications, only: [:show, :new, :create], path: :verifications
    end
  end

  # Gobierto Budget Consultations module
  namespace :gobierto_budget_consultations, path: 'consultas_presupuestos' do
    constraints GobiertoSiteConstraint.new do
      resources :consultations, only: [:index, :show], path: '' do
        get 'participa', to: 'consultations/consultation_responses#new', as: :new_response
        match :participate, to: 'consultations/consultation_responses#create', as: :response, via: [:post, :patch]

        get 'resumen', to: 'consultations/consultation_confirmations#new', as: :new_confirmation
        post 'confirma', to: 'consultations/consultation_confirmations#create', as: :confirmation
        get 'terminado', to: 'consultations/consultation_confirmations#show', as: :show_confirmation
      end

      resources :consultation_participations, only: [:show], path: :participations
    end
  end

  # Gobierto Budgets module
  namespace :gobierto_budgets, path: nil do
    constraints GobiertoSiteConstraint.new do
      get 'site' => 'sites#show'

      # legal pages (TODO: we should merge them)
      get 'privacy' => 'pages#privacy'
      get 'legal' => 'pages#legal'
      get 'cookie_warning' => 'pages#cookie_warning'

      resources :featured_budget_lines, only: [:show]

      get 'presupuestos/resumen(/:year)' => 'budgets#index', as: :budgets
      get 'presupuestos/partidas/:year/:area_name/:kind' => 'budget_lines#index', as: :budget_lines
      get 'presupuestos/partidas/:id/:year/:area_name/:kind' => 'budget_lines#show', as: :budget_line
      get 'budget_line_descendants/:year/:area_name/:kind' => 'budget_line_descendants#index', as: :budget_line_descendants
      get 'presupuestos/ejecucion(/:year)' => 'budgets_execution#index', as: :budgets_execution
      get 'budgets/treemap(/:year)' => 'budget_lines#treemap', as: :budget_lines_treemap

      # TODO: move to an API > move to the big indexer
      get 'all_categories/:slug/:year' => 'search#all_categories', as: :search_all_categories

      namespace :api do
        get '/categories' => 'categories#index'
        get '/categories/:area/:kind' => 'categories#index'
        get '/data/widget/budget/:ine_code/:year/:code/:area/:kind' => 'data#budget', as: :data_budget
        get '/data/widget/budget_per_inhabitant/:ine_code/:year/:code/:area/:kind' => 'data#budget_per_inhabitant', as: :data_budget_per_inhabitant
        get '/data/lines/:ine_code/:year/:what' => 'data#lines', as: :data_lines
        get '/data/lines/budget_line/:ine_code/:year/:what/:kind/:code/:area' => 'data#lines', as: :data_lines_budget_line
        get '/data/widget/budget_execution_deviation/:ine_code/:year/:kind' => 'data#budget_execution_deviation', as: :data_budget_execution_deviation
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.13823057312812764, 'fraction_numerical': 0.0, 'mean_word_length': 4.114437469821342, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 55, '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': '5153567', 'n_tokens_mistral': 3513, 'n_tokens_neox': 3499, 'n_words': 827}