Commit aee110e2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add extra config for some advanced customization

parent 5bd5d09b
......@@ -37,7 +37,7 @@ module ApplicationHelper
if !Gitlab.config.gravatar.enabled || user_email.blank?
'no_avatar.png'
else
gravatar_url = request.ssl? || Gitlab.config.gitlab.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
gravatar_url = request.ssl? || gitlab_config.https ? Gitlab.config.gravatar.ssl_url : Gitlab.config.gravatar.plain_url
user_email.strip!
sprintf gravatar_url, hash: Digest::MD5.hexdigest(user_email.downcase), size: size
end
......@@ -196,4 +196,14 @@ module ApplicationHelper
[namespace, controller.controller_name, controller.action_name].compact.join(":")
end
# shortcut for gitlab config
def gitlab_config
Gitlab.config.gitlab
end
# shortcut for gitlab extra config
def extra_config
Gitlab.config.extra
end
end
......@@ -73,8 +73,6 @@ production: &base
# plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
# ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
#
# 2. Auth settings
# ==========================
......@@ -157,6 +155,19 @@ production: &base
# Git timeout to read a commit, in seconds
timeout: 10
#
# 4. Extra customization
# ==========================
extra:
## Google analytics. Uncomment if you want it
# google_analytics_id: '_your_tracking_id'
## Text under sign-in page (Markdown enabled)
# sign_in_text: |
# ![Company Logo](http://www.companydomain.com/logo.png)
# [Learn more about CompanyName](http://www.companydomain.com/)
development:
<<: *base
......
......@@ -106,3 +106,8 @@ Settings.git['timeout'] ||= 10
Settings['satellites'] ||= Settingslogic.new({})
Settings.satellites['path'] = File.expand_path(Settings.satellites['path'] || "tmp/repo_satellites/", Rails.root)
#
# Extra customization
#
Settings['extra'] ||= Settingslogic.new({})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment