aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/engine.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r--railties/lib/rails/engine.rb84
1 files changed, 42 insertions, 42 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb
index b8a9cac6d0..bcd1a66921 100644
--- a/railties/lib/rails/engine.rb
+++ b/railties/lib/rails/engine.rb
@@ -643,62 +643,62 @@ module Rails
protected
- def load_config_initializer(initializer)
- ActiveSupport::Notifications.instrument("load_config_initializer.railties", initializer: initializer) do
- load(initializer)
+ def load_config_initializer(initializer)
+ ActiveSupport::Notifications.instrument("load_config_initializer.railties", initializer: initializer) do
+ load(initializer)
+ end
end
- end
- def run_tasks_blocks(*) #:nodoc:
- super
- paths["lib/tasks"].existent.sort.each { |ext| load(ext) }
- end
+ def run_tasks_blocks(*) #:nodoc:
+ super
+ paths["lib/tasks"].existent.sort.each { |ext| load(ext) }
+ end
- def has_migrations? #:nodoc:
- paths["db/migrate"].existent.any?
- end
+ def has_migrations? #:nodoc:
+ paths["db/migrate"].existent.any?
+ end
- def self.find_root_with_flag(flag, root_path, default=nil) #:nodoc:
+ def self.find_root_with_flag(flag, root_path, default=nil) #:nodoc:
- while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/#{flag}")
- parent = File.dirname(root_path)
- root_path = parent != root_path && parent
- end
+ while root_path && File.directory?(root_path) && !File.exist?("#{root_path}/#{flag}")
+ parent = File.dirname(root_path)
+ root_path = parent != root_path && parent
+ end
- root = File.exist?("#{root_path}/#{flag}") ? root_path : default
- raise "Could not find root path for #{self}" unless root
+ root = File.exist?("#{root_path}/#{flag}") ? root_path : default
+ raise "Could not find root path for #{self}" unless root
- Pathname.new File.realpath root
- end
+ Pathname.new File.realpath root
+ end
- def default_middleware_stack #:nodoc:
- ActionDispatch::MiddlewareStack.new
- end
+ def default_middleware_stack #:nodoc:
+ ActionDispatch::MiddlewareStack.new
+ end
- def _all_autoload_once_paths #:nodoc:
- config.autoload_once_paths
- end
+ def _all_autoload_once_paths #:nodoc:
+ config.autoload_once_paths
+ end
- def _all_autoload_paths #:nodoc:
- @_all_autoload_paths ||= (config.autoload_paths + config.eager_load_paths + config.autoload_once_paths).uniq
- end
+ def _all_autoload_paths #:nodoc:
+ @_all_autoload_paths ||= (config.autoload_paths + config.eager_load_paths + config.autoload_once_paths).uniq
+ end
- def _all_load_paths #:nodoc:
- @_all_load_paths ||= (config.paths.load_paths + _all_autoload_paths).uniq
- end
+ def _all_load_paths #:nodoc:
+ @_all_load_paths ||= (config.paths.load_paths + _all_autoload_paths).uniq
+ end
private
- def build_request(env)
- env.merge!(env_config)
- req = ActionDispatch::Request.new env
- req.routes = routes
- req.engine_script_name = req.script_name
- req
- end
+ def build_request(env)
+ env.merge!(env_config)
+ req = ActionDispatch::Request.new env
+ req.routes = routes
+ req.engine_script_name = req.script_name
+ req
+ end
- def build_middleware
- config.middleware
- end
+ def build_middleware
+ config.middleware
+ end
end
end