module Rails::Command

def root

Returns the root of the \Rails engine or app running the command.
def root
  if defined?(ENGINE_ROOT)
    Pathname.new(ENGINE_ROOT)
  else
    application_root
  end
end