Commit ac5842d970ba305681bb1c0826db769243101123
1 parent
8a54fda4
Exists in
master
and in
4 other branches
Migrate application to rails 4 step 1
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
5 changed files
with
7 additions
and
8 deletions
Show diff stats
config/application.rb
1 | require File.expand_path('../boot', __FILE__) | 1 | require File.expand_path('../boot', __FILE__) |
2 | 2 | ||
3 | require 'rails/all' | 3 | require 'rails/all' |
4 | +require 'devise' | ||
4 | 5 | ||
5 | -if defined?(Bundler) | ||
6 | - # If you precompile assets before deploying to production, use this line | ||
7 | - # Bundler.require(*Rails.groups(assets: %w(development test))) | ||
8 | - # If you want your assets lazily compiled in production, use this line | ||
9 | - Bundler.require(:default, :assets, Rails.env) | ||
10 | -end | 6 | +Bundler.require(:default, Rails.env) |
11 | 7 | ||
12 | module Gitlab | 8 | module Gitlab |
13 | class Application < Rails::Application | 9 | class Application < Rails::Application |
config/initializers/devise.rb
@@ -6,6 +6,7 @@ Devise.setup do |config| | @@ -6,6 +6,7 @@ Devise.setup do |config| | ||
6 | # note that it will be overwritten if you use your own mailer class with default "from" parameter. | 6 | # note that it will be overwritten if you use your own mailer class with default "from" parameter. |
7 | config.mailer_sender = Gitlab.config.gitlab.email_from | 7 | config.mailer_sender = Gitlab.config.gitlab.email_from |
8 | 8 | ||
9 | + | ||
9 | # Configure the class responsible to send e-mails. | 10 | # Configure the class responsible to send e-mails. |
10 | # config.mailer = "Devise::Mailer" | 11 | # config.mailer = "Devise::Mailer" |
11 | 12 |
config/initializers/gemoji.rb
config/initializers/secret_token.rb
config/routes.rb
@@ -22,7 +22,7 @@ Gitlab::Application.routes.draw do | @@ -22,7 +22,7 @@ Gitlab::Application.routes.draw do | ||
22 | project_root: Gitlab.config.gitlab_shell.repos_path, | 22 | project_root: Gitlab.config.gitlab_shell.repos_path, |
23 | upload_pack: Gitlab.config.gitlab_shell.upload_pack, | 23 | upload_pack: Gitlab.config.gitlab_shell.upload_pack, |
24 | receive_pack: Gitlab.config.gitlab_shell.receive_pack | 24 | receive_pack: Gitlab.config.gitlab_shell.receive_pack |
25 | - }), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) } | 25 | + }), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post] |
26 | 26 | ||
27 | # | 27 | # |
28 | # Help | 28 | # Help |
@@ -131,7 +131,7 @@ Gitlab::Application.routes.draw do | @@ -131,7 +131,7 @@ Gitlab::Application.routes.draw do | ||
131 | end | 131 | end |
132 | end | 132 | end |
133 | 133 | ||
134 | - match "/u/:username" => "users#show", as: :user, constraints: { username: /.*/ } | 134 | + match "/u/:username" => "users#show", as: :user, constraints: { username: /.*/ }, via: :get |
135 | 135 | ||
136 | 136 | ||
137 | 137 |