diff options
author | Stefan Morgenthaler <gh@guerilladesigns.com> | 2012-07-10 16:12:19 +0200 |
---|---|---|
committer | Stefan Morgenthaler <gh@guerilladesigns.com> | 2012-07-10 16:12:19 +0200 |
commit | 4dae41d5dc90473e3c5c08064c25433fecf5abd3 (patch) | |
tree | b5ffb5f946f819cfe298b1992d7a4b6a6e8cba29 /config | |
parent | 12b34c8115bbb35524880bca4f21ad0939de4b77 (diff) | |
download | gitlab-ce-4dae41d5dc90473e3c5c08064c25433fecf5abd3.tar.gz |
Changes done as per feedback
Diffstat (limited to 'config')
-rw-r--r-- | config/gitlab.yml.example | 2 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 473be138950..1818f2c0d01 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -22,7 +22,7 @@ email: app: default_projects_limit: 10 # backup_path: "/vol/backups" # default: Rails.root + backups/ - # backup_keep_time: 7.days # default: 0 (forever) + # backup_keep_time: 604800 # default: 0 (forever) (in seconds) # diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 8b9ed8aebd6..bbf5976bf74 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -101,5 +101,15 @@ class Settings < Settingslogic def default_projects_limit app['default_projects_limit'] || 10 end + + def backup_path + t = app['backup_path'] || "backups/" + t = /^\//.match(t) ? t : File.join(Rails.root + t) + t + end + + def backup_keep_time + app['backup_keep_time'] || 0 + end end end |