Skip to content
Snippets Groups Projects
Commit 3d141d15 authored by Douwe Maan's avatar Douwe Maan
Browse files

Fix spec by removing global state.

parent afb765ad
No related branches found
No related tags found
No related merge requests found
Loading
@@ -36,14 +36,12 @@ module Gitlab
Loading
@@ -36,14 +36,12 @@ module Gitlab
end end
   
def address_regex def address_regex
@address_regex ||= begin wildcard_address = config.address
wildcard_address = config.address return nil unless wildcard_address
return nil unless wildcard_address
regex = Regexp.escape(wildcard_address)
regex = Regexp.escape(wildcard_address) regex = regex.gsub(Regexp.escape('%{reply_key}'), "(.+)")
regex = regex.gsub(Regexp.escape('%{reply_key}'), "(.+)") Regexp.new(regex).freeze
Regexp.new(regex).freeze
end
end end
end end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment