metanorma-cli 1.9.7 → 1.10.0

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: 997a814d23bde5803d317ae4f01b713d999fffb53cc20db1a94c9a48f92182b8
4
- data.tar.gz: fd769af60cd4ea09114e6446123208274b7f95eda8d746431305eacc62133cfa
3
+ metadata.gz: e2a2d9427a79e8b77811528c4ac70f80f048e9936e93164d6966d2396850f25c
4
+ data.tar.gz: 94eef49ae0187df78ea0296671c3e9b512c9094f9539f64a5699b9ad289186dc
5
5
  SHA512:
6
- metadata.gz: ad64e574bbd85be40d7a65be046e679748fe625dfd9e4c64578cd436c9e8ad7c7ea12df9359429a7d54bccbdacf98762117ab2fc49bb975fd821b6b6abd070e6
7
- data.tar.gz: de85f5d123178b8a7654c0ff6f96844c4654d990cd87ee615e5126d761fd5b8ec3154a9cf422ad515add9e42ee9a96140182570747ff62877c8358590ebdb391
6
+ metadata.gz: '06284155fe55c10aada80c63cbb70f94a3ef297f20b835ab21b74595c9d4a993036d838abce27fc2f60d6cf8f17f710b6bed3212e99912948126c7858e86e606'
7
+ data.tar.gz: c6037c2db3220a8a8713a237222b1dbe0f31c32741e0de82bedc036b1b5a26f882ef48d11be8151035a2b3f78cd441def68788077d2db01a568011532ef9b0f0
@@ -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.7".freeze
3
+ VERSION = "1.10.0".freeze
4
4
  end
5
5
  end
@@ -49,7 +49,7 @@ Gem::Specification.new do |spec|
49
49
  spec.add_runtime_dependency "metanorma-standoc", "~> 2.8.4"
50
50
  # spec.add_runtime_dependency 'metanorma-mpfa', "~> 0.9.0"
51
51
  spec.add_runtime_dependency "git", "~> 1.5"
52
- spec.add_runtime_dependency "metanorma", "~> 1.7.1"
52
+ spec.add_runtime_dependency "metanorma", "~> 2.0.0"
53
53
  spec.add_runtime_dependency "metanorma-iho", "~> 0.9.0"
54
54
  spec.add_runtime_dependency "metanorma-itu", "~> 2.4.0"
55
55
  # 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.7
4
+ version: 1.10.0
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-04-23 00:00:00.000000000 Z
11
+ date: 2024-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debug
@@ -296,14 +296,14 @@ dependencies:
296
296
  requirements:
297
297
  - - "~>"
298
298
  - !ruby/object:Gem::Version
299
- version: 1.7.1
299
+ version: 2.0.0
300
300
  type: :runtime
301
301
  prerelease: false
302
302
  version_requirements: !ruby/object:Gem::Requirement
303
303
  requirements:
304
304
  - - "~>"
305
305
  - !ruby/object:Gem::Version
306
- version: 1.7.1
306
+ version: 2.0.0
307
307
  - !ruby/object:Gem::Dependency
308
308
  name: metanorma-iho
309
309
  requirement: !ruby/object:Gem::Requirement
@@ -482,7 +482,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
482
482
  - !ruby/object:Gem::Version
483
483
  version: '0'
484
484
  requirements: []
485
- rubygems_version: 3.3.26
485
+ rubygems_version: 3.3.27
486
486
  signing_key:
487
487
  specification_version: 4
488
488
  summary: Metanorma is the standard of standards; the metanorma gem allows you to create