metanorma-cli 1.9.8 → 1.10.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: 438c88c2286271afdb449449abecf952d5ae7d38b0af3d1c39b6f0fa135ec12e
4
- data.tar.gz: fc2e43bcfcce543c691c50aadcd98556039f09db1adb25ac3c32ab596b854ef1
3
+ metadata.gz: 6c1f24af78da0eb71448b997cd6b894f4da53bf06b987dd5f780ff1310f71e89
4
+ data.tar.gz: 75966a4474bc52937568e5a5bbf2bb11d61d2932e7cd6bb58f4ef913f61863e7
5
5
  SHA512:
6
- metadata.gz: b608af91660cf56db05f00a68bc46b9e7b03dc90eec7274099c8240a681c44ff4f6690817ddf491130c2e79f4e5c11ad0162cb50476cf8b979fb62426b5ef4e6
7
- data.tar.gz: be31504c21dff7c13bf042a08a5635e0a5cc078aebcb8f013fd8841a06336c7e0b8173453708331e6c881004f3eb6aa549033944724bab2d915e4722d1aae9e1
6
+ metadata.gz: 0d12b84141c5af494513c93694368ce38461221e66aa10d2b65aee5f393aa010e27608305079633bf4d6d950de9893e541f25877eea48e8f88a348aae2461f4a
7
+ data.tar.gz: e9048b698f397e549e1face23ab9edc8bcd1b5d620b0a66c8c6cc6e50a602e599f4af603ff6a4bae3e6d76ab81d14d8abac12286422e06488d0673557475aa84
@@ -74,9 +74,9 @@ module Metanorma
74
74
 
75
75
  def xml_extract_options_from_file
76
76
  xml = Nokogiri::XML File.read(@file.to_s, encoding: "UTF-8") { |c| c.huge }
77
- { "coverpage" => xml.at("//xmlns:coverpage"),
78
- "format" => xml.at("//xmlns:format"),
79
- "output_folder" => xml.at("//xmlns:output_folder") }.compact
77
+ { "coverpage" => xml.at("//coverpage"),
78
+ "format" => xml.at("//format"),
79
+ "output_folder" => xml.at("//output_folder") }.compact
80
80
  end
81
81
  end
82
82
  end
@@ -11,8 +11,8 @@ require "mnconvert"
11
11
  module Metanorma
12
12
  module Cli
13
13
  class Command < ThorWithConfig
14
- class_option :no_progress, aliases: "-s", type: :boolean, default: true,
15
- desc: "Don't show progress for long running tasks (like download)"
14
+ class_option :progress, aliases: "-s", type: :boolean, default: false,
15
+ desc: "Show progress for long running tasks (like download)"
16
16
 
17
17
  desc "new NAME", "Create new Metanorma document"
18
18
  option :type, aliases: "-t", required: true, desc: "Document type"
@@ -39,7 +39,7 @@ module Metanorma
39
39
  option :strict, aliases: "-S", type: :boolean, desc: "Strict compilation: abort if there are any errors"
40
40
  option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
41
41
  "presented (WARNING: do know what you are agreeing with!)"
42
- option :no_install_fonts, type: :boolean, desc: "Skip the font installation process"
42
+ option :install_fonts, type: :boolean, default: true, desc: "Install required fonts"
43
43
  option :continue_without_fonts, type: :boolean, desc: "Continue processing even when fonts are missing"
44
44
 
45
45
  def compile(file_name = nil)
@@ -64,7 +64,7 @@ module Metanorma
64
64
  option :coverpage, aliases: "-c", desc: "Liquid template"
65
65
  option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
66
66
  "presented (WARNING: do know what you are agreeing with!)"
67
- option :no_install_fonts, type: :boolean, desc: "Skip the font installation process"
67
+ option :install_fonts, type: :boolean, default: true, desc: "Install required fonts"
68
68
  option :continue_without_fonts, type: :boolean, desc: "Continue processing even when fonts are missing"
69
69
  option :strict, aliases: "-S", type: :boolean, \
70
70
  desc: "Strict compilation: abort if there are any errors"
@@ -149,6 +149,10 @@ module Metanorma
149
149
  desc "config", "Manage configuration file"
150
150
  subcommand :config, Metanorma::Cli::Commands::Config
151
151
 
152
+ def self.exit_on_failure?
153
+ true
154
+ end
155
+
152
156
  private
153
157
 
154
158
  def single_type_extensions(type)
@@ -18,7 +18,7 @@ module Metanorma
18
18
  )
19
19
  option :agree_to_terms, type: :boolean, desc: "Agree / Disagree with all third-party licensing terms "\
20
20
  "presented (WARNING: do know what you are agreeing with!)"
21
- option :no_install_fonts, type: :boolean, desc: "Skip the font installation process"
21
+ option :install_fonts, type: :boolean, default: true, desc: "Install required fonts"
22
22
  option :continue_without_fonts, type: :boolean, desc: "Continue processing even when fonts are missing"
23
23
  option :stylesheet, alias: "-s", desc: "Stylesheet file path for rendering HTML page"
24
24
  option :template_dir, alias: "-t", desc: "Liquid template directory to render site design"
@@ -18,9 +18,9 @@ module Metanorma
18
18
  def filter_compile_options(options)
19
19
  copts = %w[
20
20
  agree_to_terms
21
- no_install_fonts
21
+ install_fonts
22
22
  continue_without_fonts
23
- no_progress
23
+ progress
24
24
  strict
25
25
  ]
26
26
  options.select { |k, _| copts.include?(k) }.symbolize_all_keys
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cli
3
- VERSION = "1.9.8".freeze
3
+ VERSION = "1.10.1".freeze
4
4
  end
5
5
  end
@@ -35,6 +35,8 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "rubocop", "~> 1.5.2"
36
36
  spec.add_development_dependency "sassc"
37
37
 
38
+ # TEMPORARY
39
+ spec.add_runtime_dependency "html2doc", "= 1.8.3"
38
40
  spec.add_runtime_dependency "metanorma-ietf", "~> 3.3.0"
39
41
  spec.add_runtime_dependency "metanorma-iso", "~> 2.7.3"
40
42
  spec.add_runtime_dependency "mnconvert"
@@ -49,7 +51,7 @@ Gem::Specification.new do |spec|
49
51
  spec.add_runtime_dependency "metanorma-standoc", "~> 2.8.4"
50
52
  # spec.add_runtime_dependency 'metanorma-mpfa', "~> 0.9.0"
51
53
  spec.add_runtime_dependency "git", "~> 1.5"
52
- spec.add_runtime_dependency "metanorma", "~> 1.7.1"
54
+ spec.add_runtime_dependency "metanorma", "~> 2.0.0"
53
55
  spec.add_runtime_dependency "metanorma-iho", "~> 0.9.0"
54
56
  spec.add_runtime_dependency "metanorma-itu", "~> 2.4.0"
55
57
  # spec.add_runtime_dependency "metanorma-nist", "~> 2.3.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.8
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-07 00:00:00.000000000 Z
11
+ date: 2024-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug
@@ -150,6 +150,20 @@ dependencies:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: html2doc
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - '='
158
+ - !ruby/object:Gem::Version
159
+ version: 1.8.3
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - '='
165
+ - !ruby/object:Gem::Version
166
+ version: 1.8.3
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: metanorma-ietf
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -296,14 +310,14 @@ dependencies:
296
310
  requirements:
297
311
  - - "~>"
298
312
  - !ruby/object:Gem::Version
299
- version: 1.7.1
313
+ version: 2.0.0
300
314
  type: :runtime
301
315
  prerelease: false
302
316
  version_requirements: !ruby/object:Gem::Requirement
303
317
  requirements:
304
318
  - - "~>"
305
319
  - !ruby/object:Gem::Version
306
- version: 1.7.1
320
+ version: 2.0.0
307
321
  - !ruby/object:Gem::Dependency
308
322
  name: metanorma-iho
309
323
  requirement: !ruby/object:Gem::Requirement