/
Rakefile
59 lines (49 loc) · 1.06 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
desc 'build and test'
task :default => [:build_and_test]
task :build_and_test do
Rake::Task[:compile].execute
Rake::Task["build"].execute
Rake::Task["test"].execute
end
desc 'Build and install gem'
task :install => :build do
sh "jruby -S gem install #{Dir.glob('*.gem').join(' ')} --no-ri --no-rdoc"
end
desc 'Uninstall gem'
task :uninstall do
sh "gem uninstall -x ruby-processing"
end
desc 'Install jruby-complete'
task :install_jruby_complete do
begin
sh "cd vendors && rake"
rescue
warn("WARNING: you may not have wget installed")
end
end
desc 'Compile'
task :compile do
sh "jruby -S rake --rakefile JRakefile compile"
end
desc 'Build gem'
task :build do
sh "jruby -S gem build ruby-processing.gemspec"
end
desc 'Test'
task :test do
ruby "test/rp5_test.rb"
end
desc 'Spec'
task :spec do
Dir['./spec/processing/*.rb'].each do |sp|
sh "jruby -S rspec #{sp}"
end
end
desc 'Clean'
task :clean do
Dir['./**/*.%w{jar gem}'].each do |path|
puts "Deleting #{path} ..."
File.delete(path)
end
FileUtils.rm_rf('./tmp')
end