rails/rails — pull request #10099 by wangjohn (2013-04-05 01:48:34+00:00)
Title: Created way of cloning a Rails::Application instance

First, I've deferred the instantiating of a ``Rails::Application`` instance. Before an object was being initialized as soon as you created a subclass of ``Rails::Application``, whereas it makes much more sense to wait for an explicit initialization.

The ``Rails.application`` variable will now get set on the first initialization of a ``Rails::Application`` instance. This paves the way to allow you to do a lot of things before you actually instantiated the application.

I've also added a feature where you can clone the application so that it shares the same configuration, routes, helpers, etc. This is part of a larger railties update that is coming up, but it this batch of code is sufficiently small and doesn't change that much functionality.