Class: Ki::Cli::KiTaskRunner
- Inherits:
-
KiGenerator
- Object
- Thor::Group
- KiGenerator
- Ki::Cli::KiTaskRunner
- Defined in:
- lib/ki/ki_cli.rb
Instance Method Summary collapse
Methods inherited from KiGenerator
requires_ki_directory, source_root
Instance Method Details
#run_ki_task ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/ki/ki_cli.rb', line 79 def run_ki_task KiGenerator.requires_ki_directory if name == 'ki_show_task_list_1337' say Dir['tasks/**/*.rb'] else task_path = File.join('tasks', "#{name}.rb") unless File.exist?(task_path) say "Task #{name} not found in ./tasks/" exit 3 end require './app' Ki.connect say "Running #{name} task." say '-' * 80 require "./#{task_path}" say '-' * 80 end end |