aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNat Lasseter <nat.lasseter@york.ac.uk>2020-11-09 17:25:46 +0000
committerNat Lasseter <nat.lasseter@york.ac.uk>2020-11-09 17:25:46 +0000
commit772064b3ecfe762bbceff3d23d18aa2177e90f91 (patch)
tree53a300422daa5887dd24ff503d418adaf3526658
parent8e9d8d9e0837104d684547464ba3d0aa8f8e60ea (diff)
Fix and clarify convoluted and buggy raider filename check regexp
-rw-r--r--lib/longboat/raiders.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/longboat/raiders.rb b/lib/longboat/raiders.rb
index cd93858..eb30612 100644
--- a/lib/longboat/raiders.rb
+++ b/lib/longboat/raiders.rb
@@ -9,7 +9,7 @@ module Longboat
next unless Dir.exist?(dir)
Dir.entries(dir).each do |file|
- next unless file =~ /\A(?!:[^.]).*[^_].*\.rb\Z/
+ next unless file =~ /\A(?![._])[a-zA-Z0-9]+(?:_[a-zA-Z0-9]+)*\.rb\Z/
reqname = File.basename(file, ".rb")
cname = reqname.split('_').map(&:capitalize).join