From cca3a174badbc3a31d2fd512e08a1f548299e2a8 Mon Sep 17 00:00:00 2001 From: Alan Lamas Date: Fri, 27 Oct 2023 17:05:00 -0300 Subject: [PATCH] update fetch of ENV variables --- spec/spec_helper.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f5bb56d..a1741aa 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -27,11 +27,11 @@ elsif ENV['ADAPTER'] == 'mysql2' { adapter: 'mysql2', - username: ENV['MYSQL_USER'], - host: ENV['MYSQL_HOST'], - port: ENV['MYSQL_PORT'], - password: ENV['MYSQL_PASSWORD'], - database: ENV['MYSQL_DATABASE'] + username: ENV.fetch('MYSQL_USER', nil), + host: ENV.fetch('MYSQL_HOST', nil), + port: ENV.fetch('MYSQL_PORT', nil), + password: ENV.fetch('MYSQL_PASSWORD', nil), + database: ENV.fetch('MYSQL_DATABASE', nil) } else {