Make Rubocop happy

parent 85676bff
...@@ -146,13 +146,13 @@ module Gitlab ...@@ -146,13 +146,13 @@ module Gitlab
attr_reader :location attr_reader :location
def parse_uri(location) def parse_uri(location)
location && URI.parse(location.sub(/\A\/\/+/, '/')) location && URI.parse(location.sub(%r{\A\/\/+}, '/'))
rescue URI::InvalidURIError rescue URI::InvalidURIError
nil nil
end end
def remove_domain_from_uri(uri) def remove_domain_from_uri(uri)
[uri.path.sub(/\A\/+/, '/'), uri.query].compact.join('?') [uri.path.sub(%r{\A\/+}, '/'), uri.query].compact.join('?')
end end
def add_fragment_back_to_path(uri, path) def add_fragment_back_to_path(uri, path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment