Sha256: 6f01803c281a8747665d66a97ec95e28edcf157d3f8f58d652a3a96567b3e996
Contents?: true
Size: 898 Bytes
Versions: 10
Compression:
Stored size: 898 Bytes
Contents
require File.join(PROJECT_ROOT, 'lib', 'composite_primary_keys') require File.join(PROJECT_ROOT, 'test', 'connections', 'connection_spec') namespace :postgresql do desc 'Build the PostgreSQL test databases' task :build_databases => :load_connection do sh %{ createdb #{connection_string} "#{SPEC['database']}" } schema = File.join(PROJECT_ROOT, 'test', 'fixtures', 'db_definitions', 'postgresql.sql') sh %{ psql #{connection_string} "#{SPEC['database']}" -f #{schema} } end desc 'Drop the PostgreSQL test databases' task :drop_databases => :load_connection do sh %{ dropdb #{connection_string} "#{SPEC['database']}" } end desc 'Rebuild the PostgreSQL test databases' task :rebuild_databases => [:drop_databases, :build_databases] task :load_connection do require File.join(PROJECT_ROOT, "test", "connections", "native_postgresql", "connection") end end
Version data entries
10 entries across 10 versions & 1 rubygems