Module: Dumpman::Executor

Extended by:
Executor
Included in:
Executor
Defined in:
lib/dumpman/executor.rb

Instance Method Summary collapse

Instance Method Details

#rake(*commands) ⇒ Object



11
12
13
14
15
16
# File 'lib/dumpman/executor.rb', line 11

def rake(*commands)
  commands.each do |command|
    Rake::Task["db:#{command}"].reenable
    Rake::Task["db:#{command}"].invoke
  end
end

#system(*commands) ⇒ Object



5
6
7
8
9
# File 'lib/dumpman/executor.rb', line 5

def system(*commands)
  cmd = commands.join(' && ')
  puts("executing: #{cmd}")
  Kernel.system(cmd)
end