# -*- ruby -*-

require 'rubygems'
require 'hoe'
require 'spec/rake/spectask'
require 'spec/rake/verify_rcov'

require 'lib/Inifile.rb'

Hoe.new('inifile', Inifile::VERSION) do |p|
  p.rubyforge_name = 'inifile'
  p.author = 'Youichi Kato'
  p.email = 'xxx@gmail.com'
  p.summary = 'xxxxxxx.'
  p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
  p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
end

desc "Run all specs"
Spec::Rake::SpecTask.new do |t|
  t.libs << "lib"
  t.spec_files = FileList['spec/**/*_spec.rb']
  unless ENV['NO_RCOV']
    t.rcov = true
    t.rcov_dir = 'doc/output/coverage'
    t.rcov_opts = ['--exclude', 'spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest']
  end
end

RCov::VerifyTask.new(:verify_rcov => :spec) do |t|
  t.threshold = 100.0 # Make sure you have rcov 0.7 or higher!
  t.index_html = '../doc/output/coverage/index.html'
end

# vim: syntax=Ruby
