mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Allow to inspect a directory
This commit is contained in:
parent
a8c6ac6efd
commit
ca502754b6
1 changed files with 5 additions and 4 deletions
|
@ -83,9 +83,10 @@ module Ameba
|
|||
end
|
||||
|
||||
private def load_sources(config)
|
||||
config.files
|
||||
.map { |wildcard| Dir[wildcard] }
|
||||
.flatten
|
||||
config.files.map do |wildcard|
|
||||
wildcard += "/**/*.cr" if File.directory?(wildcard)
|
||||
Dir[wildcard]
|
||||
end.flatten
|
||||
.map { |path| Source.new File.read(path), path }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue