Commit c0795dfe2a21b30c5df5a04f254a921af81273ea
1 parent
48df1fbf
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 |
... | ... | @@ -22,39 +21,38 @@ Rails.application.routes.draw do |
22 | 21 | post '/repositories/:id/notify_push' => 'repositories#notify_push', as: :repository_notify_push, format: :json |
23 | 22 | end |
24 | 23 | |
25 | - resources :kalibro_configurations do | |
26 | - get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric | |
27 | - resources :metric_configurations, except: [:update, :new] do | |
28 | - get '/kalibro_ranges/new' => 'kalibro_ranges#new', as: :new_kalibro_range | |
29 | - resources :kalibro_ranges, except: [:update, :new] | |
30 | - put '/kalibro_ranges/:id' => 'kalibro_ranges#update', as: :kalibro_range_update | |
31 | - end | |
32 | - post '/metric_configurations/new' => 'metric_configurations#new', as: :new_metric_configuration | |
33 | - put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update | |
34 | - | |
35 | - resources :compound_metric_configurations, except: [:destroy, :update] | |
36 | - put '/compound_metric_configurations/:id' => 'compound_metric_configurations#update', as: :compound_metric_configuration_update | |
24 | + resources :kalibro_configurations do | |
25 | + get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric | |
26 | + resources :metric_configurations, except: [:update, :new] do | |
27 | + get '/kalibro_ranges/new' => 'kalibro_ranges#new', as: :new_kalibro_range | |
28 | + resources :kalibro_ranges, except: [:update, :new] | |
29 | + put '/kalibro_ranges/:id' => 'kalibro_ranges#update', as: :kalibro_range_update | |
37 | 30 | end |
31 | + post '/metric_configurations/new' => 'metric_configurations#new', as: :new_metric_configuration | |
32 | + put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update | |
38 | 33 | |
39 | - resources :reading_groups do | |
40 | - resources :readings, except: [:index, :update, :show] | |
41 | - put '/readings/:id' => 'readings#update', as: :reading_update | |
42 | - end | |
34 | + resources :compound_metric_configurations, except: [:destroy, :update] | |
35 | + put '/compound_metric_configurations/:id' => 'compound_metric_configurations#update', as: :compound_metric_configuration_update | |
36 | + end | |
37 | + | |
38 | + resources :reading_groups do | |
39 | + resources :readings, except: [:index, :update, :show] | |
40 | + put '/readings/:id' => 'readings#update', as: :reading_update | |
41 | + end | |
43 | 42 | |
44 | 43 | # Modules |
45 | 44 | post '/modules/:id/metric_history' => 'modules#metric_history', as: 'module_metric_history' |
46 | 45 | post '/modules/:id/tree' => 'modules#load_module_tree', as: 'module_tree' |
47 | 46 | |
48 | - # Tutorials | |
49 | - get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' | |
47 | + # Tutorials | |
48 | + get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' | |
50 | 49 | |
51 | - root "home#index" | |
52 | - end | |
50 | + root "home#index" | |
53 | 51 | end |
54 | 52 | |
53 | + | |
55 | 54 | # See comment above for devise_for |
56 | 55 | devise_for :users, only: :omniauth_callbacks, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } |
57 | - | |
58 | 56 | # The priority is based upon order of creation: first created -> highest priority. |
59 | 57 | # See how all your routes lay out with "rake routes". |
60 | 58 | ... | ... |