Class: Rake::Application
- Inherits:
-
Object
- Object
- Rake::Application
- Defined in:
- lib/xot/rake/escalation.rb
Instance Method Summary collapse
Instance Method Details
#escalate_tasks ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/xot/rake/escalation.rb', line 19 def escalate_tasks() Dir.chdir '..' do cmd = "rake #{ARGV.join ' '}" $stderr.puts "(in #{Dir.pwd}) #{cmd}" system cmd end exit 0 end |
#invoke_task(*args, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/xot/rake/escalation.rb', line 9 def invoke_task(*args, &block) invoke_task_org(*args, &block) rescue RuntimeError => e if e. =~ /don't\s+know\s+.*\s+task\s+/i escalate_tasks else raise end end |
#invoke_task_org ⇒ Object
7 |
# File 'lib/xot/rake/escalation.rb', line 7 alias invoke_task_org invoke_task |