Module: Mimi::Core::Rake
- Defined in:
- lib/mimi/core/rake.rb
Overview
Mimi::Core::Rake module contains various rake helpers
Class Method Summary collapse
-
.load_rake_tasks ⇒ Object
Loads rake tasks exported by loaded modules.
Class Method Details
.load_rake_tasks ⇒ Object
Loads rake tasks exported by loaded modules
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mimi/core/rake.rb', line 47 def self.load_rake_tasks unless Mimi.respond_to?(:app_root_path) raise 'Cannot load rake tasks before mimi-core module is loaded' end app_and_modules_paths = [Mimi.app_root_path] + Mimi.loaded_modules_paths rakefiles = app_and_modules_paths.map do |path| Pathname.glob(path.join('lib', 'tasks', '**', '*.rake')) end.flatten rakefiles.each do |rakefile| load rakefile end end |