<commit_before>class AdminRequest
  def self.matches?(request)
    not Whitehall.government_single_domain?(request)
  end
end

Whitehall::Application.routes.draw do
  def redirect(path)
    super(Whitehall.router_prefix + path)
  end

  root to: redirect("/")

  scope "specialist" do
    resources :specialist_guides, path: 'guides', only: [:show, :index]
  end

  scope Whitehall.router_prefix, shallow_path: Whitehall.router_prefix do
    root to: "site#sunset"
    match '/home' => "site#index", as: :home
    match 'feed.atom' => 'site#index', format: false, defaults: { format: 'atom' }, as: :atom_feed
    match '/tour' => 'site#tour'

    resources :announcements, only: [:index], path: 'news-and-speeches'
    resources :policies, only: [:index, :show] do
      resources :supporting_pages, path: "supporting-pages", only: [:index, :show]
    end
    resources :news_articles, path: 'news', only: [:show, :index]
    resources :publications, only: [:index, :show] do
      get '/by-policy-topic/:policy_topics', on: :collection,
        to: 'publications#by_policy_topic', as: :by_policy_topic
    end

    resources :international_priorities, path: "international-priorities", only: [:index, :show]
    resources :consultations, only: [:index, :show] do
      collection do
        get :open
        get :closed<commit_msg>Redirect /specialist => /specialist/guides<commit_after>class AdminRequest
  def self.matches?(request)
    not Whitehall.government_single_domain?(request)
  end
end

Whitehall::Application.routes.draw do
  def redirect(path, options = {prefix: Whitehall.router_prefix})
    super(options[:prefix] + path)
  end

  root to: redirect("/")

  match '/specialist' => redirect("/specialist/guides", prefix: "")
  scope "specialist" do
    resources :specialist_guides, path: 'guides', only: [:show, :index]
  end

  scope Whitehall.router_prefix, shallow_path: Whitehall.router_prefix do
    root to: "site#sunset"
    match '/home' => "site#index", as: :home
    match 'feed.atom' => 'site#index', format: false, defaults: { format: 'atom' }, as: :atom_feed
    match '/tour' => 'site#tour'

    resources :announcements, only: [:index], path: 'news-and-speeches'
    resources :policies, only: [:index, :show] do
      resources :supporting_pages, path: "supporting-pages", only: [:index, :show]
    end
    resources :news_articles, path: 'news', only: [:show, :index]
    resources :publications, only: [:index, :show] do
      get '/by-policy-topic/:policy_topics', on: :collection,
        to: 'publications#by_policy_topic', as: :by_policy_topic
    end

    resources :international_priorities, path: "international-priorities", only: [:index, :show]
    resources :consultations, only: [:index, :show] do
      collection do
        get :open
        get :closed
{'fraction_non_alphanumeric': 0.13995001785076758, 'fraction_numerical': 0.0, 'mean_word_length': 4.094545454545455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2079378', 'n_tokens_mistral': 912, 'n_tokens_neox': 893, 'n_words': 240}