diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 09:24:38 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 09:24:38 +0000 |
commit | 898e2cc1dfa88b4ac39cb4b35011f61b37f57b51 (patch) | |
tree | c6524edb6c9a43cccf93be05c36883fde1a53ee4 /config | |
parent | b5571e6e22cdacc81f78eff5943d68c8ba220fbb (diff) | |
download | gitlab-ce-898e2cc1dfa88b4ac39cb4b35011f61b37f57b51.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 4 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 42 | ||||
-rw-r--r-- | config/routes/admin.rb | 2 | ||||
-rw-r--r-- | config/routes/project.rb | 1 |
4 files changed, 23 insertions, 26 deletions
diff --git a/config/application.rb b/config/application.rb index cad5c8bbe76..4cb623ac1c5 100644 --- a/config/application.rb +++ b/config/application.rb @@ -234,7 +234,7 @@ module Gitlab credentials: true, headers: :any, methods: :any, - expose: ['Link', 'X-Total', 'X-Total-Pages', 'X-Per-Page', 'X-Page', 'X-Next-Page', 'X-Prev-Page'] + expose: %w[Link X-Total X-Total-Pages X-Per-Page X-Page X-Next-Page X-Prev-Page] end # Cross-origin requests must not have the session cookie available @@ -244,7 +244,7 @@ module Gitlab credentials: false, headers: :any, methods: :any, - expose: ['Link', 'X-Total', 'X-Total-Pages', 'X-Per-Page', 'X-Page', 'X-Next-Page', 'X-Prev-Page'] + expose: %w[Link X-Total X-Total-Pages X-Per-Page X-Page X-Next-Page X-Prev-Page] end end diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 691e4339bf0..2283000dc89 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -162,8 +162,8 @@ Settings.gitlab['default_projects_limit'] ||= 100000 Settings.gitlab['default_branch_protection'] ||= 2 Settings.gitlab['default_can_create_group'] = true if Settings.gitlab['default_can_create_group'].nil? Settings.gitlab['default_theme'] = Gitlab::Themes::APPLICATION_DEFAULT if Settings.gitlab['default_theme'].nil? -Settings.gitlab['host'] ||= ENV['GITLAB_HOST'] || 'localhost' -Settings.gitlab['ssh_host'] ||= Settings.gitlab.host +Settings.gitlab['host'] ||= ENV['GITLAB_HOST'] || 'localhost' +Settings.gitlab['ssh_host'] ||= Settings.gitlab.host Settings.gitlab['https'] = false if Settings.gitlab['https'].nil? Settings.gitlab['port'] ||= ENV['GITLAB_PORT'] || (Settings.gitlab.https ? 443 : 80) Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || '' @@ -176,10 +176,10 @@ Settings.gitlab['email_display_name'] ||= ENV['GITLAB_EMAIL_DISPLAY_NAME'] || 'G Settings.gitlab['email_reply_to'] ||= ENV['GITLAB_EMAIL_REPLY_TO'] || "noreply@#{Settings.gitlab.host}" Settings.gitlab['email_subject_suffix'] ||= ENV['GITLAB_EMAIL_SUBJECT_SUFFIX'] || "" Settings.gitlab['email_smime'] = SmimeSignatureSettings.parse(Settings.gitlab['email_smime']) -Settings.gitlab['base_url'] ||= Settings.__send__(:build_base_gitlab_url) -Settings.gitlab['url'] ||= Settings.__send__(:build_gitlab_url) -Settings.gitlab['user'] ||= 'git' -Settings.gitlab['user_home'] ||= begin +Settings.gitlab['base_url'] ||= Settings.__send__(:build_base_gitlab_url) +Settings.gitlab['url'] ||= Settings.__send__(:build_gitlab_url) +Settings.gitlab['user'] ||= 'git' +Settings.gitlab['user_home'] ||= begin Etc.getpwnam(Settings.gitlab['user']).dir rescue ArgumentError # no user configured '/home/' + Settings.gitlab['user'] @@ -257,13 +257,13 @@ Settings.artifacts['object_store'] = ObjectStoreSettings.parse(Settings.artifact # Registry # Settings['registry'] ||= Settingslogic.new({}) -Settings.registry['enabled'] ||= false -Settings.registry['host'] ||= "example.com" -Settings.registry['port'] ||= nil -Settings.registry['api_url'] ||= "http://localhost:5000/" -Settings.registry['key'] ||= nil -Settings.registry['issuer'] ||= nil -Settings.registry['host_port'] ||= [Settings.registry['host'], Settings.registry['port']].compact.join(':') +Settings.registry['enabled'] ||= false +Settings.registry['host'] ||= "example.com" +Settings.registry['port'] ||= nil +Settings.registry['api_url'] ||= "http://localhost:5000/" +Settings.registry['key'] ||= nil +Settings.registry['issuer'] ||= nil +Settings.registry['host_port'] ||= [Settings.registry['host'], Settings.registry['port']].compact.join(':') Settings.registry['path'] = Settings.absolute(Settings.registry['path'] || File.join(Settings.shared['path'], 'registry')) Settings.registry['notifications'] ||= [] @@ -284,13 +284,13 @@ Settings.pages['enabled'] = false if Settings.pages['enabled'].nil? Settings.pages['access_control'] = false if Settings.pages['access_control'].nil? Settings.pages['path'] = Settings.absolute(Settings.pages['path'] || File.join(Settings.shared['path'], "pages")) Settings.pages['https'] = false if Settings.pages['https'].nil? -Settings.pages['host'] ||= "example.com" -Settings.pages['port'] ||= Settings.pages.https ? 443 : 80 -Settings.pages['protocol'] ||= Settings.pages.https ? "https" : "http" -Settings.pages['url'] ||= Settings.__send__(:build_pages_url) -Settings.pages['external_http'] ||= false unless Settings.pages['external_http'].present? -Settings.pages['external_https'] ||= false unless Settings.pages['external_https'].present? -Settings.pages['artifacts_server'] ||= Settings.pages['enabled'] if Settings.pages['artifacts_server'].nil? +Settings.pages['host'] ||= "example.com" +Settings.pages['port'] ||= Settings.pages.https ? 443 : 80 +Settings.pages['protocol'] ||= Settings.pages.https ? "https" : "http" +Settings.pages['url'] ||= Settings.__send__(:build_pages_url) +Settings.pages['external_http'] ||= false unless Settings.pages['external_http'].present? +Settings.pages['external_https'] ||= false unless Settings.pages['external_https'].present? +Settings.pages['artifacts_server'] ||= Settings.pages['enabled'] if Settings.pages['artifacts_server'].nil? Settings.pages['secret_file'] ||= Rails.root.join('.gitlab_pages_secret') # @@ -590,7 +590,7 @@ end # Backup # Settings['backup'] ||= Settingslogic.new({}) -Settings.backup['keep_time'] ||= 0 +Settings.backup['keep_time'] ||= 0 Settings.backup['pg_schema'] = nil Settings.backup['path'] = Settings.absolute(Settings.backup['path'] || "tmp/backups/") Settings.backup['archive_permissions'] ||= 0600 diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 9238eae3a8e..34660358234 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -45,7 +45,6 @@ namespace :admin do scope(path: 'groups/*id', controller: :groups, constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do - scope(as: :group) do put :members_update get :edit, action: :edit @@ -90,7 +89,6 @@ namespace :admin do path: '/', constraints: { id: Gitlab::PathRegex.project_route_regex }, only: [:show, :destroy]) do - member do put :transfer post :repository_check diff --git a/config/routes/project.rb b/config/routes/project.rb index 9e40e891fd5..398041083ef 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -29,7 +29,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do constraints: { project_id: Gitlab::PathRegex.project_route_regex }, module: :projects, as: :project) do - # Begin of the /-/ scope. # Use this scope for all new project routes. scope '-' do |