FEATURE: automatically load plugin's rake tasks

This commit is contained in:
Régis Hanol 2015-04-29 23:32:49 +02:00
parent 98505f8969
commit 724f4a1c55

View file

@ -217,6 +217,9 @@ class Plugin::Instance
DiscoursePluginRegistry.register_glob(root_path, 'hbs')
end
# Automatically include all rake tasks
Rake.add_rakelib "#{File.dirname(path)}/lib/tasks"
self.instance_eval File.read(path), path
if auto_assets = generate_automatic_assets!
assets.concat auto_assets.map{|a| [a]}