Skip to content

Commit b1434d2

Browse files
Tweak safeguard so that empty strings are handled correctly
1 parent ead2f5a commit b1434d2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/database_cleaner/safeguard.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,11 @@ def given?
5353

5454
def remote?(url)
5555
return false unless url
56-
5756
parsed = URI.parse(url)
5857
return false if parsed.scheme == 'sqlite3:'
5958

6059
host = parsed.host
61-
return false unless host
60+
return false if host.nil? || host.empty?
6261
return false if LOCAL.include?(host)
6362
return false if host.end_with? '.local'
6463
true

0 commit comments

Comments
 (0)