<commit_before>SimpleCaptcha.setup do |sc|
  sc.image_size = AppConfig.settings.captcha.image_size
  value_length = AppConfig.settings.captcha.captcha_length.to_i
  if value_length <= 12 && value_length > 0 
    sc.length = value_length
  else
    sc.length = 5
  end
  sc.image_style = AppConfig.settings.captcha.image_style
  sc.distortion = AppConfig.settings.captcha.distortion
  p AppConfig.settings.captcha
end<commit_msg>Simplified range check<commit_after>SimpleCaptcha.setup do |sc|
  sc.image_size = AppConfig.settings.captcha.image_size
  sc.length = [1, [AppConfig.settings.captcha_length.to_i, 12].min].max
  sc.image_style = AppConfig.settings.captcha.image_style
  sc.distortion = AppConfig.settings.captcha.distortion
  p AppConfig.settings.captcha
end
{'fraction_non_alphanumeric': 0.09505208333333333, 'fraction_numerical': 0.009114583333333334, 'mean_word_length': 4.825757575757576, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '2390830', 'n_tokens_mistral': 278, 'n_tokens_neox': 259, 'n_words': 42}