metanorma 1.5.10 → 1.5.11

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: 56452832fb95047d0221a3720fba58e82b0d9766c5d29e3b1bacf42e703976ab
4
+ data.tar.gz: 162cf563a95b6a6ae6f096fcecf4734025a88d5fc50f4b18de8dae693fc986e0
5
5
  SHA512:
6
- metadata.gz: 9b480de019e1ff4356f103cb6ac76f3f185a497901aa5b6a71701c99ae76f598c39bbfba04d9d9c42327ab3433536fa9b3913727d8060073718fb11b9fbc5747
7
- data.tar.gz: 6265a0c25f8d727d9489a8a9d7bdadda0c265f724679dbc41ac3d2bd739bd89474b14bd3f32056d7cc4eb3e1f47c89a4352d906bd740a4a787b70377d0de0dfd
6
+ metadata.gz: c3276a5f4445b2776f86bb46beaf4c98d53155f44e2dfa2357b629a879aa36f3d1a621a7789136fac109a76729ca22e0520863d4ad4e5a05f8b3515633dc72ff
7
+ data.tar.gz: d42e2bbd2ecd3d79fcc7960664f1bfdee03661e78e65109a565e0b21adf9e5613be78eee0859e09b202ed2ce53a820901319150c4255516e2bc73554343d47fc
@@ -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.11".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.11
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-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor