Fix new rubocop warnings
This commit is contained in:
parent
2e840066e6
commit
c9f9ade96f
2 changed files with 2 additions and 2 deletions
|
@ -868,7 +868,7 @@ module Api
|
|||
# not just the id, hence this abstraction
|
||||
|
||||
def getuser(token)
|
||||
if token =~ /^(.+)\:(.+)$/
|
||||
if token =~ /^(.+):(.+)$/
|
||||
User.authenticate(:username => Regexp.last_match(1), :password => Regexp.last_match(2))
|
||||
else
|
||||
User.authenticate(:token => token)
|
||||
|
|
|
@ -155,7 +155,7 @@ module BrowseTagsHelper
|
|||
#
|
||||
# Also accepting / as a visual separator although not given in RFC 3966,
|
||||
# because it is used as a visual separator in OSM data in some countries.
|
||||
if value.match?(%r{^\s*\+[\d\s\(\)/\.-]{6,25}\s*(;\s*\+[\d\s\(\)/\.-]{6,25}\s*)*$})
|
||||
if value.match?(%r{^\s*\+[\d\s()/.-]{6,25}\s*(;\s*\+[\d\s()/.-]{6,25}\s*)*$})
|
||||
return value.split(";").map do |phone_number|
|
||||
# for display, remove leading and trailing whitespace
|
||||
phone_number = phone_number.strip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue