diff --git a/Gemfile.lock b/Gemfile.lock index 054148de..cbd9c69e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,80 +1,83 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.1.3.3) + activesupport (8.0.0) base64 + benchmark (>= 0.3) bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) ast (2.4.2) base64 (0.2.0) + benchmark (0.4.0) bigdecimal (3.1.8) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.4) connection_pool (2.4.1) drb (2.2.1) - i18n (1.14.5) + i18n (1.14.6) concurrent-ruby (~> 1.0) - json (2.7.2) + json (2.8.2) language_server-protocol (3.17.0.3) - minitest (5.23.1) - mutex_m (0.2.0) - parallel (1.24.0) - parser (3.3.1.0) + logger (1.6.1) + minitest (5.25.1) + parallel (1.26.3) + parser (3.3.6.0) ast (~> 2.4.1) racc prettier_print (1.2.1) - racc (1.8.0) - rack (3.0.11) + racc (1.8.1) + rack (3.1.8) rainbow (3.1.1) regexp_parser (2.9.2) - rexml (3.3.9) - rubocop (1.64.0) + rubocop (1.68.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.31.1, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.3) + rubocop-ast (1.36.1) parser (>= 3.3.1.0) - rubocop-capybara (2.20.0) + rubocop-capybara (2.21.0) rubocop (~> 1.41) - rubocop-discourse (3.8.0) + rubocop-discourse (3.8.6) activesupport (>= 6.1) rubocop (>= 1.59.0) rubocop-capybara (>= 2.0.0) rubocop-factory_bot (>= 2.0.0) rubocop-rails (>= 2.25.0) - rubocop-rspec (>= 2.25.0) - rubocop-factory_bot (2.25.1) - rubocop (~> 1.41) - rubocop-rails (2.25.0) + rubocop-rspec (>= 3.0.1) + rubocop-rspec_rails (>= 2.30.0) + rubocop-factory_bot (2.26.1) + rubocop (~> 1.61) + rubocop-rails (2.27.0) activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 1.33.0, < 2.0) + rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (2.29.2) - rubocop (~> 1.40) - rubocop-capybara (~> 2.17) - rubocop-factory_bot (~> 2.22) - rubocop-rspec_rails (~> 2.28) - rubocop-rspec_rails (2.28.3) - rubocop (~> 1.40) + rubocop-rspec (3.2.0) + rubocop (~> 1.61) + rubocop-rspec_rails (2.30.0) + rubocop (~> 1.61) + rubocop-rspec (~> 3, >= 3.0.1) ruby-progressbar (1.13.0) + securerandom (0.3.2) syntax_tree (6.2.0) prettier_print (>= 1.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.5.0) + unicode-display_width (2.6.0) + uri (1.0.2) PLATFORMS ruby @@ -84,4 +87,4 @@ DEPENDENCIES syntax_tree BUNDLED WITH - 2.5.10 + 2.5.18 diff --git a/app/jobs/scheduled/enqueue_reminders.rb b/app/jobs/scheduled/enqueue_reminders.rb index 883a399d..186ca542 100644 --- a/app/jobs/scheduled/enqueue_reminders.rb +++ b/app/jobs/scheduled/enqueue_reminders.rb @@ -2,7 +2,7 @@ module Jobs class EnqueueReminders < ::Jobs::Scheduled - REMINDER_BUFFER_MINUTES ||= 120 + REMINDER_BUFFER_MINUTES = 120 every 1.day diff --git a/lib/discourse_assign/discourse_calendar.rb b/lib/discourse_assign/discourse_calendar.rb index 837ce111..f36a4f4e 100644 --- a/lib/discourse_assign/discourse_calendar.rb +++ b/lib/discourse_assign/discourse_calendar.rb @@ -2,6 +2,6 @@ module DiscourseAssign module DiscourseCalendar - HOLIDAY_CUSTOM_FIELD ||= "on_holiday" + HOLIDAY_CUSTOM_FIELD = "on_holiday" end end diff --git a/lib/discourse_assign/engine.rb b/lib/discourse_assign/engine.rb index 6260570b..29cff854 100644 --- a/lib/discourse_assign/engine.rb +++ b/lib/discourse_assign/engine.rb @@ -4,5 +4,6 @@ module ::DiscourseAssign class Engine < ::Rails::Engine engine_name PLUGIN_NAME isolate_namespace DiscourseAssign + config.autoload_paths << File.join(config.root, "lib") end end diff --git a/plugin.rb b/plugin.rb index d41e4702..a2988ceb 100644 --- a/plugin.rb +++ b/plugin.rb @@ -22,24 +22,6 @@ module ::DiscourseAssign require_relative "lib/validators/assign_statuses_validator" after_initialize do - require_relative "app/jobs/regular/assign_notification" - require_relative "app/jobs/regular/remind_user" - require_relative "app/jobs/regular/unassign_notification" - require_relative "app/jobs/scheduled/enqueue_reminders" - require_relative "lib/assigner" - require_relative "lib/discourse_assign/create_notification" - require_relative "lib/discourse_assign/discourse_calendar" - require_relative "lib/discourse_assign/group_extension" - require_relative "lib/discourse_assign/helpers" - require_relative "lib/discourse_assign/list_controller_extension" - require_relative "lib/discourse_assign/notification_extension" - require_relative "lib/discourse_assign/post_extension" - require_relative "lib/discourse_assign/topic_extension" - require_relative "lib/discourse_assign/web_hook_extension" - require_relative "lib/pending_assigns_reminder" - require_relative "lib/random_assign_utils" - require_relative "lib/topic_assigner" - reloadable_patch do |plugin| Group.prepend(DiscourseAssign::GroupExtension) ListController.prepend(DiscourseAssign::ListControllerExtension)