<commit_before>Rails.application.configure do
  # Settings specified here will take precedence over those in config/application.rb

  # This will password-protect your staging site so that search engines can't
  # index it. If they were to index it, they would penalize your site for
  # having duplicate content across two different sites.
  # The username and password are stored in environment variables that you
  # should set on your staging server. If you're deploying on Heroku, read this
  # article to learn how to set environment (also called config) variables:
  # https://devcenter.heroku.com/articles/config-vars
  config.middleware.use '::Rack::Auth::Basic' do |u, p|
    [u, p] == [ENV['STAGING_USER'], ENV['STAGING_PASSWORD']]
  end

  # --------------------------------------------------------------------------
  # CACHING SETUP FOR RACK:CACHE AND MEMCACHIER ON HEROKU
  # https://devcenter.heroku.com/articles/rack-cache-memcached-rails31
  # ------------------------------------------------------------------

  config.public_file_server.enabled = true

  # Asset digests allow you to set far-future HTTP expiration dates on all assets,
  # yet still be able to expire them through the digest params.
  config.assets.digest = true

  config.action_controller.perform_caching = true

  config.cache_store = :readthis_store, {
    expires_in: 2.weeks.to_i,
    namespace: 'cache',
    redis: { url: ENV.fetch('REDISCLOUD_URL'), driver: :hiredis }
  }

  config.action_dispatch.rack_cache = {
    metastore: "#{ENV.fetch('REDISCLOUD_URL')}/0/metastore",
    entitystore: "#{ENV.fetch('REDISCLOUD_URL')}/0/entitystore",
    use_native_ttl: true<commit_msg>Allow app to be deployed to staging<commit_after>Rails.application.configure do
  # Settings specified here will take precedence over those in config/application.rb

  # This will password-protect your staging site so that search engines can't
  # index it. If they were to index it, they would penalize your site for
  # having duplicate content across two different sites.
  # The username and password are stored in environment variables that you
  # should set on your staging server. If you're deploying on Heroku, read this
  # article to learn how to set environment (also called config) variables:
  # https://devcenter.heroku.com/articles/config-vars
  config.middleware.use ::Rack::Auth::Basic do |u, p|
    [u, p] == [ENV['STAGING_USER'], ENV['STAGING_PASSWORD']]
  end

  # --------------------------------------------------------------------------
  # CACHING SETUP FOR RACK:CACHE AND MEMCACHIER ON HEROKU
  # https://devcenter.heroku.com/articles/rack-cache-memcached-rails31
  # ------------------------------------------------------------------

  config.public_file_server.enabled = true

  # Asset digests allow you to set far-future HTTP expiration dates on all assets,
  # yet still be able to expire them through the digest params.
  config.assets.digest = true

  config.action_controller.perform_caching = true

  config.cache_store = :readthis_store, {
    expires_in: 2.weeks.to_i,
    namespace: 'cache',
    redis: { url: ENV.fetch('REDISCLOUD_URL'), driver: :hiredis }
  }

  config.action_dispatch.rack_cache = {
    metastore: "#{ENV.fetch('REDISCLOUD_URL')}/0/metastore",
    entitystore: "#{ENV.fetch('REDISCLOUD_URL')}/0/entitystore",
    use_native_ttl: true
{'fraction_non_alphanumeric': 0.1724137931034483, 'fraction_numerical': 0.002972651605231867, 'mean_word_length': 2.810872027180068, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '752041', 'n_tokens_mistral': 998, 'n_tokens_neox': 950, 'n_words': 299}