aboutsummaryrefslogtreecommitdiff
path: root/lib/longboat/raiders.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/longboat/raiders.rb')
-rw-r--r--lib/longboat/raiders.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/longboat/raiders.rb b/lib/longboat/raiders.rb
index e27ac0b..3e6f246 100644
--- a/lib/longboat/raiders.rb
+++ b/lib/longboat/raiders.rb
@@ -9,12 +9,12 @@ module Longboat
next unless Dir.exist?(dir)
Dir.entries(dir).each do |file|
- next if file =~ /^\./
+ next unless file =~ /\A(?!:[^.]).*[^_].*\.rb\Z/
reqname = File.basename(file, ".rb")
cname = reqname.split('_').map(&:capitalize).join
- require "raiders/#{reqname}"
+ require "#{dir}/#{reqname}"
@raiders[reqname] = Kernel.const_get(cname).new(@collector, raider_config)
end
end