howzit 2.0.24 → 2.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/howzit/buildnote.rb +7 -3
- data/lib/howzit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29f72dd5e915f1fbec378cc4210902fb6e3b9ce376de4f4e962c08b40dc5bbca
|
4
|
+
data.tar.gz: bdc554ae8533b3a86360c82a41d4ea55677a5a271fab218db5b1057814aac490
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b49e67762ea36e7e792decb239a8d35f100f28be2992f70a2fb9b2d6ed13ba809db11aa4ea075244be6b263c1c464430b0e57db73ecf444a61f79fcdad812a91
|
7
|
+
data.tar.gz: 7d2d9b973f4798dc4ce0082ccdaad308748a4a39fe505f384f928cdf1fe73a23f751928907e2418a602e26f0de46bafb874d9f0917017d39a0c6feedcfb99990
|
data/CHANGELOG.md
CHANGED
data/lib/howzit/buildnote.rb
CHANGED
@@ -12,7 +12,7 @@ module Howzit
|
|
12
12
|
##
|
13
13
|
## @param file [String] The path to the build note file
|
14
14
|
##
|
15
|
-
def initialize(file: nil)
|
15
|
+
def initialize(file: nil, meta: nil)
|
16
16
|
file ||= note_file
|
17
17
|
|
18
18
|
@topics = []
|
@@ -21,7 +21,9 @@ module Howzit
|
|
21
21
|
content = Util.read_file(file)
|
22
22
|
raise "{br}No content found in build note (#{file}){x}".c if content.nil? || content.empty?
|
23
23
|
|
24
|
-
|
24
|
+
this_meta = content.split(/^#/)[0].strip.get_metadata
|
25
|
+
|
26
|
+
@metadata = meta.nil? ? this_meta : meta.merge(this_meta)
|
25
27
|
|
26
28
|
read_help(file)
|
27
29
|
end
|
@@ -451,11 +453,12 @@ module Howzit
|
|
451
453
|
## @return [Array] extracted topics
|
452
454
|
##
|
453
455
|
def read_template(template, file, subtopics = nil)
|
454
|
-
note = BuildNote.new(file: file)
|
456
|
+
note = BuildNote.new(file: file, meta: @metadata)
|
455
457
|
|
456
458
|
template_topics = subtopics.nil? ? note.topics : extract_subtopics(note, subtopics)
|
457
459
|
template_topics.map do |topic|
|
458
460
|
topic.parent = template
|
461
|
+
topic.content = topic.content.render_template(@metadata)
|
459
462
|
topic
|
460
463
|
end
|
461
464
|
end
|
@@ -607,6 +610,7 @@ module Howzit
|
|
607
610
|
end
|
608
611
|
title = "#{short_path}:#{title}"
|
609
612
|
end
|
613
|
+
|
610
614
|
topic = Topic.new(title, prefix + lines.join("\n").strip.render_template(@metadata))
|
611
615
|
|
612
616
|
topics.push(topic)
|
data/lib/howzit/version.rb
CHANGED