summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorJason Goodman <jgoodman@gitlab.com>2019-08-01 09:56:33 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2019-08-01 09:56:33 +0000
commit170f7906410984a04971a7b044356217c62cd19f (patch)
tree12f98379e793cef5aaabe860375dda1ec872c3c2 /app/models
parent4f750ccfe594cde40a5555f2a037e409846cfcfe (diff)
downloadgitlab-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.rb2
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