forked from kevwil/aspen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
80 lines (66 loc) · 1.92 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
begin
require 'bones'
rescue LoadError
abort '### Please install the "bones" gem ###'
end
ensure_in_path 'lib'
require 'aspen/version'
task :default => ['spec:rcov','spec:verify','doc:yard','notes']
task 'gem:release' => ['java:build','spec:rcov','spec:verify','doc:yard']
task 'clean' => ['java:clean', 'doc:clean']
task 'clobber' => ['java:clobber']
Bones do
name 'aspen'
authors ['Kevin Williams']
email ['[email protected]']
url 'http://kevwil.github.com/aspen'
version ENV['VERSION'] || Aspen::VERSION::STRING
rubyforge.name 'aspen'
readme_file 'README'
ignore_file '.gitignore'
depend_on 'rack'
depend_on 'g', :development => true
depend_on 'bones', :development => true
depend_on 'bones-git', :development => true
depend_on 'bones-extras', :development => true
depend_on 'rspec', :development => true
depend_on 'mocha', :development => true
depend_on 'rcov', :development => true
ruby_opts.clear
ruby_opts << '-Ilib' << '-rubygems'
spec.opts << '--color'
# spec.opts << '--format html:./spec_out.html'
rcov.threshold 80
rcov.opts << ['--exclude', 'rcov']
rcov.opts << ['--exclude', 'mocha']
# rcov.opts << ['--no-html']
# rcov.opts << ['--text-counts']
# rcov.opts << ['--text-coverage-diff','FILE']
use_gmail
enable_sudo
end
require 'fileutils'
namespace :doc do
desc "clean up generated docs"
task :clean do
d = 'doc'
y = '.yardoc'
FileUtils.rm_rf(d) if File.exist?(d) and File.writable?(d) and File.directory?(d)
FileUtils.rm(y) if File.exist?(y) and File.writable?(d)
end
end
namespace :java do
desc "clean up java tool output"
task :clean do
system "cd javalib;mvn --offline clean;cd .."
end
desc "delete the generated jar"
task :clobber do
FileUtils.rm Dir.glob('lib/**/*.jar')
end
desc "build java code and copy jars to lib folder"
task :build => :clean do
system "cd javalib;mvn --offline package;ant;cd .."
end
end
# EOF