diff vendor/plugins/engines/boot.rb @ 0:513646585e45

* Import Redmine trunk SVN rev 3859
author Chris Cannam
date Fri, 23 Jul 2010 15:52:44 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/vendor/plugins/engines/boot.rb	Fri Jul 23 15:52:44 2010 +0100
@@ -0,0 +1,17 @@
+begin
+  require 'rails/version'
+  unless Rails::VERSION::MAJOR >= 2 && Rails::VERSION::MINOR >= 3 && Rails::VERSION::TINY >= 2
+    raise "This version of the engines plugin requires Rails 2.3.2 or later!"
+  end
+end
+
+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 => (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 }
+end
\ No newline at end of file