mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Tweak safeguard so that empty strings are handled correctly
This commit is contained in:
parent
ead2f5aa5c
commit
b1434d2b9d
1 changed files with 1 additions and 2 deletions
|
@ -53,12 +53,11 @@ module DatabaseCleaner
|
|||
|
||||
def remote?(url)
|
||||
return false unless url
|
||||
|
||||
parsed = URI.parse(url)
|
||||
return false if parsed.scheme == 'sqlite3:'
|
||||
|
||||
host = parsed.host
|
||||
return false unless host
|
||||
return false if host.nil? || host.empty?
|
||||
return false if LOCAL.include?(host)
|
||||
return false if host.end_with? '.local'
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue