This repository has been archived by the owner on Apr 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
83 lines (71 loc) · 1.58 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
require "pathname"
abspath = Pathname.new(File.dirname(__FILE__)).expand_path
relpath = abspath.relative_path_from(Pathname.pwd)
begin
require "rubygems"
require "bundler/setup"
rescue LoadError
warn "couldn't load bundler:"
warn " #{$!}"
end
task :console do
exec *%w(irb -I lib -r propr)
end
begin
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new do |t|
t.verbose = false
t.pattern = "#{relpath}/spec/examples/**/*.example"
t.rspec_opts = %w(--color)
t.rspec_opts << "--profile"
t.rspec_opts << "-I#{abspath}/spec"
end
rescue LoadError
task :spec do
warn "couldn't load rspec"
warn " #{$!}"
exit 1
end
end
begin
require "rcov"
begin
require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:rcov) do |t|
t.rcov = true
t.rcov_opts = "--exclude spec/,gems/,00401"
t.verbose = false
t.pattern = "#{relpath}/spec/examples/**/*.example"
t.rspec_opts = %w(--color --format p)
t.rspec_opts << "-I#{abspath}/spec"
end
rescue LoadError
task :rcov do
warn "couldn't load rspec"
warn " #{$!}"
exit 1
end
end
rescue LoadError
task :rcov do
warn "couldn't load rcov:"
warn " #{$!}"
exit 1
end
end
begin
require "yard"
# Note options are loaded from .yardopts
YARD::Rake::YardocTask.new(:yard => :clobber_yard)
task :clobber_yard do
rm_rf "#{relpath}/doc/generated"
mkdir_p "#{relpath}/doc/generated/images"
end
rescue LoadError
task :yard do
warn "couldn't load yard:"
warn " #{$!}"
exit 1
end
end
task :default => :spec