<commit_before># frozen_string_literal: true

# rubocop:disable Metrics/BlockLength

LOCALES = Rails.application.config.i18n.available_locales
LOCALE_REGEX = /#{LOCALES.map(&:to_s).join("|")}/

Rails.application.routes.draw do
  concern :has_statistics do
    resource :statistics, only: %i[show]
  end

  # Some of these links are in published literature and should not be broken
  get '/read/1071/(*x)', to: redirect('/fr/cases/mi-wolves')
  get '/read/862/(*x)', to: redirect('/cases/indonesia-conservation')
  get '/read/611/(*x)', to: redirect('/cases/ethiopia-napa')
  get '/read/497/(*x)', to: redirect('/cases/mi-wolves')

  get '(:locale)', locale: LOCALE_REGEX, to: 'catalog#home'
  root to: 'catalog#home'

  scope '(:locale)', locale: LOCALE_REGEX do
    resources :activities, only: %i[update destroy]
<commit_msg>fix: stop redefining constants in routes file<commit_after># frozen_string_literal: true

# rubocop:disable Metrics/BlockLength

LOCALES ||= Rails.application.config.i18n.available_locales
LOCALE_REGEX ||= /#{LOCALES.map(&:to_s).join("|")}/

Rails.application.routes.draw do
  concern :has_statistics do
    resource :statistics, only: %i[show]
  end

  # Some of these links are in published literature and should not be broken
  get '/read/1071/(*x)', to: redirect('/fr/cases/mi-wolves')
  get '/read/862/(*x)', to: redirect('/cases/indonesia-conservation')
  get '/read/611/(*x)', to: redirect('/cases/ethiopia-napa')
  get '/read/497/(*x)', to: redirect('/cases/mi-wolves')

  get '(:locale)', locale: LOCALE_REGEX, to: 'catalog#home'
  root to: 'catalog#home'

  scope '(:locale)', locale: LOCALE_REGEX do
    resources :activities, only: %i[update destroy]

{'fraction_non_alphanumeric': 0.16745562130177516, 'fraction_numerical': 0.01775147928994083, 'mean_word_length': 4.810996563573883, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5726896', 'n_tokens_mistral': 610, 'n_tokens_neox': 583, 'n_words': 140}