metanorma 1.5.10 → 1.5.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92a5d64c829606a032547fcdff9d91c0da5961e245174e23d986d1e4d7b66829
4
- data.tar.gz: 439aed18b6d51d07e96d929cfa3794374ce0002209ef9f0a7556c6e4393dd433
3
+ metadata.gz: 90e1529fc811c113969832dbfd36a70a77d8458259e775ad4967475a95bfdaac
4
+ data.tar.gz: 488a0f5e809991464ee2fa0fe9a6bc4cae50795fac9ca0ea7db76139b0dc84ec
5
5
  SHA512:
6
- metadata.gz: 9b480de019e1ff4356f103cb6ac76f3f185a497901aa5b6a71701c99ae76f598c39bbfba04d9d9c42327ab3433536fa9b3913727d8060073718fb11b9fbc5747
7
- data.tar.gz: 6265a0c25f8d727d9489a8a9d7bdadda0c265f724679dbc41ac3d2bd739bd89474b14bd3f32056d7cc4eb3e1f47c89a4352d906bd740a4a787b70377d0de0dfd
6
+ metadata.gz: 911e73b153257019ad46635218dd5d90f0f1ef85cab5e0a3229603727d3ff7c79b88c8c140b24ad5254b94b97622e5ce9cc4e48b8d15e1442330c3c6c05165b6
7
+ data.tar.gz: 7c93266f48b1ad6f4bf11a715d9ddcdffdc4b98f910da8ca8c99f55fef412741c40eb2d303e5be92bbfde7b58560b1694f342e1f7026ecac3b1f752e0379ba86
@@ -33,7 +33,6 @@ module Metanorma
33
33
  (file, isodoc = process_input(filename, options)) or return nil
34
34
  relaton_export(isodoc, options)
35
35
  extract(isodoc, options[:extract], options[:extract_type])
36
- font_install(options)
37
36
  process_exts(filename, extensions, file, isodoc, options)
38
37
  end
39
38
 
@@ -103,10 +102,22 @@ module Metanorma
103
102
  presentationxml: f.sub(/\.[^.]+$/, ".presentation.xml") }
104
103
  @queue = ::Metanorma::WorkersPool
105
104
  .new(ENV["METANORMA_PARALLEL"]&.to_i || 3)
105
+ gather_and_install_fonts(file, options.dup, extensions)
106
+ process_exts_run(fnames, file, isodoc, extensions, options)
107
+ @queue.shutdown
108
+ end
109
+
110
+ def process_exts_run(fnames, file, isodoc, extensions, options)
106
111
  Util.sort_extensions_execution(extensions).each do |ext|
107
112
  process_ext(ext, file, isodoc, fnames, options)
108
113
  end
109
- @queue.shutdown
114
+ end
115
+
116
+ def gather_and_install_fonts(file, options, extensions)
117
+ Util.sort_extensions_execution(extensions).each do |ext|
118
+ isodoc_options = get_isodoc_options(file, options, ext)
119
+ font_install(isodoc_options.merge(options))
120
+ end
110
121
  end
111
122
 
112
123
  def process_ext(ext, file, isodoc, fnames, options)
@@ -59,9 +59,16 @@ module Metanorma
59
59
  return if !opt[:fonts] ||
60
60
  opt[:fontlicenseagreement] == "continue-without-fonts"
61
61
 
62
+ @font_overrides ||= []
63
+ font_install_override(opt)
64
+ end
65
+
66
+ def font_install_override(opt)
62
67
  confirm = opt[:fontlicenseagreement] == "no-install-fonts" ? "no" : "yes"
63
68
  CSV.parse_line(opt[:fonts], col_sep: ";").map(&:strip).each do |f|
69
+ @font_overrides.include?(f) and next
64
70
  Fontist::Font.install(f, confirmation: confirm)
71
+ @font_overrides << f
65
72
  end
66
73
  end
67
74
 
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "1.5.10".freeze
2
+ VERSION = "1.5.12".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.10
4
+ version: 1.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-22 00:00:00.000000000 Z
11
+ date: 2023-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor