blazing
blazing copied to clipboard
Provide hooks for setup, before bundling, after bundling (default)
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
setup:remote is now setup
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.
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