1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-10-17 17:01:01 +00:00

Use a deprecation warning instead

This commit is contained in:
Holger Just 2010-08-31 19:49:37 +02:00
parent 132ece863d
commit ee69f9a9f3

View File

@ -64,7 +64,10 @@ module Redmine #:nodoc:
# Plugin constructor
def self.register(id, &block)
# check if the plugin is in the correct location
puts "WARNING: Wrong plugin path" unless Engines.plugins.collect(&:name).include? id
# FIXME: Fail on Redmine >= 1.1
unless Engines.plugins.collect(&:name).include? id
ActiveSupport::Deprecation.warn "The #{id} plugin needs to be inside this exact directory"
end
p = new(id)
p.instance_eval(&block)