Module: TaskLoader
- Extended by:
- Capistrano::Ops::Helper
- Defined in:
- lib/capistrano/ops/task_loader.rb
Class Method Summary collapse
Methods included from Capistrano::Ops::Helper
Class Method Details
.load_tasks_if_gem_present(gem_name, task_path, warning_message) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/capistrano/ops/task_loader.rb', line 8 def self.load_tasks_if_gem_present(gem_name, task_path, ) unless gem_in_gemfile?(gem_name) warn return end base_path = File.(__dir__) task_files = Dir.glob("#{base_path}/#{task_path}/**/*.rake") task_files.each do |file| load file rescue StandardError => e puts "Failed to load #{file}: #{e.}" end end |