Skip to content

Instantly share code, notes, and snippets.

@jonpaul
Forked from bsodmike/application.rb
Created September 21, 2011 18:03
Show Gist options
  • Save jonpaul/1232820 to your computer and use it in GitHub Desktop.
Save jonpaul/1232820 to your computer and use it in GitHub Desktop.
Modified config/application.rb to print out initialization points for Rails 3.1
require File.expand_path('../boot', __FILE__)
require 'rails/application'
require 'rails/engine'
module Rails
class Application < Engine
def initializers
init = Bootstrap.initializers_for(self) #BOOTSTRAP
init += super #RAILTIES
init += Finisher.initializers_for(self) #FINISHER
print_initializers(init)
init
end
def print_initializers(initializers)
initializers.each do |i|
p i.name
end
p "----------------------------"
end
end
end
# Pick the frameworks you want:
require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require "sprockets/railtie"
# require "rails/test_unit/railtie"
Bundler.require
require "epic_fail"
module Dummy
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)
# 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
=> Booting WEBrick
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
#BOOTSTRAP
:load_environment_hook
:load_active_support
:preload_frameworks
:initialize_logger
:initialize_cache
:set_clear_dependencies_hook
: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.cache_asset_ids"
"action_view.javascript_expansions"
"action_view.set_configs"
"action_view.caching"
"action_controller.logger"
"action_controller.initialize_framework_caches"
"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_dispatch_hooks"
"action_mailer.logger"
"action_mailer.set_configs"
"action_mailer.compile_config_methods"
"active_resource.set_configs"
"sprockets.environment"
: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
: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
: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_to_prepare_blocks
:add_builtin_route
:build_middleware_stack
:run_prepare_callbacks
:define_main_app_helper
:eager_load!
:finisher_hook
:set_routes_reloader
:disable_dependency_loading
"----------------------------"
[2011-09-21 11:35:51] INFO WEBrick 1.3.1
[2011-09-21 11:35:51] INFO ruby 1.9.2 (2011-07-09) [x86_64-darwin10.6.0]
[2011-09-21 11:35:51] INFO WEBrick::HTTPServer#start: pid=32718 port=3000
@bsodmike
Copy link

Glad you liked it xD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment