5
require 'spec/rake/spectask'
6
require 'spec/rake/verify_rcov'
7
require './lib/ruby2jar.rb'
9
Hoe.new('ruby2jar', Ruby2jar::VERSION) do |p|
10
# p.rubyforge_name = 'ruby2jarx' # if different than lowercase project name
11
p.developer('Matteo Collina', 'matteo.collina@gmail.com')
12
p.extra_deps = ["rspec",">= 1.0.0"]
15
Rake.application["default"].prerequisites.shift
17
task :default => [:spec]
19
desc "Run all the specifications"
20
Spec::Rake::SpecTask.new('spec') do |t|
21
t.spec_files = FileList['spec/**/*_spec.rb'] - ["specs/spec_helper.rb"]
22
t.spec_opts = ["--diff c"]
25
desc "Run all the specifications and generate the output in html"
26
Spec::Rake::SpecTask.new('spec:html') do |t|
27
t.spec_files = FileList['spec/**/*.rb'] - ["specs/spec_helper.rb"]
28
t.spec_opts = ["-f html","--diff c","-o","specs.html"]
31
desc "Run all the specification with RCov support"
32
Spec::Rake::SpecTask.new('rcov') do |t|
33
t.spec_files = FileList['spec/**/*.rb'] - ["specs/spec_helper.rb"]
36
t.rcov_opts = ['--exclude', "rcov,spec,gem"]
39
desc "Run all the specification and checks if the coverage is at the threshold"
40
RCov::VerifyTask.new(:verify_rcov => :rcov) do |t|
44
desc "Creates the Manifest"
45
task :create_manifest do
46
files = FileList["{examples,lib,spec,bin}/**/*"] + ["README.txt","Manifest.txt","History.txt","MIT-LICENSE","Rakefile"]
48
File.open("Manifest.txt", "w") do |io|
49
io.write(files.join("\n"))