Skip to content

Commit bd0a7c9

Browse files
authored
Merge pull request #42 from DannyBen/fix/ruby-2.7
Ruby 2.7 compatibilty
2 parents ab7ec0b + 6a3fcae commit bd0a7c9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/runfile/dsl.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,28 +79,28 @@ def execute(command_string)
7979

8080
# Run a command, wait until it is done and continue
8181
# run 'rails server'
82-
def run(*args)
83-
ExecHandler.instance.run(*args)
82+
def run(cmd)
83+
ExecHandler.instance.run cmd
8484
end
8585

8686
# Run a command, wait until it is done, then exit
8787
# run! 'rails server'
88-
def run!(*args)
89-
ExecHandler.instance.run!(*args)
88+
def run!(cmd)
89+
ExecHandler.instance.run! cmd
9090
end
9191

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

9999
# Stop a command started with 'run_bg'. Provide the name of he pid file you
100100
# used in 'run_bg'
101101
# stop_bg 'rails'
102-
def stop_bg(*args)
103-
ExecHandler.instance.stop_bg(*args)
102+
def stop_bg(pid)
103+
ExecHandler.instance.stop_bg pid
104104
end
105105

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

0 commit comments

Comments
 (0)