Skip to content

Commit

Permalink
remove ExecHandler leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBen committed Sep 27, 2021
1 parent cba007c commit 2cbef03
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 49 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Change Log
Untagged - Latest
----------------------------------------

- Remove Colsole and Exec modules


v0.11.2 - 2020-11-06
----------------------------------------

- Add 'env_var' DSL command to specify environment variables used by the Runfile


Expand Down
6 changes: 3 additions & 3 deletions Runfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ end

help "Run YARD server"
action :yard do
run "yard server -p3000 -B0.0.0.0 -r"
system "yard server -p3000 -B0.0.0.0 -r"
end

help "Generate changelog and append old changelog"
action :changelog do
run "git changelog --save"
system "git changelog --save"
# append older changelog (prior to switching to git-changelog)
run "cat .changelog.old.md >> CHANGELOG.md"
system "cat .changelog.old.md >> CHANGELOG.md"
end
45 changes: 0 additions & 45 deletions lib/runfile/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,51 +83,6 @@ def execute(command_string)
Runner.instance.cross_call command_string
end

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

# Run a command, wait until it is done, then exit
# run! 'rails server'
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(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(pid)
ExecHandler.instance.stop_bg pid
end

# Set a block to be called before each run. The block should return
# the command to run, since this is intended to let the block modify
# the command if it needs to.
# before_run do |command|
# puts "BEFORE #{command}"
# command
# end
def before_run(&block)
ExecHandler.instance.before_run(&block)
end

# Set a block to be called after each run
# before_run do |command|
# puts "AFTER #{command}"
# end
def after_run(&block)
ExecHandler.instance.after_run(&block)
end

# Also allow to use 'endcommand' instead of 'command' to end
# a command namespace definition
alias_method :endcommand, :command
Expand Down
2 changes: 1 addition & 1 deletion lib/runfile/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Runfile
VERSION = "0.11.2"
VERSION = "0.12.0-rc1"
end

0 comments on commit 2cbef03

Please sign in to comment.