Skip to content

Commit 0568bfd

Browse files
Added MC200-32 debug launch configuration and made tasks.rake for certificates easier to debug.
1 parent ddbcae2 commit 0568bfd

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.vscode/launch.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,21 @@
33
"configurations": [
44
{
55
"type": "rdbg",
6-
"name": "RVA20 Profile",
6+
"name": "RVA20",
77
"request": "launch",
88
"command": "bundle exec rake",
99
"script": "gen:profile[RVA20]",
1010
"args": [],
1111
"askParameters": false
12+
},
13+
{
14+
"type": "rdbg",
15+
"name": "MC200-32",
16+
"request": "launch",
17+
"command": "bundle exec rake",
18+
"script": "gen:cert_model_pdf[MC200-32]",
19+
"args": [],
20+
"askParameters": false
1221
}
1322
]
1423
}

backends/certificate_doc/tasks.rake

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,15 @@ Dir.glob("#{$root}/arch/certificate_model/*.yaml") do |f|
4545
erb.filename = "#{CERT_DOC_DIR}/templates/certificate.adoc.erb"
4646

4747
FileUtils.mkdir_p File.dirname(t.name)
48-
File.write t.name, AsciidocUtils.resolve_links(cfg_arch.find_replace_links(erb.result(binding)))
48+
49+
# Convert ERB to final ASCIIDOC. Note that this code is broken up into separate function calls
50+
# each with a variable name to aid in running a command-line debugger on this code.
51+
erb_result = erb.result(binding)
52+
erb_result_monospace_converted_to_links = cfg_arch.find_replace_links(erb_result)
53+
erb_result_with_links_added = cfg_arch.find_replace_links(erb_result_monospace_converted_to_links)
54+
erb_result_with_links_resolved = AsciidocUtils.resolve_links(erb_result_with_links_added)
55+
56+
File.write t.name, erb_result_with_links_resolved
4957
puts "Generated adoc source at #{t.name}"
5058
end
5159

0 commit comments

Comments
 (0)