gracefully handle missing Auth header

This commit is contained in:
Sami Samhuri 2015-04-19 16:02:16 -07:00
parent ec56d5f684
commit 446f1c85c3

View file

@ -51,7 +51,7 @@ end
$auth = Auth.new(File.expand_path('../auth.json', __FILE__))
def authenticated?(auth)
if $config[:auth]
username, password = auth.split('|')
username, password = auth.to_s.split('|')
$auth.authenticated?(username, password)
else
true