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
|
# File 'lib/routes/validate.rb', line 27
def opts_routing
group = 'fmm'
@errors = []
@js = nil
@java = nil
Blufin::Projects::get_projects_as_array.each do |project|
if project[Blufin::Projects::PROJECT] == group
project_id = project[Blufin::Projects::PROJECT_ID]
project_type = project[Blufin::Projects::TYPE]
project_path = Blufin::Projects::get_project_path(project_id)
project_path_inner = Blufin::Projects::get_project_path(project_id, true)
case project_type
when Blufin::Projects::TYPE_API_SIMPLE
raise RuntimeError, "Project with type: #{Blufin::Projects::TYPE_API_SIMPLE} already scanned." unless @java.nil?
@java, errors_java = Blufin::ScannerJava::scan("#{project_path_inner}")
@errors.concat(errors_java)
when Blufin::Projects::TYPE_QUASAR
raise RuntimeError, "Project with type: #{Blufin::Projects::TYPE_QUASAR} already scanned." unless @s.nil?
@routes, errors_routes = EWorld::RouteScanner::scan(project)
@errors.concat(errors_routes)
td = project[Blufin::Projects::TRANSIENT_DATA]
root = Blufin::Strings::remove_surrounding_slashes(td[Blufin::Projects::CG_QUASAR_ROOT])
js = Blufin::Strings::remove_surrounding_slashes(td[Blufin::Projects::CG_QUASAR_JS])
jst = Blufin::Strings::remove_surrounding_slashes(td[Blufin::Projects::CG_QUASAR_TESTS])
if project.has_key?(Blufin::Projects::TRANSIENT_DATA) && td.has_key?(Blufin::Projects::CG_QUASAR_JS)
@js, errors_js = Blufin::ScannerJs::scan("#{project_path}/#{root}/#{js}")
@js_tests, errors_js_tests = Blufin::ScannerJsTests::scan("#{project_path}/#{root}/#{jst}")
@vue, errors_vue = Blufin::ScannerVue::scan("#{project_path}/#{root}")
@errors.concat(errors_js)
@errors.concat(errors_js_tests)
@errors.concat(errors_vue)
end
else
raise RuntimeError, "Unsupported project type: #{project_type}"
end
end
end
Blufin::ScannerError::output_cli(@errors)
end
|