class Enginery::CLI
Public Instance Methods
bundle(task)
click to toggle source
# File lib/enginery/cli.rb, line 19 def bundle task run 'bundle %s' % task, output_cmd: true end
executable()
click to toggle source
# File lib/enginery/cli.rb, line 23 def executable $0 end
new_migration(*args)
click to toggle source
# File lib/enginery/cli.rb, line 11 def new_migration *args run '"%s" m %s' % [executable, args.flatten*' '] end
run(cmd, opts = {})
click to toggle source
# File lib/enginery/cli.rb, line 27 def run cmd, opts = {} opts[:output_cmd] && (o; o(cmd)) PTY.spawn cmd do |r, w, pid| begin r.sync r.each_line do |line| o line.rstrip! end rescue Errno::EIO # simply ignoring this ensure ::Process.wait pid end end $? && $?.exitstatus == 0 end
run_migration(vector, force_run, file, setups)
click to toggle source
# File lib/enginery/cli.rb, line 15 def run_migration vector, force_run, file, setups run '"%s" m:%s:%s f:%s %s' % [executable, vector, force_run, file, setups] end