Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (31 sloc) 914 Bytes
require 'rubygems'
Gem::manage_gems
require 'rake/gempackagetask'
require 'spec/rake/spectask'
spec = eval(File.read('ticgit.gemspec'))
Rake::GemPackageTask.new(spec) do |pkg|
pkg.need_tar = true
end
desc "Run all specs in spec directory"
Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ['--color']
end
namespace :spec do
desc "Run rcov on the spec files"
Spec::Rake::SpecTask.new(:coverage) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ['--color']
t.rcov = true
t.rcov_opts = ['--exclude', 'spec\/spec,bin\/spec,examples,\/var\/lib\/gems,\/Library\/Ruby,\.autotest']
end
end
desc "Clean out the coverage and pkg directories"
task :clean do
rm_rf 'coverage'
rm_rf 'pkg'
rm Dir.glob('ticgit*gem')
end
task :default => "pkg/#{spec.name}-#{spec.version}.gem" do
puts "generated latest version"
end