Skip to content

Commit

Permalink
DEV: Add lib to autoload path
Browse files Browse the repository at this point in the history
Why manually require files when we can autoload? Also update
`discourse-rubocop` to 3.8.0.
  • Loading branch information
tgxworld committed Nov 14, 2024
1 parent 6101ecd commit 4b015f7
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 55 deletions.
73 changes: 38 additions & 35 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -84,4 +87,4 @@ DEPENDENCIES
syntax_tree

BUNDLED WITH
2.5.10
2.5.18
2 changes: 1 addition & 1 deletion app/jobs/scheduled/enqueue_reminders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Jobs
class EnqueueReminders < ::Jobs::Scheduled
REMINDER_BUFFER_MINUTES ||= 120
REMINDER_BUFFER_MINUTES = 120

every 1.day

Expand Down
2 changes: 1 addition & 1 deletion lib/discourse_assign/discourse_calendar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module DiscourseAssign
module DiscourseCalendar
HOLIDAY_CUSTOM_FIELD ||= "on_holiday"
HOLIDAY_CUSTOM_FIELD = "on_holiday"
end
end
1 change: 1 addition & 0 deletions lib/discourse_assign/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 0 additions & 18 deletions plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4b015f7

Please sign in to comment.