<commit_before>ActionController::Routing::Routes.draw do |map|

  # Admin RESTful Routes
  map.namespace :admin, :member => { :remove => :get } do |admin|
    admin.resources :pages do |pages|
      pages.resources :children, :controller => "pages"
    end
    admin.resources :layouts
    admin.resources :users
  end
  map.preview 'admin/preview', :controller => 'admin/pages', :action => 'preview', :conditions => {:method => [:post, :put]}

  map.namespace :admin do |admin|
    admin.resource :preferences
    admin.resource :configuration, :controller => 'configuration'
    # admin.resources :settings
    admin.resources :extensions, :only => :index
    admin.resources :page_parts
    admin.resources :page_fields
    admin.reference '/reference/:type.:format', :controller => 'references', :action => 'show', :conditions => {:method => :get}
  end

  # Admin Routes
  map.with_options(:controller => 'admin/welcome') do |welcome|
    welcome.admin          'admin',                              :action => 'index'
    welcome.welcome        'admin/welcome',                      :action => 'index'
    welcome.login          'admin/login',                        :action => 'login'
    welcome.logout         'admin/logout',                       :action => 'logout'
  end

  # Site URLs
  map.with_options(:controller => 'site') do |site|
    site.root                                                    :action => 'show_page', :url => '/'
    site.not_found         'error/404',                          :action => 'not_found'
    site.error             'error/500',                          :action => 'error'

    # Everything else
    site.connect           '*url',                               :action => 'show_page'
  end

end<commit_msg>move to rails 3 routes<commit_after>Radiant::Engine.routes.draw do

  namespace :admin do
    resources :pages do
      resources :children, :controller => 'pages'
      member do
        get :remove
        post :preview
        put :preview
      end
    end
    resources :layouts do
      member do
        get :remove
      end
    end
    resources :users do
      member do
        get :remove
      end
    end

    resource :preferences
    resource :configuration
    resources :extensions,  :only => :index
    resources :page_parts,  :only => :create
    resources :page_fields, :only => :create
    match 'reference/:type(.:format)' => 'radiant/references#show', :as => :reference
  end

  match 'admin' => 'radiant/welcome#index', :as => :admin
  match 'admin/welcome' => 'radiant/welcome#index', :as => :welcome
  match 'admin/login' => 'radiant/welcome#login', :as => :login
  match 'admin/logout' => 'radiant/welcome#logout', :as => :logout

  match 'admin/export' => 'radiant/export#yaml', :as => :export
  match 'admin/export/yaml' => 'radiant/export#yaml', :as => :export_yaml

  root :to => 'site#show_page'

  match 'error/404' => 'site#not_found', :as => :not_found
  match 'error/500' => 'site#error', :as => :error

  # main catch-all route
  match '*url' => 'site#show_page'
end
{'fraction_non_alphanumeric': 0.13856209150326798, 'fraction_numerical': 0.004248366013071895, 'mean_word_length': 2.3453551912568305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3988053', 'n_tokens_mistral': 907, 'n_tokens_neox': 884, 'n_words': 231}