<commit_before>require 'api_constraints'

Rails.application.routes.draw do
  apipie
  devise_for :users

  resources :users
  resources :assets
  resources :revisions, only: [:show, :index]
  resources :statuses, only: [:show, :index]
  resources :components
  resources :reports, only: [:show, :index]

  namespace :api, defaults: { format: :json } do
    scope module: :v1, constraints: ApiConstraints.new( version: 1, default: true ) do
      resources :users, only: [:show]
      resources :assets, only: [:index, :show, :create, :update, :destroy] do
        get 'search', on: :collection
      end
      resources :revisions, only: [:index, :show, :create, :update, :destroy]
      resources :statuses, only: [:index, :show, :create, :update, :destroy]
      resources :components, only: [:index, :show, :create, :update, :destroy]
      resources :reports, only: [:index, :show, :create, :update, :destroy]
    end
  end

  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  root 'reports#index'

  # Example of regular route:<commit_msg>moved apipie into the api section<commit_after>require 'api_constraints'

Rails.application.routes.draw do
  devise_for :users

  resources :users
  resources :assets
  resources :revisions, only: [:show, :index]
  resources :statuses, only: [:show, :index]
  resources :components
  resources :reports, only: [:show, :index]

  namespace :api, defaults: { format: :json } do
    apipie
    scope module: :v1, constraints: ApiConstraints.new( version: 1, default: true ) do
      resources :users, only: [:show]
      resources :assets, only: [:index, :show, :create, :update, :destroy] do
        get 'search', on: :collection
      end
      resources :revisions, only: [:index, :show, :create, :update, :destroy]
      resources :statuses, only: [:index, :show, :create, :update, :destroy]
      resources :components, only: [:index, :show, :create, :update, :destroy]
      resources :reports, only: [:index, :show, :create, :update, :destroy]
    end
  end

  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  root 'reports#index'

  # Example of regular route:
{'fraction_non_alphanumeric': 0.12531120331950207, 'fraction_numerical': 0.0016597510373443983, 'mean_word_length': 3.880566801619433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2307278', 'n_tokens_mistral': 753, 'n_tokens_neox': 732, 'n_words': 274}