diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-05 18:26:34 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-12-10 14:11:26 +0400 |
commit | ac5842d970ba305681bb1c0826db769243101123 (patch) | |
tree | d64f6844ff42c56bdda372b8b7c31cb181ad8535 /config | |
parent | 8a54fda45957b3755f7c06e5c9b955c794488ff1 (diff) |
Migrate application to rails 4 step 1
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 8 | ||||
-rw-r--r-- | config/initializers/devise.rb | 1 | ||||
-rw-r--r-- | config/initializers/gemoji.rb | 1 | ||||
-rw-r--r-- | config/initializers/secret_token.rb | 1 | ||||
-rw-r--r-- | config/routes.rb | 4 |
5 files changed, 7 insertions, 8 deletions
diff --git a/config/application.rb b/config/application.rb index ca80e9718ce..d888d04240b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,13 +1,9 @@ require File.expand_path('../boot', __FILE__) require 'rails/all' +require 'devise' -if defined?(Bundler) - # If you precompile assets before deploying to production, use this line - # Bundler.require(*Rails.groups(assets: %w(development test))) - # If you want your assets lazily compiled in production, use this line - Bundler.require(:default, :assets, Rails.env) -end +Bundler.require(:default, Rails.env) module Gitlab class Application < Rails::Application diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 5da8932a651..25390978cf6 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -6,6 +6,7 @@ Devise.setup do |config| # note that it will be overwritten if you use your own mailer class with default "from" parameter. config.mailer_sender = Gitlab.config.gitlab.email_from + # Configure the class responsible to send e-mails. # config.mailer = "Devise::Mailer" diff --git a/config/initializers/gemoji.rb b/config/initializers/gemoji.rb index 8c85aad5d3b..6cc33aced77 100644 --- a/config/initializers/gemoji.rb +++ b/config/initializers/gemoji.rb @@ -1,2 +1,3 @@ # Workaround for https://github.com/github/gemoji/pull/18 +require 'gemoji' Gitlab::Application.config.assets.paths << Emoji.images_path diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb index 16d1d4a9fdd..98400290113 100644 --- a/config/initializers/secret_token.rb +++ b/config/initializers/secret_token.rb @@ -21,3 +21,4 @@ def find_secure_token end Gitlab::Application.config.secret_token = find_secure_token +Gitlab::Application.config.secret_key_base = find_secure_token diff --git a/config/routes.rb b/config/routes.rb index 35143a4268c..188d2099997 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -22,7 +22,7 @@ Gitlab::Application.routes.draw do project_root: Gitlab.config.gitlab_shell.repos_path, upload_pack: Gitlab.config.gitlab_shell.upload_pack, receive_pack: Gitlab.config.gitlab_shell.receive_pack - }), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) } + }), at: '/', constraints: lambda { |request| /[-\/\w\.]+\.git\//.match(request.path_info) }, via: [:get, :post] # # Help @@ -131,7 +131,7 @@ Gitlab::Application.routes.draw do end end - match "/u/:username" => "users#show", as: :user, constraints: { username: /.*/ } + match "/u/:username" => "users#show", as: :user, constraints: { username: /.*/ }, via: :get |