<commit_before>CarrierWave.configure do |config|
  config.fog_credentials = {
    provider:              'AWS',
    aws_access_key_id:     ENV['AWS_S3_ACCESS_KEY_ID'],
    aws_secret_access_key: ENV['AWS_S3_SECRET_ACCESS_KEY'],
    region:                ENV['AWS_S3_REGION']
  }

  config.fog_directory  = ENV['AWS_S3_BUCKET']
  config.fog_public     = true
  config.fog_attributes = { cache_control: "public, max-age=#{365.day.to_i}" }

  # NSW State Library Amplify uses the same S3 bucket for production
  # and staging environments
  if Rails.env.production? || Rails.env.staging?
    # Use AWS storage if in production or staging
    config.storage = :fog
  else
    # Use local storage if in development or test
    config.storage = ENV['CARRIERWAVE_STORAGE'].to_sym || :file
  end
end<commit_msg>[AM-123] Full test for carrierwave<commit_after>CarrierWave.configure do |config|
  config.fog_credentials = {
    provider:              'AWS',
    aws_access_key_id:     ENV['AWS_S3_ACCESS_KEY_ID'],
    aws_secret_access_key: ENV['AWS_S3_SECRET_ACCESS_KEY'],
    region:                ENV['AWS_S3_REGION']
  }

  config.fog_directory  = ENV['AWS_S3_BUCKET']
  config.fog_public     = true
  config.fog_attributes = { cache_control: "public, max-age=#{365.day.to_i}" }

  # NSW State Library Amplify uses the same S3 bucket for production
  # and staging environments
  if Rails.env.production? || Rails.env.staging?
    # Use AWS storage if in production or staging
    config.storage = :fog
  else
    # Use local storage if in development or test
    config.storage = ENV.key?('CARRIERWAVE_STORAGE') ?
      ENV['CARRIERWAVE_STORAGE'].to_sym : :file
  end
end
{'fraction_non_alphanumeric': 0.10011990407673861, 'fraction_numerical': 0.011390887290167866, 'mean_word_length': 3.4036939313984167, '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': '1989016', 'n_tokens_mistral': 610, 'n_tokens_neox': 578, 'n_words': 126}