Commit 5a0a9865444c2876e02b593aa334fc6cb84d8de7
1 parent
6e5832bd
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
36 additions
and
39 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, except: [:update, :index] | |
10 | - get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module | |
11 | - post '/repositories/:id/state' => 'repositories#state', as: :repository_state | |
12 | - post '/repositories/:id/state_with_date' => 'repositories#state_with_date', as: :repository_state_with_date | |
13 | - put '/repositories/:id' => 'repositories#update', as: :repository_update | |
14 | - get '/repositories/:id/process' => 'repositories#process_repository', as: :repository_process | |
15 | - 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, except: [:update, :index] | |
9 | + get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module | |
10 | + post '/repositories/:id/state' => 'repositories#state', as: :repository_state | |
11 | + post '/repositories/:id/state_with_date' => 'repositories#state_with_date', as: :repository_state_with_date | |
12 | + put '/repositories/:id' => 'repositories#update', as: :repository_update | |
13 | + get '/repositories/:id/process' => 'repositories#process_repository', as: :repository_process | |
14 | + end | |
16 | 15 | |
17 | - resources :kalibro_configurations do | |
18 | - get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric | |
19 | - resources :metric_configurations, except: [:update, :new] do | |
20 | - get '/kalibro_ranges/new' => 'kalibro_ranges#new', as: :new_kalibro_range | |
21 | - resources :kalibro_ranges, except: [:update, :new] | |
22 | - put '/kalibro_ranges/:id' => 'kalibro_ranges#update', as: :kalibro_range_update | |
23 | - end | |
24 | - post '/metric_configurations/new' => 'metric_configurations#new', as: :new_metric_configuration | |
25 | - put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update | |
26 | - | |
27 | - resources :compound_metric_configurations, except: [:destroy, :update] | |
28 | - put '/compound_metric_configurations/:id' => 'compound_metric_configurations#update', as: :compound_metric_configuration_update | |
16 | + resources :kalibro_configurations do | |
17 | + get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric | |
18 | + resources :metric_configurations, except: [:update, :new] do | |
19 | + get '/kalibro_ranges/new' => 'kalibro_ranges#new', as: :new_kalibro_range | |
20 | + resources :kalibro_ranges, except: [:update, :new] | |
21 | + put '/kalibro_ranges/:id' => 'kalibro_ranges#update', as: :kalibro_range_update | |
29 | 22 | end |
23 | + post '/metric_configurations/new' => 'metric_configurations#new', as: :new_metric_configuration | |
24 | + put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update | |
30 | 25 | |
31 | - resources :reading_groups do | |
32 | - resources :readings, except: [:index, :update, :show] | |
33 | - put '/readings/:id' => 'readings#update', as: :reading_update | |
34 | - end | |
26 | + resources :compound_metric_configurations, except: [:destroy, :update] | |
27 | + put '/compound_metric_configurations/:id' => 'compound_metric_configurations#update', as: :compound_metric_configuration_update | |
28 | + end | |
35 | 29 | |
36 | - #resources :modules | |
37 | - post '/modules/:id/metric_history' => 'modules#metric_history' | |
38 | - post '/modules/:id/tree' => 'modules#load_module_tree' | |
30 | + resources :reading_groups do | |
31 | + resources :readings, except: [:index, :update, :show] | |
32 | + put '/readings/:id' => 'readings#update', as: :reading_update | |
33 | + end | |
39 | 34 | |
40 | - # Tutorials | |
41 | - get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' | |
35 | + #resources :modules | |
36 | + post '/modules/:id/metric_history' => 'modules#metric_history' | |
37 | + post '/modules/:id/tree' => 'modules#load_module_tree' | |
42 | 38 | |
43 | - root "home#index" | |
44 | - end | |
39 | + # Tutorials | |
40 | + get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' | |
41 | + | |
42 | + root "home#index" | |
45 | 43 | end |
46 | 44 | |
45 | + | |
47 | 46 | # See comment above for devise_for |
48 | 47 | devise_for :users, only: :omniauth_callbacks, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } |
49 | - | |
50 | 48 | # The priority is based upon order of creation: first created -> highest priority. |
51 | 49 | # See how all your routes lay out with "rake routes". |
52 | 50 | ... | ... |