Skip to content

Commit

Permalink
Merge pull request #42 from DannyBen/fix/ruby-2.7
Browse files Browse the repository at this point in the history
Ruby 2.7 compatibilty
  • Loading branch information
DannyBen authored May 7, 2020
2 parents ab7ec0b + 6a3fcae commit bd0a7c9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/runfile/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,28 +79,28 @@ def execute(command_string)

# Run a command, wait until it is done and continue
# run 'rails server'
def run(*args)
ExecHandler.instance.run(*args)
def run(cmd)
ExecHandler.instance.run cmd
end

# Run a command, wait until it is done, then exit
# run! 'rails server'
def run!(*args)
ExecHandler.instance.run!(*args)
def run!(cmd)
ExecHandler.instance.run! cmd
end

# Run a command in the background, optionally log to a log file and save
# the process ID in a pid file
# run_bg 'rails server', pid: 'rails', log: 'tmp/log.log'
def run_bg(*args)
ExecHandler.instance.run_bg(*args)
def run_bg(cmd, pid: nil, log: '/dev/null')
ExecHandler.instance.run_bg cmd, pid: pid, log: log
end

# Stop a command started with 'run_bg'. Provide the name of he pid file you
# used in 'run_bg'
# stop_bg 'rails'
def stop_bg(*args)
ExecHandler.instance.stop_bg(*args)
def stop_bg(pid)
ExecHandler.instance.stop_bg pid
end

# Set a block to be called before each run. The block should return
Expand Down

0 comments on commit bd0a7c9

Please sign in to comment.