Sha256: c96c4740346409046657178b45160ef7f79a59bfb0e343d598df7b1e112dfde6

Contents?: true

Size: 859 Bytes

Versions: 4

Compression:

Stored size: 859 Bytes

Contents

# Rake tasks for Shushu DB
#
# include in Rakefile via:
#
# require 'vault-tools/shushu_db_tasks'

desc "Pull db/structure.sql from shushu HEAD"
task :pull_shushu do
  steps = []
  steps << 'cd contrib/'
  if File.exists?('contrib/shushu')
    steps << 'rm -rf shushu'
  end
  steps << 'git clone -n git@github.com:heroku/shushud shushu --depth 1'
  steps << 'cd shushu'
  steps << 'git checkout HEAD db/*'
  # make sure we don't submodule it
  steps << 'rm -rf .git'
  sh steps.join(' && ')
end

desc "Drop and create shushu-test database"
task :create_shushu_db => [:drop_shushu_db, :pull_shushu] do
  sh 'createdb shushu-test'
  sh 'cd contrib/shushu && ../../vendor/bin/sequel postgres:///shushu-test -m db/migrations'
end

desc "Drop the vault-usage-test, core-test and shushu-test databases"
task :drop_shushu_db do
  sh 'dropdb shushu-test || true'
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vault-tools-0.3.11 lib/vault-tools/shushu_db_tasks.rb
vault-tools-0.3.10 lib/vault-tools/shushu_db_tasks.rb
vault-tools-0.3.9 lib/vault-tools/shushu_db_tasks.rb
vault-tools-0.3.8 lib/vault-tools/shushu_db_tasks.rb