Last active
September 27, 2015 07:08
-
-
Save bsodmike/1231537 to your computer and use it in GitHub Desktop.
Modified config/application.rb to print out initialization points for Rails 3.2.11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
if defined?(Bundler) | |
# If you precompile assets before deploying to production, use this line | |
Bundler.require(*Rails.groups(:assets => %w(development test))) | |
# If you want your assets lazily compiled in production, use this line | |
# Bundler.require(:default, :assets, Rails.env) | |
end | |
module Rails | |
class Application < Engine | |
def initializers | |
bootstrap = Bootstrap.initializers_for(self) #BOOTSTRAP | |
railties = super #RAILTIES | |
finisher = Finisher.initializers_for(self) #FINISHER | |
if Rails.env.development? | |
print_initializers(bootstrap, "#BOOTSTRAP") | |
print_initializers(railties, "#RAILTIES") | |
print_initializers(finisher, "#FINISHER") | |
end | |
bootstrap + railties + finisher | |
end | |
def print_initializers(initializers, stage) | |
p stage | |
initializers.each do |i| | |
p i.name | |
end | |
p "----------------------------" | |
end | |
end | |
end | |
module RoastCode | |
class Application < Rails::Application | |
# Settings in config/environments/* take precedence over those specified here. | |
# Application configuration should go into files in config/initializers | |
# -- all .rb files in that directory are automatically loaded. | |
# Custom directories with classes and modules you want to be autoloadable. | |
config.autoload_paths += %W(#{config.root}/extras) | |
config.autoload_paths += %W(#{config.root}/lib) | |
config.autoload_paths += Dir["#{config.root}/lib/**/"] | |
# Only load the plugins named here, in the order given (default is alphabetical). | |
# :all can be used as a placeholder for all plugins not explicitly named. | |
# config.plugins = [ :exception_notification, :ssl_requirement, :all ] | |
# Activate observers that should always be running. | |
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer | |
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. | |
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. | |
# config.time_zone = 'Central Time (US & Canada)' | |
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | |
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] | |
# config.i18n.default_locale = :de | |
# Configure the default encoding used in templates for Ruby 1.9. | |
config.encoding = "utf-8" | |
# Configure sensitive parameters which will be filtered from the log file. | |
config.filter_parameters += [:password] | |
# Enable the asset pipeline | |
config.assets.enabled = true | |
# Version of your assets, change this if you want to expire all your assets | |
config.assets.version = '1.0' | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"#BOOTSTRAP" | |
:load_environment_hook | |
:load_active_support | |
:preload_frameworks | |
:initialize_logger | |
:initialize_cache | |
:initialize_dependency_mechanism | |
:bootstrap_hook | |
"----------------------------" | |
"#RAILTIES" | |
"i18n.callbacks" | |
"active_support.initialize_whiny_nils" | |
"active_support.deprecation_behavior" | |
"active_support.initialize_time_zone" | |
"action_dispatch.configure" | |
"action_view.embed_authenticity_token_in_remote_forms" | |
"action_view.cache_asset_ids" | |
"action_view.javascript_expansions" | |
"action_view.set_configs" | |
"action_view.caching" | |
"action_controller.logger" | |
"action_controller.initialize_framework_caches" | |
"action_controller.assets_config" | |
"action_controller.set_configs" | |
"action_controller.compile_config_methods" | |
"active_record.initialize_timezone" | |
"active_record.logger" | |
"active_record.identity_map" | |
"active_record.set_configs" | |
"active_record.initialize_database" | |
"active_record.log_runtime" | |
"active_record.set_reloader_hooks" | |
"active_record.add_watchable_files" | |
"action_mailer.logger" | |
"action_mailer.set_configs" | |
"action_mailer.compile_config_methods" | |
"active_resource.set_configs" | |
"sprockets.environment" | |
:setup_sass | |
:setup_compression | |
:set_load_path | |
:set_autoload_paths | |
:add_routing_paths | |
:add_locales | |
:add_view_paths | |
:load_environment_config | |
:append_assets_path | |
:prepend_helpers_path | |
:load_config_initializers | |
:engines_blank_point | |
"----------------------------" | |
"#FINISHER" | |
:add_generator_templates | |
:ensure_autoload_once_paths_as_subset | |
:add_builtin_route | |
:build_middleware_stack | |
:define_main_app_helper | |
:add_to_prepare_blocks | |
:run_prepare_callbacks | |
:eager_load! | |
:finisher_hook | |
:set_routes_reloader_hook | |
:set_clear_dependencies_hook | |
:disable_dependency_loading | |
"----------------------------" | |
Loading development environment (Rails 3.2.11) | |
1.9.3p327 :001 > |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on this excellent post and some help from the guide.
Overridden lines are marked here.