This repository has been archived by the owner on May 21, 2019. It is now read-only.
forked from davetron5000/gli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
88 lines (73 loc) · 1.94 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
require 'rake/clean'
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'rake/rdoctask'
require 'sdoc'
require 'grancher/task'
require 'reek/rake/task'
require 'roodi'
require 'roodi_task'
require 'cucumber'
require 'cucumber/rake/task'
CLEAN << "cruddo.rdoc"
CLEAN << "log"
CLOBBER << FileList['**/*.rbc']
Grancher::Task.new do |g|
g.branch = 'gh-pages'
g.push_to = 'origin'
g.directory 'html'
end
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
rd.options << '--fmt' << 'shtml'
rd.template = 'direct'
rd.title = 'Git Like Interface'
end
spec = eval(File.read('gli.gemspec'))
Rake::GemPackageTask.new(spec) do |pkg|
end
Reek::Rake::Task.new do |t|
t.ruby_opts << '-rubygems'
t.fail_on_error = true
t.config_files = ['test/gli.reek']
t.source_files = FileList['lib/**/*.rb'] - FileList['lib/support/*.rb']
end
RoodiTask.new do |t|
t.patterns = ['lib/*.rb','lib/gli/*.rb']
t.config = 'test/roodi.yaml'
end
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/init_simplecov.rb','test/tc_*.rb']
end
CUKE_RESULTS = 'results.html'
CLEAN << CUKE_RESULTS
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "features --format html -o #{CUKE_RESULTS} --format progress -x"
t.fork = false
end
begin
require 'rcov/rcovtask'
task :clobber_coverage do
rm_rf "coverage"
end
desc 'Measures test coverage'
task :coverage => :rcov do
puts "coverage/index.html contains what you need"
end
Rcov::RcovTask.new do |t|
t.libs << 'lib'
t.test_files = FileList['test/tc_*.rb']
end
rescue LoadError
begin
require 'simplecov'
rescue LoadError
$stderr.puts "neither rcov nor simplecov are installed; you won't be able to check code coverage"
end
end
desc 'Publish rdoc on github pages and push to github'
task :publish_rdoc => [:rdoc,:publish]
task :default => [:test,:features,:roodi,:reek]