-
Notifications
You must be signed in to change notification settings - Fork 7
/
Rakefile
executable file
·65 lines (52 loc) · 1.19 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
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'version'
require 'rake/version_task'
require 'code_statistics'
require 'yard'
require 'yard/rake/yardoc_task'
require 'rubocop/rake_task'
require 'rubocop/rake_task'
RuboCop::RakeTask.new
Rake::VersionTask.new
CLEAN.include('*.tmp', '*.old')
CLOBBER.include('*.tmp', 'build/*', '#*#')
RSpec::Core::RakeTask.new(:spec)
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', '-', 'doc/**/*', 'spec/**/*_spec.rb']
t.options += ['-o', 'yardoc']
end
YARD::Config.load_plugin('yard-rspec')
namespace :yardoc do
task :clobber do
begin
rm_r 'yardoc'
rescue StandardError
nil
end
begin
rm_r '.yardoc'
rescue StandardError
nil
end
end
end
task clobber: 'yardoc:clobber'
task default: [:spec]
task :stage do
Rake::Task['clean'].invoke
Rake::Task['clobber'].invoke
Rake::Task['install'].invoke
end
desc 'Run CVE security audit over bundle'
task :audit do
system('bundle audit')
end
desc 'Run dead line of code detection'
task :debride do
system('debride -w .debride-whitelist .')
end
desc 'Run SBOM CycloneDX Xml format file'
task :sbom do
system('cyclonedx-ruby -p .')
end