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
22 23 24 25 26 27 28 29 |
# File 'lib/xot/rake/escalation.rb', line 22 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
12 13 14 15 16 17 18 19 20 |
# File 'lib/xot/rake/escalation.rb', line 12 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
10 |
# File 'lib/xot/rake/escalation.rb', line 10 alias invoke_task_org invoke_task |