diff options
author | Nick Thomas <nick@gitlab.com> | 2019-10-14 16:00:48 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-10-15 07:44:13 +0100 |
commit | 18096b5440e0818605add32538751c6be38e8343 (patch) | |
tree | b4aebac9d7f752156ee4ec3d44ee990021a1b295 /lib/gitlab_config.rb | |
parent | 8db304b4919519bca60a5b18ffe9b88dcde845af (diff) | |
download | gitlab-shell-18096b5440e0818605add32538751c6be38e8343.tar.gz |
Remove dead Ruby code
Diffstat (limited to 'lib/gitlab_config.rb')
-rw-r--r-- | lib/gitlab_config.rb | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/lib/gitlab_config.rb b/lib/gitlab_config.rb deleted file mode 100644 index 85aa889..0000000 --- a/lib/gitlab_config.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'yaml' - -class GitlabConfig - attr_reader :config - - def initialize - @config = YAML.load_file(File.join(ROOT_PATH, 'config.yml')) - end - - def home - ENV['HOME'] - end - - def auth_file - @config['auth_file'] ||= File.join(home, ".ssh/authorized_keys") - end - - def secret_file - @config['secret_file'] ||= File.join(ROOT_PATH, '.gitlab_shell_secret') - end - - # Pass a default value because this is called from a repo's context; in which - # case, the repo's hooks directory should be the default. - # - def custom_hooks_dir(default: nil) - @config['custom_hooks_dir'] || default - end - - def gitlab_url - (@config['gitlab_url'] ||= "http://localhost:8080").sub(%r{/*$}, '') - end - - def http_settings - @config['http_settings'] ||= {} - end - - def log_file - @config['log_file'] ||= File.join(ROOT_PATH, 'gitlab-shell.log') - end - - def log_level - @config['log_level'] ||= 'INFO' - end - - def log_format - @config['log_format'] ||= 'text' - end - - def audit_usernames - @config['audit_usernames'] ||= false - end - - def metrics_log_file - @config['metrics_log_file'] ||= File.join(ROOT_PATH, 'gitlab-shell-metrics.log') - end -end |