2011-10-29 16:19:11 +04:00
|
|
|
#-- encoding: UTF-8
|
2008-07-12 14:17:14 +04:00
|
|
|
begin
|
|
|
|
require 'rails/version'
|
2009-09-13 21:14:35 +04:00
|
|
|
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!"
|
2008-07-12 14:17:14 +04:00
|
|
|
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
|
|
|
|
|
2009-10-07 20:43:50 +04:00
|
|
|
{ :default_plugin_locators => (defined?(Gem) ? [Rails::Plugin::GemLocator] : []).push(Engines::Plugin::FileSystemLocator),
|
2008-07-12 14:17:14 +04:00
|
|
|
:default_plugin_loader => Engines::Plugin::Loader,
|
|
|
|
:default_plugins => [:engines, :all] }.each do |name, default|
|
|
|
|
Rails::Configuration.send(:define_method, name) { default }
|
|
|
|
end
|