lib/foreman_tasks/dynflow.rb in foreman-tasks-0.3.2 vs lib/foreman_tasks/dynflow.rb in foreman-tasks-0.3.3
- old
+ new
@@ -90,12 +90,19 @@
end
def eager_load_actions!
config.eager_load_paths.each do |load_path|
Dir.glob("#{load_path}/**/*.rb").sort.each do |file|
- require_dependency file
+ unless loaded_paths.include?(file)
+ require_dependency file
+ loaded_paths << file
+ end
end
end
@world.reload! if @world
+ end
+
+ def loaded_paths
+ @loaded_paths ||= Set.new
end
end
end