0
@@ -19,15 +19,23 @@ module Rails
0
def configuration=(configuration)
0
@@configuration = configuration
0
+ def initialized=(initialized)
0
+ @initialized ||= initialized
0
if defined?(RAILS_ROOT)
0
@@ -35,11 +43,11 @@ module Rails
0
ActiveSupport::StringInquirer.new(RAILS_ENV)
0
@@ -56,7 +64,7 @@ module Rails
0
# The Initializer is responsible for processing the Rails configuration, such
0
# as setting the $LOAD_PATH, requiring the right frameworks, initializing
0
# logging, and more. It can be run either as a single command that'll just
0
@@ -145,7 +153,7 @@ module Rails
0
load_application_initializers
0
# the framework is now fully initialized
0
@@ -158,8 +166,10 @@ module Rails
0
# Observers are loaded after plugins in case Observers or observed models are modified by plugins.
0
+ Rails.initialized = true
0
# Check for valid Ruby version
0
@@ -297,12 +307,12 @@ module Rails
0
return if @environment_loaded
0
@environment_loaded = true
0
constants = self.class.constants
0
eval(IO.read(configuration.environment_path), binding, configuration.environment_path)
0
(self.class.constants - constants).each do |const|
0
Object.const_set(const, self.class.const_get(const))
0
@@ -390,7 +400,7 @@ module Rails
0
for framework in ([ :active_record, :action_controller, :action_mailer ] & configuration.frameworks)
0
framework.to_s.camelize.constantize.const_get("Base").logger ||= RAILS_DEFAULT_LOGGER
0
RAILS_CACHE.logger ||= RAILS_DEFAULT_LOGGER
0
@@ -486,7 +496,6 @@ module Rails
0
Dispatcher.define_dispatcher_callbacks(configuration.cache_classes)
0
Dispatcher.new(RAILS_DEFAULT_LOGGER).send :run_callbacks, :prepare_dispatch
0
# The Configuration class holds all the parameters for the Initializer and
0
@@ -531,7 +540,7 @@ module Rails
0
# The path to the database configuration file to use. (Defaults to
0
# <tt>config/database.yml</tt>.)
0
attr_accessor :database_configuration_file
0
# The path to the routes configuration file to use. (Defaults to
0
# <tt>config/routes.rb</tt>.)
0
attr_accessor :routes_configuration_file
0
@@ -597,7 +606,7 @@ module Rails
0
# a sub class would have access to fine grained modification of the loading behavior. See
0
# the implementation of Rails::Plugin::Loader for more details.
0
attr_accessor :plugin_loader
0
# Enables or disables plugin reloading. You can get around this setting per plugin.
0
# If <tt>reload_plugins?</tt> is false, add this to your plugin's <tt>init.rb</tt>
0
# to make it reloadable:
0
@@ -634,7 +643,7 @@ module Rails
0
def gem(name, options = {})
0
@gems << Rails::GemDependency.new(name, options)
0
def breakpoint_server(_ = nil)
0
@@ -693,7 +702,7 @@ module Rails
0
Pathname.new(::RAILS_ROOT).realpath.to_s
0
Object.const_set(:RELATIVE_RAILS_ROOT, ::RAILS_ROOT.dup) unless defined?(::RELATIVE_RAILS_ROOT)
0
::RAILS_ROOT.replace @root_path
0
@@ -734,7 +743,7 @@ module Rails
0
# See Dispatcher#to_prepare.
0
def to_prepare(&callback)
0
require 'dispatcher' unless defined?(::Dispatcher)
0
Dispatcher.to_prepare(&callback)
0
@@ -748,11 +757,11 @@ module Rails
0
paths = %w(railties railties/lib activesupport/lib)
0
paths << 'actionpack/lib' if frameworks.include? :action_controller or frameworks.include? :action_view
0
[:active_record, :action_mailer, :active_resource, :action_web_service].each do |framework|
0
paths << "#{framework.to_s.gsub('_', '')}/lib" if frameworks.include? framework
0
paths.map { |dir| "#{framework_root_path}/#{dir}" }.select { |dir| File.directory?(dir) }
0
@@ -767,7 +776,7 @@ module Rails
0
# Add the old mock paths only if the directories exists
0
paths.concat(Dir["#{root_path}/test/mocks/#{environment}"]) if File.exists?("#{root_path}/test/mocks/#{environment}")
0
@@ -853,7 +862,7 @@ module Rails
0
def default_plugin_loader
0
def default_cache_store
0
if File.exist?("#{root_path}/tmp/cache/")
0
[ :file_store, "#{root_path}/tmp/cache/" ]
0
@@ -861,7 +870,7 @@ module Rails
Comments
No one has commented yet.