metanorma-cli 1.13.1 → 1.13.2

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: f67237d951341dbba03d5f347bacceb31575387d15a0098186d814a9830baf09
4
- data.tar.gz: 7b3607b07be161223f9381856eb8d383f62ee038043ce466056bc40dc3d0b1a0
3
+ metadata.gz: 57f44cdb498f9216d51e19155e5263225b0bfd634da0de925f12d688aa7177d1
4
+ data.tar.gz: 406693db31253464675720a7d3ea6dbc719ea7f6b1d3b133ddb87f286af68a87
5
5
  SHA512:
6
- metadata.gz: 67c3b61e65d0896aed16709dbf4f8cd7091fc2df2eff843103238585c221d35adfa8dd196a21e5c4bd3b58f57bdcd525bdfc7b3d08418957aa9c23c8e9945726
7
- data.tar.gz: 2d73a21a6b1725175dcc5f65bf6044db41032f72e8fecee79ddf3eff3f6c615f9ff995aff55896f3a72ae2c6ac22e767082d7e450e5eea70c4623b7deaa255da
6
+ metadata.gz: 3b7e2537fac7b2c1ab5e2616dc5418312d35e7e2b7f516ad621a4a202cbce804a45470def977642ca32d8778df929a9c4f95ac927fa0a1ada96dba8a8dc93393
7
+ data.tar.gz: 919c15a7e1f1a9f3790bfa74851f112930b2f71d931b563a501d68bda5fb1073d3eddde03e77a856334ed9bde0e865cb6cedab17548115ae91a5df440dd61b28
data/Gemfile CHANGED
@@ -6,6 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
7
  source "https://rubygems.pkg.github.com/metanorma" do
8
8
  gem "metanorma-nist"
9
+ gem "metanorma-bsi"
9
10
  end
10
11
 
11
12
  gemspec
@@ -13,16 +14,16 @@ gemspec
13
14
  group :development do
14
15
  gem "debug"
15
16
  gem "pry"
16
- gem "rake", "~> 13.0"
17
- gem "rspec", "~> 3.0"
18
- gem "rspec-command", "~> 1.0.3"
19
- gem "rspec-core", "~> 3.4"
20
- gem "rubocop", "~> 1"
17
+ gem "rake"
18
+ gem "rspec"
19
+ gem "rspec-command"
20
+ gem "rspec-core"
21
+ gem "rubocop"
21
22
  gem "rubocop-performance"
22
23
  # need for dev because locally compiled metanorma-iso does not have css
23
24
  gem "sassc-embedded"
24
- gem "simplecov", "~> 0.15"
25
- gem "vcr", "~> 6.1.0"
25
+ gem "simplecov"
26
+ gem "vcr"
26
27
  gem "webmock"
27
28
  gem "xml-c14n"
28
29
  end
data/bin/font-test CHANGED
@@ -2,8 +2,6 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "fontist"
5
- require "rubygems"
6
- require "yaml"
7
5
 
8
6
  flavors = ARGV
9
7
 
@@ -16,43 +14,46 @@ end
16
14
  Fontist::Formula.update_formulas_repo
17
15
 
18
16
  flavors.each do |flavor|
19
- gem_name = "metanorma-#{flavor}"
17
+ flavor_name = (flavor == "jcgm") ? "bipm" : flavor
18
+ gem_name = "metanorma-#{flavor_name}"
20
19
  require gem_name
21
20
 
22
- submodule = case flavor
23
- when "jcgm"
24
- "Bipm"
25
- else
26
- flavor.capitalize
27
- end
28
- processor_class = "Metanorma::#{submodule}::Processor"
21
+ # Determine the processor class based on the flavor
22
+ processor_class = "Metanorma::#{flavor_name.capitalize}::Processor"
29
23
 
30
24
  processor = Object
31
25
  .const_get(processor_class)
32
26
  .new
33
27
 
34
28
  unless processor.respond_to?(:fonts_manifest)
35
- puts "#{flavor} does not require any fonts. Skipping."
29
+ puts "#{gem_name} does not require any fonts. Skipping."
36
30
  exit(0)
37
31
  end
38
32
 
39
- manifest = processor.fonts_manifest
33
+ puts "Processing fonts for #{gem_name}..."
34
+ unless processor.respond_to?(:fonts_manifest)
35
+ die "#{processor_class} does not respond to :fonts_manifest"
36
+ end
40
37
 
41
- Fontist::Manifest::Install.from_hash(
42
- manifest,
38
+ puts "Using #{processor_class} to retrieve fonts manifest."
39
+ puts "Fonts manifest for #{gem_name} (processor.fonts_manifest):"
40
+ puts "--------------------------------------------------"
41
+ puts "#{processor.fonts_manifest.inspect}"
42
+ puts "--------------------------------------------------"
43
+
44
+ manifest = Fontist::Manifest::Install.from_hash(
45
+ processor.fonts_manifest,
43
46
  confirmation: "yes",
44
47
  )
45
48
 
46
- puts "#{flavor}-related fonts:"
47
- puts Fontist::Manifest::Locations.from_hash(manifest).to_yaml
49
+ puts "# #{gem_name} related fonts"
50
+ puts manifest.to_yaml
48
51
  rescue LoadError => e
49
52
  die "Could not load gem '#{gem_name}': #{e.message}"
50
53
  rescue NameError => e
51
54
  die "Could not find class '#{processor_class}': #{e.message}"
55
+ rescue Fontist::Errors => e
56
+ die "Fontist failed with: #{e.message}"
52
57
  rescue StandardError => e
53
- if e.class.to_s.start_with?("Fontist::Errors::")
54
- die "Fontist failed with: #{e.message}"
55
- else
56
- die "Unknown error: #{e.message}"
57
- end
58
+ die "Unknown error: #{e.message}"
58
59
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Cli
3
- VERSION = "1.13.1".freeze
3
+ VERSION = "1.13.2".freeze
4
4
  end
5
5
  end
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.13.1
4
+ version: 1.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-22 00:00:00.000000000 Z
11
+ date: 2025-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-ietf