metanorma 2.4.0 → 2.4.1

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: 2229a91588cc69992f7f3cba97a5856f84f9d6c4a6f5b97ef4ea031d6b4a279b
4
- data.tar.gz: 9c4a785518d8ebbfe8246e8fca7dad9db726ea789f334cd6f13a3d985f2ca426
3
+ metadata.gz: beb47bfd8337995c89db26dbe3992c782a043c283fd185d3deafad6b6a061cd8
4
+ data.tar.gz: fefc082f5cdee21ca43f8dc057c8687e59f43cf96c6cdd193e7e4310fcb16d81
5
5
  SHA512:
6
- metadata.gz: 3631bba7d4064614b4a6926619bc5542d22b871fad3d10a9dd4e701d9d45433837fd4b2b43107fc32838f53f6d0a5e3181c81ab81b5ddbfed96381f973af2a21
7
- data.tar.gz: d4877d254fb6182e6c24c71f20f89163ff72b5aa57b1df9b1acf0c419b665e727594bf7ea8f98d897e35812b0de6e4b99f379271c578da5301e2956e8612ced2
6
+ metadata.gz: 47c3fb8e7381d8eae7db92681e5d9c30c314b0cdda07ca9b721539e9b504ec67a8a74d5a0f5d0e6d9c75181ff18ca4a6f9aabc43e7be521d6cfeed7723708a4c
7
+ data.tar.gz: e9b31de135bc29dd3d29523c4da811e9e01b3f9755016fd45f5a8b5d75897379208eabe2fdf291543894423e90a96113306ac68aff783910e389dcbf98600ba0
@@ -53,7 +53,7 @@ module Metanorma
53
53
 
54
54
  def initialize_config(config)
55
55
  @config = config
56
- @directives = config.directive || [] # feeds initialize_directives
56
+ @directives = (config.directive || []).dup # feeds initialize_directives
57
57
  @bibdata = config.bibdata
58
58
  @prefatory = config.prefatory_content
59
59
  @final = config.final_content
@@ -45,7 +45,10 @@ module Metanorma
45
45
 
46
46
  def derive_format(entry, parent)
47
47
  entry.attachment and return
48
- entry.format ||= parent.format || %w(xml presentation html)
48
+ if Array(entry.format).empty?
49
+ parent_fmt = Array(parent.format)
50
+ entry.format = parent_fmt.empty? ? %w(xml presentation html) : parent_fmt.dup
51
+ end
49
52
  entry.format |= ["xml", "presentation"]
50
53
  end
51
54
 
@@ -78,7 +78,7 @@ module Metanorma
78
78
  "#{collection_filename}.xml")
79
79
  File.write collection_xml_path, collection_xml, encoding: "UTF-8"
80
80
  file_compile(collection_xml_path, fname, ident)
81
- FileUtils.rm(collection_xml_path)
81
+ FileUtils.rm_f(collection_xml_path)
82
82
  end
83
83
  end
84
84
  end
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "2.4.0".freeze
2
+ VERSION = "2.4.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.