From 2211ffa85182d1a0be62aeda4b085479f79e0bf9 Mon Sep 17 00:00:00 2001 From: Ted Johansson Date: Mon, 11 Mar 2024 13:36:22 +0800 Subject: [PATCH] DEV: Move problem checks to app directory (#26120) There are a couple of reasons for this. The first one is practical, and related to eager loading. Since /lib is not eager loaded, when the application boots, ProblemCheck["identifier"] will be nil because the child classes aren't loaded. The second one is more conceptual. There turns out to be a lot of inter-dependencies between the part of the problem check system that live in /app and the parts that live in /lib, which probably suggests it should all go in /app. --- {lib => app/models}/problem_check.rb | 0 {lib => app/services}/problem_check/group_email_credentials.rb | 0 {lib => app/services}/problem_check/problem.rb | 0 {lib => app/services}/problem_check/twitter_login.rb | 0 spec/{lib => models}/problem_check_spec.rb | 0 .../problem_check/group_email_credentials_spec.rb | 0 spec/{lib => services}/problem_check/twitter_login_spec.rb | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename {lib => app/models}/problem_check.rb (100%) rename {lib => app/services}/problem_check/group_email_credentials.rb (100%) rename {lib => app/services}/problem_check/problem.rb (100%) rename {lib => app/services}/problem_check/twitter_login.rb (100%) rename spec/{lib => models}/problem_check_spec.rb (100%) rename spec/{lib => services}/problem_check/group_email_credentials_spec.rb (100%) rename spec/{lib => services}/problem_check/twitter_login_spec.rb (100%) diff --git a/lib/problem_check.rb b/app/models/problem_check.rb similarity index 100% rename from lib/problem_check.rb rename to app/models/problem_check.rb diff --git a/lib/problem_check/group_email_credentials.rb b/app/services/problem_check/group_email_credentials.rb similarity index 100% rename from lib/problem_check/group_email_credentials.rb rename to app/services/problem_check/group_email_credentials.rb diff --git a/lib/problem_check/problem.rb b/app/services/problem_check/problem.rb similarity index 100% rename from lib/problem_check/problem.rb rename to app/services/problem_check/problem.rb diff --git a/lib/problem_check/twitter_login.rb b/app/services/problem_check/twitter_login.rb similarity index 100% rename from lib/problem_check/twitter_login.rb rename to app/services/problem_check/twitter_login.rb diff --git a/spec/lib/problem_check_spec.rb b/spec/models/problem_check_spec.rb similarity index 100% rename from spec/lib/problem_check_spec.rb rename to spec/models/problem_check_spec.rb diff --git a/spec/lib/problem_check/group_email_credentials_spec.rb b/spec/services/problem_check/group_email_credentials_spec.rb similarity index 100% rename from spec/lib/problem_check/group_email_credentials_spec.rb rename to spec/services/problem_check/group_email_credentials_spec.rb diff --git a/spec/lib/problem_check/twitter_login_spec.rb b/spec/services/problem_check/twitter_login_spec.rb similarity index 100% rename from spec/lib/problem_check/twitter_login_spec.rb rename to spec/services/problem_check/twitter_login_spec.rb