-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRakefile
94 lines (76 loc) · 1.69 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
88
89
90
91
92
93
94
# Author: Chris Wailes <chris.wailes@gmail.com>
# Project: Filigree
# Date: 2013/4/19
# Description: Filigree's Rakefile.
############
# Requires #
############
# Add the Filigree source directory to the load path.
lib_dir = File.expand_path("./lib/", File.dirname(__FILE__))
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
# Filigree
require 'filigree/request_file'
require 'filigree/version'
###########
# Bundler #
###########
request_file('bundler', 'Bundler is not installed.') do
Bundler::GemHelper.install_tasks
end
########
# Flay #
########
request_file('flay', 'Flay is not installed.') do
desc 'Analyze code for similarities with Flay'
task :flay do
flay = Flay.new
flay.process(*Dir['lib/**/*.rb'])
flay.report
end
end
########
# Flog #
########
request_file('flog_task', 'Flog is not installed.') do
desc 'Analyze code complexity with Flog'
FlogTask.new do |t|
t.dirs = ['lib']
t.method = :max_method
t.verbose = true
end
end
############
# MiniTest #
############
request_file('rake/testtask', 'Minitest is not installed.') do
Rake::TestTask.new do |t|
t.libs << 'test'
t.test_files = FileList['test/ts_filigree.rb']
end
end
#########
# Notes #
#########
request_file('rake/notes/rake_task', 'Rake-notes is not installed.')
########
# Reek #
########
request_file('reek/rake/task', 'Reek is not installed.') do
Reek::Rake::Task.new do |t|
t.fail_on_error = false
end
end
########
# YARD #
########
request_file('yard', 'Yard is not installed.') do
YARD::Rake::YardocTask.new do |t|
t.options = [
'--title', 'Filigree',
'-m', 'markdown',
'-M', 'redcarpet',
'--private'
]
t.files = Dir['lib/**/*.rb']
end
end