Calls to the application constant have been refactored to use
Rails.application when drawing routes and creating other configurations
on the application.
Creating a class to build the default middleware stack.

A lot of logic for building the default middleware stack is currently
kept in Application class, but this can be encapsulated and made more
modular by being moved to its own class. Also refactored a couple of the
helper methods.
Removing a repetitive comment and refactoring the Application class in
Railties.

The comment on the +env_config+ method is repetitive, likely to get
outdated, and provides no useful information which cannot be gleamed
from the code. I'm therefore removing it. I'm also refactoring the check
for the presence of a secret_token in the configuration.
load the file rather than evaling
Merge branch 'master' into jobs

* master:
  load the file rather than evaling
Merge pull request #10902 from wangjohn/removing_application_singleton_calls

Calls to the application constant have been refactored
Merge pull request #10961 from wangjohn/changing_rails_env_config

Removing a repetitive comment and refactoring the Application class in Railties
load the file rather than evaling
Merge pull request #10968 from wangjohn/refactoring_rails_application_class

Creating a class to build the default middleware stack.
be consistent about parameter types passed to new_constants_in
we only support 1.9+, so just check for a name
Merge branch 'master' into jobs

* master:
  we only support 1.9+, so just check for a name
  be consistent about parameter types passed to new_constants_in
  load the file rather than evaling
  Removing a repetitive comment and refactoring the Application class in Railties.
  Creating a class to build the default middleware stack.
  Calls to the application constant have been refactored to use Rails.application when drawing routes and creating other configurations on the application.