diff options
author | Phil Hughes <me@iamphill.com> | 2018-02-01 15:26:59 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-02-01 15:26:59 +0000 |
commit | 135a02cf4232dd948fad4116c744279328888049 (patch) | |
tree | cba978e07c0e62b008d1a897fa3d21dc7277f544 /config/initializers/1_settings.rb | |
parent | b1c8b3aadb202898a1e9342706e9e6f46bbb3612 (diff) | |
parent | 5b73e0eb35f5b9b78c228a4867ef78538ef05653 (diff) | |
download | gitlab-ce-135a02cf4232dd948fad4116c744279328888049.tar.gz |
Merge branch 'master' into ph-axios-2
Diffstat (limited to 'config/initializers/1_settings.rb')
-rw-r--r-- | config/initializers/1_settings.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 899e612ffbd..5b4e6b5db88 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -110,7 +110,7 @@ class Settings < Settingslogic url = "http://#{url}" unless url.start_with?('http') # Get rid of the path so that we don't even have to encode it - url_without_path = url.sub(%r{(https?://[^\/]+)/?.*}, '\1') + url_without_path = url.sub(%r{(https?://[^/]+)/?.*}, '\1') URI.parse(url_without_path).host end @@ -469,10 +469,10 @@ end # repository_downloads_path value. # repositories_storages = Settings.repositories.storages.values -repository_downloads_path = Settings.gitlab['repository_downloads_path'].to_s.gsub(/\/$/, '') +repository_downloads_path = Settings.gitlab['repository_downloads_path'].to_s.gsub(%r{/$}, '') repository_downloads_full_path = File.expand_path(repository_downloads_path, Settings.gitlab['user_home']) -if repository_downloads_path.blank? || repositories_storages.any? { |rs| [repository_downloads_path, repository_downloads_full_path].include?(rs['path'].gsub(/\/$/, '')) } +if repository_downloads_path.blank? || repositories_storages.any? { |rs| [repository_downloads_path, repository_downloads_full_path].include?(rs['path'].gsub(%r{/$}, '')) } Settings.gitlab['repository_downloads_path'] = File.join(Settings.shared['path'], 'cache/archive') end |