mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-10-04 09:10:43 -04:00
Moved hooks & patches into sperate folders
This commit is contained in:
1 parent
623510b474
commit
14f411c2e1
22 files changed
+811
-742
No files matched your search
@@ -45,8 +45,10 @@ Redmine::Plugin.register :redmine_qbo do
|
||||
|
||||
end
|
||||
|
||||
# Dynamically load all Hooks & Patches
|
||||
Dir::foreach(File.join(File.dirname(__FILE__), 'lib')) do |file|
|
||||
next unless file.end_with?('.rb')
|
||||
require_relative "lib/#{file.delete_suffix(".rb") }"
|
||||
end
|
||||
# Dynamically load all Hooks & Patches recursively
|
||||
base_dir = File.join(File.dirname(__FILE__), 'lib')
|
||||
|
||||
# '**' looks inside subdirectories, '*.rb' matches Ruby files
|
||||
Dir.glob(File.join(base_dir, '**', '*.rb')).sort.each do |file|
|
||||
require file
|
||||
end
|
||||
Reference in new issue
Block a user