diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index aa6608d49e..35fae24297 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -1,5 +1,4 @@ require 'active_support/core_ext/hash/reverse_merge' -require 'active_support/file_update_checker' require 'fileutils' require 'rails/plugin' require 'rails/engine' @@ -135,7 +134,7 @@ module Rails end if config.reload_classes_only_on_change - reloader = ActiveSupport::FileUpdateChecker.new(watchable_args, true, &callback) + reloader = config.file_watcher.new(watchable_args, true, &callback) self.reloaders << reloader # We need to set a to_prepare callback regardless of the reloader result, i.e. # models should be reloaded if any of the reloaders (i18n, routes) were updated. diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 40deecea1c..dddf7e498f 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/string/encoding' require 'active_support/core_ext/kernel/reporting' +require 'active_support/file_update_checker' require 'rails/engine/configuration' module Rails @@ -7,8 +8,8 @@ module Rails class Configuration < ::Rails::Engine::Configuration attr_accessor :allow_concurrency, :asset_host, :asset_path, :assets, :cache_classes, :cache_store, :consider_all_requests_local, - :dependency_loading, :filter_parameters, :force_ssl, :helpers_paths, - :logger, :log_tags, :preload_frameworks, + :dependency_loading, :file_watcher, :filter_parameters, + :force_ssl, :helpers_paths, :logger, :log_tags, :preload_frameworks, :railties_order, :relative_url_root, :reload_plugins, :secret_token, :serve_static_assets, :ssl_options, :static_cache_control, :session_options, :time_zone, :reload_classes_only_on_change, :whiny_nils @@ -38,6 +39,7 @@ module Rails @railties_order = [:all] @relative_url_root = ENV["RAILS_RELATIVE_URL_ROOT"] @reload_classes_only_on_change = true + @file_watcher = ActiveSupport::FileUpdateChecker @assets = ActiveSupport::OrderedOptions.new @assets.enabled = false |