blazing icon indicating copy to clipboard operation
blazing copied to clipboard

Provide hooks for setup, before bundling, after bundling (default)

Open effkay opened this issue 13 years ago • 3 comments

e.g

  • copying the database.yml.sample when setting up the remote
  • rvm recipe, rbenv recipe...
  • when a setup recipe is enabled, the repo must be cloned on setup

effkay avatar Oct 24 '11 10:10 effkay

setup:remote is now setup

effkay avatar Oct 25 '11 19:10 effkay

Further thoughts for distinguishing recipe types:

  • setup (means those recipes should just be executed during Target#setup)
  • before-reset (before anything is done to the repo, e.g to put a maintenance rewrite in place or so)
  • after-reset (before anything is done to the repo, e.g to load the rvm env)
  • default
  • after-all (at the end, to do some cleanup? should run even after the rake tasks)

Each Recipe may have code run in any of the 4 steps.

effkay avatar Apr 02 '12 16:04 effkay

Proposal for hooking into blazing's various execution points


Blazing::ExecutionPoints.before :reset do
  # do stuff
end

Blazing::ExecutionPoint.after 'blazing.bundle' do
  # do stuff
end

Blazing::ExecutionPoints.after 'blazing.teardown' do
  # do stuff
end

Blazing::ExecutionPoints.after 'rake' do
  # do stuff
end

manufaktor avatar May 31 '12 13:05 manufaktor