summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-07-02 21:59:48 +0300
committerrandx <dmitriy.zaporozhets@gmail.com>2012-07-02 21:59:48 +0300
commit1d543e64300666e2abc5cc8562e6b55458878801 (patch)
tree84ba2564b6ba27dbb6c6649cf142c2848059582f /config
parent9b337b8328a65c5e692c90ba1f817184bd054257 (diff)
downloadgitlab-ce-1d543e64300666e2abc5cc8562e6b55458878801.tar.gz
Finished with configs
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example20
-rw-r--r--config/initializers/1_settings.rb18
2 files changed, 30 insertions, 8 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 679d1cfa163..12c28675139 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -2,6 +2,10 @@
# Gitlab application config file #
# # # # # # # # # # # # # # # # # #
+#
+# 1. Common settings
+# ==========================
+
# Web application specific settings
web:
host: localhost
@@ -13,11 +17,21 @@ web:
email:
from: notify@localhost
+# Application specific settings
+# Like default project limit for user etc
+app:
+ default_projects_limit: 10
+
+
+#
+# 2. Advanced settings:
+# ==========================
+
# Git Hosting configuration
git_host:
admin_uri: git@localhost:gitolite-admin
base_path: /home/git/repositories/
- host: localhost
+ # host: localhost
git_user: git
upload_pack: true
receive_pack: true
@@ -33,7 +47,3 @@ git:
git_max_size: 5242880 # 5.megabytes
# Git timeout to read commit, in seconds
git_timeout: 10
-
-# Gitlab settings
-gitlab:
- default_projects_limit: 10
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index eccce9cb78f..a71bfd251cd 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -33,7 +33,7 @@ class Settings < Settingslogic
end
def ssh_host
- git_host['host'] || 'localhost'
+ git_host['host'] || web_host || 'localhost'
end
def ssh_path
@@ -49,11 +49,19 @@ class Settings < Settingslogic
end
def git_upload_pack
- git_host['upload_pack'] || true
+ if git_host['upload_pack'] == false
+ false
+ else
+ true
+ end
end
def git_receive_pack
- git_host['receive_pack'] || true
+ if git_host['receive_pack'] == false
+ false
+ else
+ true
+ end
end
def git_bin_path
@@ -71,5 +79,9 @@ class Settings < Settingslogic
def gitolite_admin_uri
git['admin_uri'] || 'git@localhost:gitolite-admin'
end
+
+ def default_projects_limit
+ app['default_projects_limit'] || 10
+ end
end
end