Commit e7eb15bd authored by John Long's avatar John Long

Remove new lines and dig

parent 8a302597
...@@ -29,11 +29,10 @@ module SystemCheck ...@@ -29,11 +29,10 @@ module SystemCheck
def try_connect_imap def try_connect_imap
config.each do |mailbox| config.each do |mailbox|
$stdout.puts "\nChecking #{mailbox[:email]}\n" $stdout.puts "Checking #{mailbox[:email]}"
imap = Net::IMAP.new(mailbox[:host], port: mailbox[:port], ssl: mailbox[:ssl]) imap = Net::IMAP.new(mailbox[:host], port: mailbox[:port], ssl: mailbox[:ssl])
imap.starttls if mailbox[:start_tls] imap.starttls if mailbox[:start_tls]
imap.login(mailbox[:email], mailbox[:password]) imap.login(mailbox[:email], mailbox[:password])
$stdout.puts "Connected to #{mailbox[:email]}\n"
end end
true true
rescue => error rescue => error
...@@ -55,7 +54,7 @@ module SystemCheck ...@@ -55,7 +54,7 @@ module SystemCheck
erb.filename = mail_room_config_path erb.filename = mail_room_config_path
config_file = YAML.load(erb.result) config_file = YAML.load(erb.result)
config_file.dig(:mailboxes) config_file[:mailboxes]
end end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment