forked from maxlapshin/mysql2postgres
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
86 lines (77 loc) · 2.57 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
require 'rubygems'
require 'rake'
$LOAD_PATH.unshift('lib')
require 'mysql2psql/version'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = 'mysql2psql'
gem.version = Mysql2psql::Version::STRING
gem.summary = %(Tool for converting mysql database to postgresql)
gem.description = %{It can create postgresql dump from mysql database or directly load data from mysql to
postgresql (at about 100 000 records per minute). Translates most data types and indexes.}
gem.email = '[email protected]'
gem.homepage = 'http://github.com/tardate/mysql2postgresql'
gem.authors = [
'Max Lapshin <[email protected]>',
'Anton Ageev <[email protected]>',
'Samuel Tribehou <[email protected]>',
'Marco Nenciarini <[email protected]>',
'James Nobis <[email protected]>',
'quel <[email protected]>',
'Holger Amann <[email protected]>',
'Maxim Dobriakov <[email protected]>',
'Michael Kimsal <[email protected]>',
'Jacob Coby <[email protected]>',
'Neszt Tibor <[email protected]>',
'Miroslav Kratochvil <[email protected]>',
'Paul Gallagher <[email protected]>'
]
gem.add_dependency 'mysql', '= 2.8.1'
gem.add_dependency 'pg', '= 0.9.0'
gem.add_development_dependency 'test-unit', '>= 2.1.1'
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler'
end
require 'rake/testtask'
namespace :test do
Rake::TestTask.new(:units) do |test|
test.libs << 'lib' << 'test/lib'
test.pattern = 'test/units/*test.rb'
test.verbose = true
end
Rake::TestTask.new(:integration) do |test|
test.libs << 'lib' << 'test/lib'
test.pattern = 'test/integration/*test.rb'
test.verbose = true
end
end
desc 'Run all tests'
task :test do
Rake::Task['test:units'].invoke
#Rake::Task['test:integration'].invoke
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/*test.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort 'RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov'
end
end
task default: :test
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
version = Mysql2psql::Version::STRING
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "mysql2psql #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end