Permalink
Browse files

Fix the default frameworks

  • Loading branch information...
1 parent 9cfd1d4 commit 30baaac5465a352e78dac6330407a7b3460db180 Yehuda Katz + Carl Lerche committed Jun 19, 2009
Showing with 11 additions and 2 deletions.
  1. +9 −1 railties/lib/initializer.rb
  2. +2 −1 railties/test/plugin_loader_test.rb
@@ -1,4 +1,8 @@
require "pathname"
+require 'railties_path'
+require 'rails/version'
+require 'rails/gem_dependency'
+require 'rails/rack'
module Rails
class Configuration
@@ -12,9 +16,9 @@ def initialize
@framework_paths = []
@load_once_paths = []
@after_initialize_blocks = []
- @frameworks = []
@plugin_paths = []
@loaded_plugins = []
+ @frameworks = default_frameworks
@plugin_loader = default_plugin_loader
@plugin_locators = default_plugin_locators
@gems = default_gems
@@ -46,6 +50,10 @@ def middleware
ActionController::Dispatcher.middleware
end
+ def default_frameworks
+ [ :active_record, :action_controller, :action_view, :action_mailer, :active_resource ]
+ end
+
def default_plugin_loader
require 'rails/plugin/loader'
Plugin::Loader
@@ -20,7 +20,8 @@ def setup
@configuration = Rails::Configuration.new
@configuration.plugin_paths << plugin_fixture_root_path
- @initializer = Rails::Initializer.new(@configuration)
+ @initializer = Rails::Initializer.default
+ @initializer.config = @configuration
@valid_plugin_path = plugin_fixture_path('default/stubby')
@empty_plugin_path = plugin_fixture_path('default/empty')

0 comments on commit 30baaac

Please sign in to comment.