-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
56 lines (46 loc) · 1.7 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# coding: utf-8
require 'rake'
require 'rake/testtask'
require 'test/helper'
task :default => [:test_mysqlplus, :test_deferrable]
Rake::TestTask.new( "test_mysqlplus" ) { |t|
t.libs << AR_TEST_SUITE << Mysqlplus::Test.mysqlplus_connection()
t.test_files = Mysqlplus::Test.active_record_test_files()
t.verbose = true
}
Rake::TestTask.new( "test_deferrable" ) { |t|
t.libs << 'lib'
t.test_files = Mysqlplus::Test.test_files()
t.verbose = true
}
namespace :mysqplus do
task :test => "test_mysqlplus"
desc 'Build the MySQL test databases'
task :build_databases do
%x( mysqladmin --user=#{MYSQL_DB_USER} create activerecord_unittest )
%x( mysqladmin --user=#{MYSQL_DB_USER} create activerecord_unittest2 )
end
desc 'Drop the MySQL test databases'
task :drop_databases do
%x( mysqladmin --user=#{MYSQL_DB_USER} -f drop activerecord_unittest )
%x( mysqladmin --user=#{MYSQL_DB_USER} -f drop activerecord_unittest2 )
end
desc 'Rebuild the MySQL test databases'
task :rebuild_databases => [:drop_databases, :build_databases]
end
task :build_mysqlplus_databases => 'mysqlplus:build_databases'
task :drop_mysqlplus_databases => 'mysqlplus:drop_databases'
task :rebuild_mysqlplus_databases => 'mysqlplus:rebuild_databases'
begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "mysqlplus_adapter"
s.summary = "ActiveRecord Mysqlplus Adapter"
s.email = "[email protected]"
s.homepage = "http://github.com/methodmissing/mysqplus_adapter"
s.description = "ActiveRecord Mysqlplus Adapter"
s.authors = ["Lourens Naudé"]
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end