Method: Management::Server::Run#relevant_files
- Defined in:
- lib/management/commands/server/run.rb
#relevant_files(at_dir) ⇒ Object
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/management/commands/server/run.rb', line 102 def relevant_files(at_dir) abort unless at_dir.start_with? "/" Dir[File.join(at_dir, "**/*")].select do |path| File.file?(path) || (File.directory?(path) && Dir.entries(path) == [".", ".."]) end.map do |path| path.slice! at_dir.end_with?("/") ? at_dir : "#{at_dir}/" "./#{path}" end end |