From a24f839953f707ecf7dcb7f7811e2b95cbebc2a5 Mon Sep 17 00:00:00 2001 From: Sven Pachnit Date: Tue, 1 Nov 2016 15:05:17 +0100 Subject: [PATCH] Sort globbed files to allow loading in controlled order but linux sorts by inode or whatever --- lib/watchmonkey_cli/application/configuration.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/watchmonkey_cli/application/configuration.rb b/lib/watchmonkey_cli/application/configuration.rb index 8b5f93e..7eb8310 100644 --- a/lib/watchmonkey_cli/application/configuration.rb +++ b/lib/watchmonkey_cli/application/configuration.rb @@ -25,13 +25,13 @@ def config_filename name = "default" def config_files Dir["#{config_directory}/**/*.rb"].reject do |file| file.gsub(config_directory, "").split("/").any?{|fp| fp.start_with?("__") } - end + end.sort end def checker_files Dir["#{checker_directory}/**/*.rb"].reject do |file| file.gsub(config_directory, "").split("/").any?{|fp| fp.start_with?("__") } - end + end.sort end def load_configs!