From 9f53e09eb9b4eb2e1711a8e92b7244a1f1301bbc Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Sat, 3 Mar 2007 02:53:06 +0000 Subject: Move responsibility for ensuring that all registered gems were loaded from the FileSystemLocator into the Initializer once all locators have had a chance to load the gems they located. [Marcel Molina Jr.] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6292 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/lib/plugin/locator.rb | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'railties/lib/plugin') diff --git a/railties/lib/plugin/locator.rb b/railties/lib/plugin/locator.rb index 2e3b34cee6..6c4f2605bb 100644 --- a/railties/lib/plugin/locator.rb +++ b/railties/lib/plugin/locator.rb @@ -29,27 +29,11 @@ module Rails class FileSystemLocator < Locator private def located_plugins - returning locate_plugins do |loaders| - ensure_all_registered_plugins_are_loaded!(loaders) - end - end - - def locate_plugins initializer.configuration.plugin_paths.flatten.inject([]) do |plugins, path| plugins.concat locate_plugins_under(path) plugins end.flatten end - - def ensure_all_registered_plugins_are_loaded!(loaders) - registered_plugins = initializer.configuration.plugins - unless registered_plugins.nil? || registered_plugins.empty? - missing_plugins = registered_plugins - loaders.map(&:name) - unless missing_plugins.empty? - raise LoadError, "Could not locate the following plugins: #{missing_plugins.to_sentence}" - end - end - end # This starts at the base path looking for directories that pass the plugin_path? test of the Plugin::Loader. # Since plugins can be nested arbitrarily deep within an unspecified number of intermediary directories, -- cgit v1.2.3