<commit_before>Fablabs::Application.routes.draw do

  require 'sidekiq/web'
  require "admin_constraint"
  mount Sidekiq::Web, at: '/sidekiq', constraints: AdminConstraint.new

  # constraints subdomain: 'www' do
    # resources :discussions

    resources :featured_images

    get "verify_email(/:id)", to: "users#verify_email", as: "verify_email"

    %w(about choose_locale).each do |action|
      get action => "static##{action}", as: action
    end

    resources :users
    resources :tools do
      # resources :discussions
    end
    resources :brands

    resources :comments, only: [:create]
    resources :sessions
    resources :recoveries do
      collection do
        get :check_inbox
      end
    end

    get "signout" => "sessions#destroy", :as => "signout"
    get "signin" => "sessions#new", :as => "signin"
    get "signup" => "users#new", :as => "signup"
    get "settings" => "users#edit", :as => "settings"

    get "resend_verification_email" => "users#resend_verification_email"

    namespace :backstage do
      resources :users
      resources :labs do
        member do
          patch :approve
          patch :reject
          patch :remove
        end
      end
      root to: 'labs#index'
    end

    resources :employees do
      member do
        patch :approve
      end
    end

    # resources :labs, path: '', only: [:show]

    # resources :labs, only: [:show, :destroy], path: ''
     #, except: [:show]
    get 'labs' => 'labs#index'
    post 'labs' => 'labs#create'
    resources :labs, path: '', except: :index do
      resources :admin_applications
      resources :role_applications
      resources :employees
      # resources :discussions
      resources :admins do
        collection do
          delete '/' => 'admins#destroy'
        end
      end
      member do
        get :manage_admins
      end
      collection do
        get :map
      end
    end

    # root to: 'static#home'


  constraints subdomain: 'api' do
    use_doorkeeper
    # get '/' => 'static#api'
    api versions: 1, module: "api/v1" do
      get 'me' => 'users#show'
      resources :labs, only: [:index]
    end
  end
  # end

  root to: 'static#home'

end
<commit_msg>www subdomain constraint<commit_after>Fablabs::Application.routes.draw do

  require 'sidekiq/web'
  require "admin_constraint"
  mount Sidekiq::Web, at: '/sidekiq', constraints: AdminConstraint.new

  get "signout" => "sessions#destroy", :as => "signout"
  get "signin" => "sessions#new", :as => "signin"
  resources :sessions

  constraints subdomain: 'www' do
    # resources :discussions

    resources :featured_images

    get "verify_email(/:id)", to: "users#verify_email", as: "verify_email"

    %w(about choose_locale).each do |action|
      get action => "static##{action}", as: action
    end

    resources :users
    resources :tools do
      # resources :discussions
    end
    resources :brands

    resources :comments, only: [:create]

    resources :recoveries do
      collection do
        get :check_inbox
      end
    end

    get "signup" => "users#new", :as => "signup"
    get "settings" => "users#edit", :as => "settings"

    get "resend_verification_email" => "users#resend_verification_email"

    namespace :backstage do
      resources :users
      resources :labs do
        member do
          patch :approve
          patch :reject
          patch :remove
        end
      end
      root to: 'labs#index'
    end

    resources :employees do
      member do
        patch :approve
      end
    end

    # resources :labs, path: '', only: [:show]

    # resources :labs, only: [:show, :destroy], path: ''
     #, except: [:show]
    get 'labs' => 'labs#index'
    post 'labs' => 'labs#create'
    resources :labs, path: '', except: :index do
      resources :admin_applications
      resources :role_applications
      resources :employees
      # resources :discussions
      resources :admins do
        collection do
          delete '/' => 'admins#destroy'
        end
      end
      member do
        get :manage_admins
      end
      collection do
        get :map
      end
    end

    root to: 'static#home'

  end

  constraints subdomain: 'api' do
    use_doorkeeper
    get '/' => 'static#api'
    api versions: 1, module: "api/v1" do
      get 'me' => 'users#show'
      resources :labs, only: [:index]
    end
  end

end

{'fraction_non_alphanumeric': 0.1142334932602239, 'fraction_numerical': 0.0009138679460817912, 'mean_word_length': 2.4229867083659107, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, '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': '2307248', 'n_tokens_mistral': 1409, 'n_tokens_neox': 1356, 'n_words': 395}