Sha256: c30a2183b5839c3da5b251c3c33cdf7fba3fe6fdffce7c39868d2d02cf28694b
Contents?: true
Size: 1.92 KB
Versions: 1
Compression:
Stored size: 1.92 KB
Contents
require 'bundler' Bundler::GemHelper.install_tasks require 'rspec/core/rake_task' %w[postgresql mysql mysql2].each do |adapter| namespace adapter do RSpec::Core::RakeTask.new(:spec) do |spec| spec.rspec_opts = "-Ispec/connections/#{adapter}" end end end desc 'Run postgresql and mysql tests' task :spec do %w[postgresql mysql mysql2].each do |adapter| Rake::Task["#{adapter}:spec"].invoke end end task :default => :spec require 'rake/rdoctask' Rake::RDocTask.new do |rdoc| version = File.exist?('VERSION') ? File.read('VERSION') : "" rdoc.rdoc_dir = 'rdoc' rdoc.title = "foreign key migrations #{version}" rdoc.rdoc_files.include('README*') rdoc.rdoc_files.include('lib/**/*.rb') end namespace :postgresql do desc 'Build the PostgreSQL test databases' task :build_databases do %x( createdb -E UTF8 fkm_unittest ) end desc 'Drop the PostgreSQL test databases' task :drop_databases do %x( dropdb fkm_unittest ) end desc 'Rebuild the PostgreSQL test databases' task :rebuild_databases => [:drop_databases, :build_databases] end task :build_postgresql_databases => 'postgresql:build_databases' task :drop_postgresql_databases => 'postgresql:drop_databases' task :rebuild_postgresql_databases => 'postgresql:rebuild_databases' MYSQL_DB_USER = 'fkm' namespace :mysql do desc 'Build the MySQL test databases' task :build_databases do %x( echo "create DATABASE fkm_unittest DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci " | mysql --user=#{MYSQL_DB_USER}) end desc 'Drop the MySQL test databases' task :drop_databases do %x( mysqladmin --user=#{MYSQL_DB_USER} -f drop fkm_unittest ) end desc 'Rebuild the MySQL test databases' task :rebuild_databases => [:drop_databases, :build_databases] end task :build_mysql_databases => 'mysql:build_databases' task :drop_mysql_databases => 'mysql:drop_databases' task :rebuild_mysql_databases => 'mysql:rebuild_databases'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
aspgems-foreign_key_migrations-2.0.0.beta1 | Rakefile |