forked from schacon/ticgit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
39 lines (31 loc) · 914 Bytes
/
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
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