mirror of
https://github.com/meineerde/redmine.git
synced 2025-10-17 17:01:01 +00:00
More verbose errors. Include timebomb for transition from deprecation to error.
This commit is contained in:
parent
ee69f9a9f3
commit
77d8496e88
@ -64,9 +64,12 @@ module Redmine #:nodoc:
|
||||
# Plugin constructor
|
||||
def self.register(id, &block)
|
||||
# check if the plugin is in the correct location
|
||||
# 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"
|
||||
if Redmine::VERSION::MAJOR <= 1 && Redmine::VERSION::MINOR < 1
|
||||
ActiveSupport::Deprecation.warn "WARNING: The #{id} plugin needs to be inside #{File.join(RAILS_ROOT, 'vendor', 'plugins', id.to_s)}"
|
||||
else
|
||||
raise "ERROR: The #{id} plugin needs to be inside #{File.join(RAILS_ROOT, 'vendor', 'plugins', id.to_s)}"
|
||||
end
|
||||
end
|
||||
|
||||
p = new(id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user