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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d5ddc7a4ec5cda133517d27dfef17d80299c17a68de2469e9dab66e81dffa33
4
- data.tar.gz: 78fed9d51d054f4c39d3bb6b9daed3709e6a7f7644e5a6368bb924bb0b042665
3
+ metadata.gz: 29f72dd5e915f1fbec378cc4210902fb6e3b9ce376de4f4e962c08b40dc5bbca
4
+ data.tar.gz: bdc554ae8533b3a86360c82a41d4ea55677a5a271fab218db5b1057814aac490
5
5
  SHA512:
6
- metadata.gz: 5427a3f6754462ae1311194407a3c6dfc71b084bb639afa29d961fad758ed554ce40ccdb21ec7b9175289343866da6d1ddb0f9db5fccb12f8224d206f9d53b98
7
- data.tar.gz: 6222c4a34783c842fc342a27b2167588578afefa3f45a2fc16637b5d3f266d99d11bbefada5dd4a586902f914566a86efcef4262396133e573cf520923cd468a
6
+ metadata.gz: b49e67762ea36e7e792decb239a8d35f100f28be2992f70a2fb9b2d6ed13ba809db11aa4ea075244be6b263c1c464430b0e57db73ecf444a61f79fcdad812a91
7
+ data.tar.gz: 7d2d9b973f4798dc4ce0082ccdaad308748a4a39fe505f384f928cdf1fe73a23f751928907e2418a602e26f0de46bafb874d9f0917017d39a0c6feedcfb99990
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 2.0.25
2
+
3
+ 2022-08-09 12:46
4
+
5
+ #### FIXED
6
+
7
+ - Template metadata inheritence
8
+
1
9
  ### 2.0.24
2
10
 
3
11
  2022-08-09 09:04
@@ -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
- @metadata = content.split(/^#/)[0].strip.get_metadata
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)
@@ -3,5 +3,5 @@
3
3
  # Primary module for this gem.
4
4
  module Howzit
5
5
  # Current Howzit version.
6
- VERSION = '2.0.24'
6
+ VERSION = '2.0.25'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.24
4
+ version: 2.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra