Complete refactor of Gemfile and upgraded gems (#2553)

This commit is contained in:
Ahmad Farhat
2021-02-26 17:34:07 -05:00
committed by GitHub
parent c5b00e89aa
commit 09ab074aaf
29 changed files with 327 additions and 376 deletions

View File

@ -47,9 +47,7 @@ class HealthCheckController < ApplicationController
end
def database_check
if defined?(ActiveRecord)
raise "Database not responding" unless ActiveRecord::Migrator.current_version
end
raise "Database not responding" if defined?(ActiveRecord) && !ActiveRecord::Migrator.current_version
raise "Pending migrations" unless ActiveRecord::Migration.check_pending!.nil?
end
@ -61,9 +59,7 @@ class HealthCheckController < ApplicationController
settings = ActionMailer::Base.smtp_settings
smtp = Net::SMTP.new(settings[:address], settings[:port])
if settings[:enable_starttls_auto] == "true"
smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)
end
smtp.enable_starttls_auto if settings[:enable_starttls_auto] == ("true") && smtp.respond_to?(:enable_starttls_auto)
if settings[:authentication].present? && settings[:authentication] != "none"
smtp.start(settings[:domain]) do |s|