-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
43 lines (34 loc) · 1.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
require 'rake'
require 'rake/testtask'
task :default => [:test, :package]
desc "Run all tests"
task :test => [:test_all]
Rake::TestTask.new(:test_all) do |t|
t.test_files = FileList['test/**/test_*.rb']
t.libs << 'test'
t.libs.delete("lib") unless defined?(JRUBY_VERSION)
end
task :filelist do
puts FileList['pkg/**/*'].inspect
end
MANIFEST = FileList["lib/**/*.rb", "test/**/*.rb", "Rakefile", "README.txt"]
file "Manifest.txt" => :manifest
task :manifest do
File.open("Manifest.txt", "w") {|f| MANIFEST.each {|n| f << "#{n}\n"} }
end
Rake::Task['manifest'].invoke # Always regen manifest, so Hoe has up-to-date list of files
begin
require 'hoe'
Hoe.new("dbd-jdbc", "0.1.5") do |p|
p.rubyforge_name = "jruby-extras"
p.url = "http://github.com/chadj/dbd-jdbc"
p.author = "Chad Johnson"
p.email = "[email protected]"
p.description = "A JDBC DBD driver for Ruby DBI"
p.summary = "JDBC driver for DBI, originally by Kristopher Schmidt and Ola Bini"
end.spec.dependencies.delete_if { |dep| dep.name == "hoe" }
rescue LoadError
puts "You really need Hoe installed to be able to package this gem"
rescue => e
puts "ignoring error while loading hoe: #{e.to_s}"
end