Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def undefine_task(*names)
- app = Rake.application
- tasks = app.instance_variable_get('@tasks')
- names.flatten.each { |name| tasks.delete(name) }
- end
- if %W{production staging integration}.include?(Rails.env)
- undefine_task %w(
- db:bootstrap
- db:bootstrap:reset
- db:reset
- db:drop
- db:drop:all
- db:data:load_dump
- db:fixtures:load
- db:migrate:down
- db:migrate:reset
- db:setup
- db:nuke_and_pave
- db:dev_nuke_and_pave
- db:uat_nuke_and_pave
- spec
- spec:rcov
- spec_html
- test
- test:benchmark
- test:coverage
- test:coverage_minimum_met
- test:functionals
- test:integration
- test:plugins
- test:profile
- test:recent
- test:uncommitted
- test:units
- testing:invoke_rake_task
- )
- end
Add Comment
Please, Sign In to add comment