<commit_before># TODO: Pull this out into Plek
module ExternalServices

  def local_environment
    ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'
  end

  def api_host
    case local_environment 
    when 'development','test'
      "local.alphagov.co.uk:3000"
    when 'production'
       "api.alpha.gov.uk"
    else
       "guides.#{local_environment}.alphagov.co.uk:8080"
    end
  end

  def front_end_host
    case local_environment
    when 'development','test'
      "http://local.alphagov.co.uk:3005"
    when 'production'
      "http://frontend.alpha.gov.uk"
    when 'staging'
      "http://demo.alphagov.co.uk"
    else
      "http://frontend.#{local_environment}.alphagov.co.uk:8080"
    end
  end

  def asset_host
    case local_environment
    when 'development','test'
      ""
    when 'production'
      "http://alpha.gov.uk"
    else
      "http://#{local_environment}.alphagov.co.uk:8080"
    end
  end

  def imminence_api_host
    case local_environment
    when 'development','test'
      "local.alphagov.co.uk:3002"
    when 'production'
      "imminence.alpha.gov.uk"<commit_msg>banish the old host entry to prevent triggering the slower port forwarding<commit_after># TODO: Pull this out into Plek
module ExternalServices

  def local_environment
    ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'
  end

  def api_host
    case local_environment
    when 'development','test'
      "publisher.dev.gov.uk"
    when 'production'
       "api.alpha.gov.uk"
    else
       "guides.#{local_environment}.alphagov.co.uk:8080"
    end
  end

  def front_end_host
    case local_environment
    when 'development','test'
      "http://www.dev.gov.uk"
    when 'production'
      "http://frontend.alpha.gov.uk"
    when 'staging'
      "http://demo.alphagov.co.uk"
    else
      "http://frontend.#{local_environment}.alphagov.co.uk:8080"
    end
  end

  def asset_host
    case local_environment
    when 'development','test'
      ""
    when 'production'
      "http://alpha.gov.uk"
    else
      "http://#{local_environment}.alphagov.co.uk:8080"
    end
  end

  def imminence_api_host
    case local_environment
    when 'development','test'
      "imminence.dev.gov.uk"
    when 'production'
      "imminence.alpha.gov.uk"
{'fraction_non_alphanumeric': 0.12262062859672422, 'fraction_numerical': 0.01593625498007968, 'mean_word_length': 2.760399334442596, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '6056160', 'n_tokens_mistral': 808, 'n_tokens_neox': 761, 'n_words': 148}