lib/railroady/app_diagram.rb in railroady-1.2.0 vs lib/railroady/app_diagram.rb in railroady-1.3.0

- old
+ new

@@ -44,9 +44,25 @@ def process load_environment end + # get all engines + def engines + engines = [] + + if defined?(Rails) + engines = if Rails::Application::Railties.respond_to?(:engines) + Rails::Application::Railties.engines + else + # rails 4 way of getting engines + Rails::Engine.subclasses.map(&:instance) + end + end + engines + end + + private # Load Rails application's environment def load_environment STDERR.print "Loading application environment\n" if @options.verbose