diff options
author | Nat Lasseter <nat.lasseter@york.ac.uk> | 2020-11-09 17:25:46 +0000 |
---|---|---|
committer | Nat Lasseter <nat.lasseter@york.ac.uk> | 2020-11-09 17:25:46 +0000 |
commit | 772064b3ecfe762bbceff3d23d18aa2177e90f91 (patch) | |
tree | 53a300422daa5887dd24ff503d418adaf3526658 | |
parent | 8e9d8d9e0837104d684547464ba3d0aa8f8e60ea (diff) |
Fix and clarify convoluted and buggy raider filename check regexp
-rw-r--r-- | lib/longboat/raiders.rb | 2 |
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 |