<commit_before># frozen_string_literal: true
# Default CarrierWave setup.
#
CarrierWave.configure do |config|
  config.permissions = 0o666
  config.directory_permissions = 0o777
  config.storage = :file
  config.enable_processing = !Rails.env.test?
end

if Rails.application.secrets.aws_access_key_id.present?
  require "carrierwave/storage/fog"

  CarrierWave.configure do |config|
    config.storage = :fog
    config.fog_provider = "fog/aws"                                             # required
    config.fog_credentials = {
      provider:              "AWS",                                             # required
      aws_access_key_id:     Rails.application.secrets.aws_access_key_id,       # required
      aws_secret_access_key: Rails.application.secrets.aws_secret_access_key,   # required
      host:                  "s3-eu-west-1.amazonaws.com",
      endpoint:              "https://s3-eu-west-1.amazonaws.com",
      region:                "eu-west-1"                                     # optional, defaults to 'us-east-1'
    }
    config.fog_directory  = "decidim-barcelona"                                 # required
    config.fog_attributes = { "Cache-Control" => "max-age=#{365.day.to_i}" }    # optional, defaults to {}
    config.asset_host = "https://s3-eu-west-1.amazonaws.com"
  end
end
<commit_msg>Fix endpoint<commit_after># frozen_string_literal: true
# Default CarrierWave setup.
#
CarrierWave.configure do |config|
  config.permissions = 0o666
  config.directory_permissions = 0o777
  config.storage = :file
  config.enable_processing = !Rails.env.test?
end

if Rails.application.secrets.aws_access_key_id.present?
  require "carrierwave/storage/fog"

  CarrierWave.configure do |config|
    config.storage = :fog
    config.fog_provider = "fog/aws"                                             # required
    config.fog_credentials = {
      provider:              "AWS",                                             # required
      aws_access_key_id:     Rails.application.secrets.aws_access_key_id,       # required
      aws_secret_access_key: Rails.application.secrets.aws_secret_access_key,   # required
      host:                  "s3-eu-west-1.amazonaws.com",
      region:                "eu-west-1"                                     # optional, defaults to 'us-east-1'
    }
    config.fog_directory  = "decidim-barcelona"                                 # required
    config.fog_attributes = { "Cache-Control" => "max-age=#{365.day.to_i}" }    # optional, defaults to {}
    config.asset_host = "https://s3-eu-west-1.amazonaws.com"
  end
end

{'fraction_non_alphanumeric': 0.10185185185185185, 'fraction_numerical': 0.013888888888888888, 'mean_word_length': 1.939909297052154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '503548', 'n_tokens_mistral': 809, 'n_tokens_neox': 771, 'n_words': 125}