Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
aee110e2
Commit
aee110e2
authored
May 08, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add extra config for some advanced customization
parent
5bd5d09b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
3 deletions
+29
-3
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+11
-1
config/gitlab.yml.example
config/gitlab.yml.example
+13
-2
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+5
-0
No files found.
app/helpers/application_helper.rb
View file @
aee110e2
...
@@ -37,7 +37,7 @@ module ApplicationHelper
...
@@ -37,7 +37,7 @@ module ApplicationHelper
if
!
Gitlab
.
config
.
gravatar
.
enabled
||
user_email
.
blank?
if
!
Gitlab
.
config
.
gravatar
.
enabled
||
user_email
.
blank?
'no_avatar.png'
'no_avatar.png'
else
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!
user_email
.
strip!
sprintf
gravatar_url
,
hash:
Digest
::
MD5
.
hexdigest
(
user_email
.
downcase
),
size:
size
sprintf
gravatar_url
,
hash:
Digest
::
MD5
.
hexdigest
(
user_email
.
downcase
),
size:
size
end
end
...
@@ -196,4 +196,14 @@ module ApplicationHelper
...
@@ -196,4 +196,14 @@ module ApplicationHelper
[
namespace
,
controller
.
controller_name
,
controller
.
action_name
].
compact
.
join
(
":"
)
[
namespace
,
controller
.
controller_name
,
controller
.
action_name
].
compact
.
join
(
":"
)
end
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
end
config/gitlab.yml.example
View file @
aee110e2
...
@@ -73,8 +73,6 @@ production: &base
...
@@ -73,8 +73,6 @@ production: &base
# plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
# 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
# ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=mm
#
#
# 2. Auth settings
# 2. Auth settings
# ==========================
# ==========================
...
@@ -157,6 +155,19 @@ production: &base
...
@@ -157,6 +155,19 @@ production: &base
# Git timeout to read a commit, in seconds
# Git timeout to read a commit, in seconds
timeout: 10
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:
development:
<<: *base
<<: *base
...
...
config/initializers/1_settings.rb
View file @
aee110e2
...
@@ -106,3 +106,8 @@ Settings.git['timeout'] ||= 10
...
@@ -106,3 +106,8 @@ Settings.git['timeout'] ||= 10
Settings
[
'satellites'
]
||=
Settingslogic
.
new
({})
Settings
[
'satellites'
]
||=
Settingslogic
.
new
({})
Settings
.
satellites
[
'path'
]
=
File
.
expand_path
(
Settings
.
satellites
[
'path'
]
||
"tmp/repo_satellites/"
,
Rails
.
root
)
Settings
.
satellites
[
'path'
]
=
File
.
expand_path
(
Settings
.
satellites
[
'path'
]
||
"tmp/repo_satellites/"
,
Rails
.
root
)
#
# Extra customization
#
Settings
[
'extra'
]
||=
Settingslogic
.
new
({})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment