summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-10-07 16:43:50 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-10-07 16:43:50 +0000
commitbcbf08017a5f038a61b4af693042bec9f1100953 (patch)
tree627d93bbe1ef69bee59dda4945b6096e197303e6 /vendor
parent4e811bebd1eb761a29603f1b8b1b3fdf5b8e4331 (diff)
downloadredmine-bcbf08017a5f038a61b4af693042bec9f1100953.tar.gz
redmine-bcbf08017a5f038a61b4af693042bec9f1100953.zip
Upgrade the Engines plugin to get the bugfix for Rails::Plugin::GemLocator
This update will allow Rails Engines to be installed as gems. For example: # config/environment.rb Rails::Initializer.run do |config| ... config.gem 'timesheet_plugin' end Will load the timesheet_plugins's RubyGem and allow it to work as if it was installed to vendor/plugins. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2904 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/engines/boot.rb2
-rw-r--r--vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/vendor/plugins/engines/boot.rb b/vendor/plugins/engines/boot.rb
index 1c55e2139..7dd90d17a 100644
--- a/vendor/plugins/engines/boot.rb
+++ b/vendor/plugins/engines/boot.rb
@@ -10,7 +10,7 @@ require File.join(File.dirname(__FILE__), 'lib/engines')
# initialize Rails::Configuration with our own default values to spare users
# some hassle with the installation and keep the environment cleaner
-{ :default_plugin_locators => [Engines::Plugin::FileSystemLocator],
+{ :default_plugin_locators => (defined?(Gem) ? [Rails::Plugin::GemLocator] : []).push(Engines::Plugin::FileSystemLocator),
:default_plugin_loader => Engines::Plugin::Loader,
:default_plugins => [:engines, :all] }.each do |name, default|
Rails::Configuration.send(:define_method, name) { default }
diff --git a/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb b/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb
index 5944ae231..d6ecbd489 100644
--- a/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb
+++ b/vendor/plugins/engines/generators/plugin_migration/plugin_migration_generator.rb
@@ -48,7 +48,7 @@ class PluginMigrationGenerator < Rails::Generator::Base
end
end
- @plugins_to_migrate.reject! { |p| p.latest_migration.nil? }
+ @plugins_to_migrate.reject! { |p| !p.respond_to?(:latest_migration) || p.latest_migration.nil? }
# Then find the current versions from the database
@current_versions = {}