Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

36 lines (29 sloc) 0.909 kb
$:.unshift(File.dirname(__FILE__))
require 'sinatra/activerecord/rake'
require 'bengler_test_helper/tasks' if ['development', 'test'].include?(ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development')
task :environment do
require 'config/environment'
end
namespace :db do
desc "bootstrap db user, recreate, run migrations"
task :bootstrap do
name = "kudu"
`createuser -sdR #{name}`
`createdb -O #{name} #{name}_development`
Rake::Task['db:migrate'].invoke
Rake::Task['db:test:prepare'].invoke
end
task :migrate => :environment
desc "nuke db, recreate, run migrations"
task :nuke do
name = "kudu"
`dropdb #{name}_development`
`createdb -O #{name} #{name}_development`
Rake::Task['db:migrate'].invoke
Rake::Task['db:test:prepare'].invoke
end
desc "add seed data to database"
task :seed => :environment do
require_relative './db/seeds'
end
end
Jump to Line
Something went wrong with that request. Please try again.