From 724f4a1c55e33be5f7543f02435d2171ff544917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Wed, 29 Apr 2015 23:32:49 +0200 Subject: [PATCH] FEATURE: automatically load plugin's rake tasks --- lib/plugin/instance.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/plugin/instance.rb b/lib/plugin/instance.rb index deb3c4f40..8c0370c2f 100644 --- a/lib/plugin/instance.rb +++ b/lib/plugin/instance.rb @@ -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]}