-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathRakefile
More file actions
53 lines (47 loc) · 1.07 KB
/
Rakefile
File metadata and controls
53 lines (47 loc) · 1.07 KB
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
# frozen_string_literal: true
require 'bundler/gem_tasks'
require 'rake/clean'
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
rescue LoadError
task :spec do
warn 'RSpec is disabled'
end
end
begin
require 'rubocop/rake_task'
RuboCop::RakeTask.new
rescue LoadError
task :rubocop do
warn 'RuboCop is disabled'
end
end
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |task|
task.files = FileList['./lib/**/*.rb']
end
rescue LoadError
task :yard do
warn 'YARD is disabled'
end
end
FIG_DIR = './fig'
desc 'make UML class diagram'
task :fig do
directory FIG_DIR
%w[diff_view dsl graphdb topology].each do |dir|
['', '-s'].each do |opt|
file = opt.empty? ? dir : "#{dir}#{opt.tr('-', '_')}"
file = "#{FIG_DIR}/#{file}.puml"
sh "bundle exec rb2puml #{opt} -d ./lib/netomox/#{dir} > #{file}"
end
end
FileList["#{FIG_DIR}/*.puml"].each do |puml|
sh "PLANTUML_LIMIT_SIZE=8192 plantuml #{puml}"
end
end
CLOBBER.include("#{FIG_DIR}/*.puml")
CLEAN.include('**/*~')