diff options
author | Jason Goodman <jgoodman@gitlab.com> | 2019-08-01 09:56:33 +0000 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2019-08-01 09:56:33 +0000 |
commit | 170f7906410984a04971a7b044356217c62cd19f (patch) | |
tree | 12f98379e793cef5aaabe860375dda1ec872c3c2 /app/models | |
parent | 4f750ccfe594cde40a5555f2a037e409846cfcfe (diff) | |
download | gitlab-ce-170f7906410984a04971a7b044356217c62cd19f.tar.gz |
Use Array.join rather than URI.join
Add spec for cases where URI.join does not work as expected
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/environment.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/environment.rb b/app/models/environment.rb index 392481ea0cc..513427ac2c5 100644 --- a/app/models/environment.rb +++ b/app/models/environment.rb @@ -204,7 +204,7 @@ class Environment < ApplicationRecord public_path = project.public_path_for_source_path(path, commit_sha) return unless public_path - [external_url, public_path].join('/') + [external_url.delete_suffix('/'), public_path.delete_prefix('/')].join('/') end def expire_etag_cache |