<commit_before>class BadgeUploader < CarrierWave::Uploader::Base
  include CarrierWave::MiniMagick

  storage :file

  def default_url
    'fallback/' + [version_name, 'default_badge.png'].compact.join('_')
  end

  process resize_to_fit: [64, 64]

  version :thumb do
    process resize_to_fill: [32, 32]
  end

  def extension_white_list
    %w(jpg jpeg png)
  end

  def content_type_whitelist
    %r{image\/}
  end
end
<commit_msg>Made BadgeUploader store images in a subdirectory<commit_after>class BadgeUploader < CarrierWave::Uploader::Base
  include CarrierWave::MiniMagick

  storage :file

  def default_url
    'fallback/' + [version_name, 'default_badge.png'].compact.join('_')
  end

  def store_dir
    'badges'
  end

  process resize_to_fit: [64, 64]

  version :thumb do
    process resize_to_fill: [32, 32]
  end

  def extension_white_list
    %w(jpg jpeg png)
  end

  def content_type_whitelist
    %r{image\/}
  end
end

{'fraction_non_alphanumeric': 0.09554140127388536, 'fraction_numerical': 0.016985138004246284, 'mean_word_length': 3.811224489795918, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2862521', 'n_tokens_mistral': 374, 'n_tokens_neox': 335, 'n_words': 82}