diff options
author | Marcel Molina <marcel@vernix.org> | 2007-03-03 02:53:06 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2007-03-03 02:53:06 +0000 |
commit | 9f53e09eb9b4eb2e1711a8e92b7244a1f1301bbc (patch) | |
tree | f9144aa54dc622273e868e0803c1e82e1dc9f98d /railties/lib/plugin | |
parent | 3d2c232d21ac526e61ca114a058a794bfa19dcbe (diff) | |
download | rails-9f53e09eb9b4eb2e1711a8e92b7244a1f1301bbc.tar.gz rails-9f53e09eb9b4eb2e1711a8e92b7244a1f1301bbc.tar.bz2 rails-9f53e09eb9b4eb2e1711a8e92b7244a1f1301bbc.zip |
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
Diffstat (limited to 'railties/lib/plugin')
-rw-r--r-- | railties/lib/plugin/locator.rb | 16 |
1 files changed, 0 insertions, 16 deletions
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, |