Migrate application to rails 4 step 1
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
8a54fda459
commit
ac5842d970
5 changed files with 7 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
# Workaround for https://github.com/github/gemoji/pull/18
|
||||
require 'gemoji'
|
||||
Gitlab::Application.config.assets.paths << Emoji.images_path
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue