forked from activewarehouse/activewarehouse-etl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
75 lines (65 loc) · 2.19 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
require 'rubygems'
require 'rake'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "activewarehouse-etl"
gem.summary = "Pure Ruby ETL package."
gem.description = <<-EOF
ActiveWarehouse ETL is a pure Ruby Extract-Transform-Load application for loading data into a database.
EOF
gem.email = "[email protected]"
gem.homepage = "http://github.com/colincasey/activewarehouse-etl"
gem.authors = ["Anthony Eden"]
gem.add_dependency('rake', '>= 0.8.3')
gem.add_dependency('activesupport', '>= 2.1.0')
gem.add_dependency('activerecord', '>= 2.1.0')
gem.add_dependency('fastercsv', '>= 1.2.0')
gem.add_dependency('adapter_extensions', '>= 0.5.0')
gem.add_dependency('roo', '>= 1.2.3')
gem.add_dependency('sequel', '>= 2.10.4')
gem.files = FileList["CHANGELOG", "LICENSE", "README", "TODO", "Rakefile", "VERSION.yml", "bin/**/*", "lib/**/*"]
gem.require_path = 'lib'
gem.bindir = "bin"
gem.executables = ['etl']
gem.default_executable = "etl"
end
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'ActiveWarehouse ETL'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|
t.libs << 'test'
t.test_files = FileList['test/**/*_test.rb']
t.verbose = true
end
rescue LoadError
puts "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
desc "uninstall"
task :uninstall do
command = "gem uninstall activewarehouse-etl"
unless RUBY_PLATFORM =~ /(win|w)32$/
command = "sudo #{command}"
end
puts "Executing #{command.inspect}:"
sh command
end
desc "reinstall"
task :reinstall => [:uninstall, :gemspec, :build, :install]
task :default => :test