Skip to content

@saimonmoore /gist:1883590
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Clear out your dev db (with protection from #epicfailure)
function cleardb {
DEVDB="`ruby -e "require 'yaml'; puts YAML.load(File.open('config/database.yml'))['development']['database']"`"
if [[ $DEVDB =~ "production" ]]; then
echo 'WATCHOUT! cleardb running against production dump';
else
bundle exec rake db:drop db:create db:schema:load db:seed && bundle exec rake db:test:clone;
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.