From c223ca392735b17196c6750c400e14371245523a Mon Sep 17 00:00:00 2001 From: Paul Barry Date: Tue, 11 Feb 2025 00:45:34 -0500 Subject: [PATCH] Update app template to include all app rake tasks --- lib/rage/tasks.rb | 5 +++++ lib/rage/templates/Rakefile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/rage/tasks.rb b/lib/rage/tasks.rb index a8606d9..c85b664 100644 --- a/lib/rage/tasks.rb +++ b/lib/rage/tasks.rb @@ -7,6 +7,7 @@ class Rage::Tasks class << self def init load_db_tasks if defined?(StandaloneMigrations) + load_app_tasks end private @@ -29,5 +30,9 @@ def configuration_file StandaloneMigrations::Tasks.load_tasks end + + def load_app_tasks + Dir[Rage.root.join("lib/tasks/**/*.rake")].each{|file| load file } + end end end diff --git a/lib/rage/templates/Rakefile b/lib/rage/templates/Rakefile index a2824f6..2183bdd 100644 --- a/lib/rage/templates/Rakefile +++ b/lib/rage/templates/Rakefile @@ -1,2 +1,2 @@ require_relative "config/application" -Rage.load_tasks +Rage.load_tasks \ No newline at end of file