Dir.glob("#{__dir__}/*.rb").each { |file| require file } Dir.glob("#{__dir__}/validator/*.rb").each { |file| require file } Dir.glob("#{__dir__}/brand/*.rb").each { |file| require file } Dir.glob("#{__dir__}/../../.solara/core/brands/*.rb").each { |file| require file } class DoctorManager def initialize end def visit_brands(brand_keys = [], print_logs: true) Solara.logger.header("Brand Doctor") ensure_initialized! BrandDoctor.new.visit(brand_keys, print_logs: print_logs) end def visit_project! Solara.logger.header("Project Doctor") Solara.logger.start_step("Project Health Check") ensure_initialized! ProjectDoctor.new.visit Solara.logger.end_step("Project Health Check") end private def ensure_initialized! brands = FilePath.brands brands_list = FilePath.brands_list platform = SolaraSettingsManager.instance.platform unless File.exist?(brands) && File.exist?(brands_list) && !platform.nil? && !platform.empty? Solara.logger.error("Solara is not initialized here. Please run 'solara init' to initialize.") exit 1 end end end