Commit d0f6f8d1f8de0b17d200e9bf6de4749ffbf8f81e
Committed by
Diego Camarinha
1 parent
3ac2af5c
Revert "[Colab] Routes scoped as expected by colab with '/mezuro'"
This reverts commit f2788c39f2f09cbb4e00fe26123a6fdca254435b. The right way to set the subdirectory is by setting the Rack mount on config.ru or on the webserver like apache or nginx.
Showing
2 changed files
with
28 additions
and
31 deletions
Show diff stats
config/environments/colab.rb
config/routes.rb
1 | 1 | Rails.application.routes.draw do |
2 | - scope "mezuro" do | |
3 | - scope "(:locale)", locale: /en|pt/ do | |
4 | - # We need to manually define OmniAuth routes since the automatic generation does not support the dynamic scope | |
5 | - devise_for :users, skip: :omniauth_callbacks | |
6 | - get 'users/:user_id/projects' => 'users#projects', as: :user_projects | |
7 | - | |
8 | - resources :projects do | |
9 | - resources :repositories, only: [:new, :create] | |
10 | - end | |
2 | + scope "(:locale)", locale: /en|pt/ do | |
3 | + # We need to manually define OmniAuth routes since the automatic generation does not support the dynamic scope | |
4 | + devise_for :users, skip: :omniauth_callbacks | |
5 | + get 'users/:user_id/projects' => 'users#projects', as: :user_projects | |
6 | + | |
7 | + resources :projects do | |
8 | + resources :repositories, only: [:new, :create] | |
9 | + end | |
11 | 10 | |
12 | 11 | resources :repositories, except: [:update] |
13 | 12 | get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module |
... | ... | @@ -18,39 +17,38 @@ Rails.application.routes.draw do |
18 | 17 | get '/repositories/:id/process' => 'repositories#process_repository', as: :repository_process |
19 | 18 | get '/repository_branches' => 'repositories#branches', as: :repository_branches |
20 | 19 | |
21 | - resources :kalibro_configurations do | |
22 | - get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric | |
23 | - resources :metric_configurations, except: [:update, :new] do | |
24 | - get '/kalibro_ranges/new' => 'kalibro_ranges#new', as: :new_kalibro_range | |
25 | - resources :kalibro_ranges, except: [:update, :new] | |
26 | - put '/kalibro_ranges/:id' => 'kalibro_ranges#update', as: :kalibro_range_update | |
27 | - end | |
28 | - post '/metric_configurations/new' => 'metric_configurations#new', as: :new_metric_configuration | |
29 | - put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update | |
30 | - | |
31 | - resources :compound_metric_configurations, except: [:destroy, :update] | |
32 | - put '/compound_metric_configurations/:id' => 'compound_metric_configurations#update', as: :compound_metric_configuration_update | |
20 | + resources :kalibro_configurations do | |
21 | + get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric | |
22 | + resources :metric_configurations, except: [:update, :new] do | |
23 | + get '/kalibro_ranges/new' => 'kalibro_ranges#new', as: :new_kalibro_range | |
24 | + resources :kalibro_ranges, except: [:update, :new] | |
25 | + put '/kalibro_ranges/:id' => 'kalibro_ranges#update', as: :kalibro_range_update | |
33 | 26 | end |
27 | + post '/metric_configurations/new' => 'metric_configurations#new', as: :new_metric_configuration | |
28 | + put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update | |
34 | 29 | |
35 | - resources :reading_groups do | |
36 | - resources :readings, except: [:index, :update, :show] | |
37 | - put '/readings/:id' => 'readings#update', as: :reading_update | |
38 | - end | |
30 | + resources :compound_metric_configurations, except: [:destroy, :update] | |
31 | + put '/compound_metric_configurations/:id' => 'compound_metric_configurations#update', as: :compound_metric_configuration_update | |
32 | + end | |
33 | + | |
34 | + resources :reading_groups do | |
35 | + resources :readings, except: [:index, :update, :show] | |
36 | + put '/readings/:id' => 'readings#update', as: :reading_update | |
37 | + end | |
39 | 38 | |
40 | 39 | # Modules |
41 | 40 | post '/modules/:id/metric_history' => 'modules#metric_history', as: 'module_metric_history' |
42 | 41 | post '/modules/:id/tree' => 'modules#load_module_tree', as: 'module_tree' |
43 | 42 | |
44 | - # Tutorials | |
45 | - get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' | |
43 | + # Tutorials | |
44 | + get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' | |
46 | 45 | |
47 | - root "home#index" | |
48 | - end | |
46 | + root "home#index" | |
49 | 47 | end |
50 | 48 | |
49 | + | |
51 | 50 | # See comment above for devise_for |
52 | 51 | devise_for :users, only: :omniauth_callbacks, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } |
53 | - | |
54 | 52 | # The priority is based upon order of creation: first created -> highest priority. |
55 | 53 | # See how all your routes lay out with "rake routes". |
56 | 54 | ... | ... |