mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-18 16:16:20 +08:00
We think this is in a good place to move into core and prepare for a wider release after the additional work that has been done this year. --------- Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com> Co-authored-by: Kris Aubuchon <kris.aubuchon@discourse.org> Co-authored-by: Rafael dos Santos Silva <xfalcox@gmail.com>
19 lines
624 B
Ruby
19 lines
624 B
Ruby
# frozen_string_literal: true
|
|
|
|
module ::DiscourseRewind
|
|
class Engine < ::Rails::Engine
|
|
engine_name PLUGIN_NAME
|
|
isolate_namespace DiscourseRewind
|
|
config.autoload_paths << File.join(config.root, "lib")
|
|
scheduled_job_dir = "#{config.root}/app/jobs/scheduled"
|
|
config.to_prepare do
|
|
Rails.autoloaders.main.eager_load_dir(scheduled_job_dir) if Dir.exist?(scheduled_job_dir)
|
|
end
|
|
|
|
Rails.application.reloader.to_prepare do
|
|
Dir[
|
|
"#{Rails.root}/plugins/discourse-rewind/app/services/discourse_rewind/rewind/action/*.rb"
|
|
].each { |file| require_dependency file }
|
|
end
|
|
end
|
|
end
|