<commit_before>Rails.application.routes.draw do
  root 'projects#index'

  devise_for :users

  resources :services, only: [:index, :create]
  resources :projects do
    resources :raw_data, except: [:show]
  end

  namespace :api, defaults: { format: 'json' } do
    get '/' => redirect('/api/v1')

    namespace :v1 do
      get '/' => 'base#who_are_you'
    end
  end

  put '/services/:id', to: 'services#update', constraints: { id: /[0-9]+/ }, as: 'service'
  patch '/services/:id', to: 'services#update', constraints: { id: /[0-9]+/ }
  delete '/services/:id', to: 'services#destroy', constraints: { id: /[0-9]+/ }

  get '/services/:id/edit', to: 'services#edit', constraints: { id: /[0-9]+/ }, as: 'edit_service'

  get '/services/new', to: 'services#new', as: 'new_service'
  get '/services/:role', to: 'services#role_services', constraints: { id: /[a-zA-Z]+.*/ }, as: 'role_service'

  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html

  # Serve websocket cable requests in-process
  # mount ActionCable.server => '/cable'

  get '/styleguide' => 'application#styleguide'
end
<commit_msg>WIP: routes for manipulating project services<commit_after>Rails.application.routes.draw do
  root 'projects#index'

  devise_for :users

  # API

  namespace :api, defaults: { format: 'json' } do
    get '/' => redirect('/api/v1')

    namespace :v1 do
      get '/' => 'base#who_are_you'
    end
  end

  # Services

  resources :services, only: [:index, :create]

  put '/services/:id', to: 'services#update', constraints: { id: /[0-9]+/ }, as: 'service'
  patch '/services/:id', to: 'services#update', constraints: { id: /[0-9]+/ }
  delete '/services/:id', to: 'services#destroy', constraints: { id: /[0-9]+/ }

  get '/services/:id/edit', to: 'services#edit', constraints: { id: /[0-9]+/ }, as: 'edit_service'

  get '/services/new', to: 'services#new', as: 'new_service'
  get '/services/:role', to: 'services#role_services', constraints: { id: /[a-zA-Z]+.*/ }, as: 'role_service'

  # Projects

  resources :projects do
    resources :raw_data, except: [:show]
  end

  patch '/projects/update_services' => 'projects#update_services', as: 'update_project_services'

  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html

  # Serve websocket cable requests in-process
  # mount ActionCable.server => '/cable'

  get '/styleguide' => 'application#styleguide'
end

{'fraction_non_alphanumeric': 0.17964314679643148, 'fraction_numerical': 0.008110300081103, 'mean_word_length': 3.8467583497053046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '4070552', 'n_tokens_mistral': 860, 'n_tokens_neox': 840, 'n_words': 221}