metanorma 1.5.1 → 1.5.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: 8c62d15c313b6595ca184016faa8f0996de7d1d8f1321e932e6adc89d230682d
4
- data.tar.gz: f13f182618c3fec66f42e412bfe3d4baa142b877421458fb2555912ce077f8e5
3
+ metadata.gz: 2dd771e6d08104e0da071e1a9326ebdd909565d6e53b5393b4375dde3507e157
4
+ data.tar.gz: ff4931bf6d1fd1bbed2ffb47b4dbf6dbda95027caff1d24f388f881e4827da65
5
5
  SHA512:
6
- metadata.gz: 3d7e934fa1d1f0348a9877f25e037294e09513a3df04873ec6394b908d443cb2152480bd14c3e5948071657a6c4bcee2907964b8a2b408c7bb0d67a3f99e37c5
7
- data.tar.gz: e1e626b4795c18b5a934262bc37faf0c4fe997832661f73e27e852f6bf66f67bde8c2b2edc86343463e3fde70eefd722e9af19fca186957761048193c70fc29b
6
+ metadata.gz: 55f9e339d45f4cd40e6666660fdd2ad2c52b85332c07b64b66f59208cabd703e79ac38dda55070c99cd79a45b09199fb487b7aa5701553e1599d8239f8a50959
7
+ data.tar.gz: ba2ccbb163a0bad558a56680a8bf66d112ca3cc0f72fb87772b678b029d3c8ac3e27152f28442c5cade32149ab86a09e1ebebe19786e1a770c53f85036f3723e
@@ -119,7 +119,7 @@ module Metanorma
119
119
  end
120
120
 
121
121
  def attr(key)
122
- if key == "fonts-manifest" && @font_locations
122
+ if key == "fonts-manifest" && @fonts_manifest
123
123
  @fonts_manifest
124
124
  end
125
125
  end
@@ -71,7 +71,8 @@ module Metanorma
71
71
  toc-figures toc-tables toc-recommendations fonts
72
72
  font-license-agreement pdf-allow-access-content
73
73
  pdf-encrypt-metadata iso-word-template document-scheme
74
- localize-number).freeze
74
+ localize-number iso-word-bg-strip-color
75
+ modspec-identifier-base).freeze
75
76
 
76
77
  def extract_options(file)
77
78
  header = file.sub(/\n\n.*$/m, "\n")
@@ -1,3 +1,3 @@
1
1
  module Metanorma
2
- VERSION = "1.5.1".freeze
2
+ VERSION = "1.5.2".freeze
3
3
  end
data/metanorma.gemspec CHANGED
@@ -14,13 +14,14 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "BSD-2-Clause"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
- f.match(%r{^(test|spec|features)/})
17
+ f.match(%r{^(test|spec|features|bin|.github)/}) \
18
+ || f.match(%r{Rakefile|bin/rspec})
18
19
  end
19
20
  spec.extra_rdoc_files = %w[README.adoc CHANGELOG.adoc LICENSE.txt]
20
21
  spec.bindir = "bin"
21
22
  # spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
23
  spec.require_paths = ["lib"]
23
- spec.required_ruby_version = ">= 2.5.0"
24
+ spec.required_ruby_version = ">= 2.7.0"
24
25
 
25
26
  spec.add_runtime_dependency "asciidoctor"
26
27
  spec.add_runtime_dependency "fontist", ">= 1.14.3"
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.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-10 00:00:00.000000000 Z
11
+ date: 2022-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -258,10 +258,6 @@ extra_rdoc_files:
258
258
  - CHANGELOG.adoc
259
259
  - LICENSE.txt
260
260
  files:
261
- - ".github/workflows/dependent_repos.env"
262
- - ".github/workflows/notify.yml"
263
- - ".github/workflows/rake.yml"
264
- - ".github/workflows/release.yml"
265
261
  - ".gitignore"
266
262
  - ".hound.yml"
267
263
  - ".rspec"
@@ -271,12 +267,6 @@ files:
271
267
  - Gemfile
272
268
  - LICENSE.txt
273
269
  - README.adoc
274
- - Rakefile
275
- - bin/console
276
- - bin/metanorma-pdf.js
277
- - bin/rasterize.js
278
- - bin/rspec
279
- - bin/setup
280
270
  - lib/metanorma.rb
281
271
  - lib/metanorma/asciidoctor_extensions.rb
282
272
  - lib/metanorma/asciidoctor_extensions/glob_include_processor.rb
@@ -314,14 +304,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
314
304
  requirements:
315
305
  - - ">="
316
306
  - !ruby/object:Gem::Version
317
- version: 2.5.0
307
+ version: 2.7.0
318
308
  required_rubygems_version: !ruby/object:Gem::Requirement
319
309
  requirements:
320
310
  - - ">="
321
311
  - !ruby/object:Gem::Version
322
312
  version: '0'
323
313
  requirements: []
324
- rubygems_version: 3.1.6
314
+ rubygems_version: 3.3.7
325
315
  signing_key:
326
316
  specification_version: 4
327
317
  summary: Metanorma is the standard of standards; the metanorma gem allows you to create
@@ -1,2 +0,0 @@
1
- ORGANISATION=metanorma
2
- DEPENDENT_REPOS="metanorma-docker"
@@ -1,47 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: notify
4
-
5
- on:
6
- repository_dispatch:
7
- types: [ notify ]
8
-
9
- jobs:
10
- notify:
11
- name: Notify dependent repos
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v2
15
-
16
- - name: Trigger repositories
17
- env:
18
- GH_USERNAME: metanorma-ci
19
- GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
20
- run: |
21
- curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
22
- [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
23
- CLIENT_PAYLOAD=$(cat <<EOF
24
- "{ "ref": "${{ github.event.client_payload.ref }}", "repo": "${GITHUB_REPOSITORY}" }"
25
- EOF
26
- )
27
- for repo in $TEMPLATE_REPOS" $SAMPLES_REPOS"
28
- do
29
- sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
30
- done
31
-
32
- - name: Trigger release repositories
33
- if: github.event.client_payload.ref == 'refs/heads/master' || startsWith(github.event.client_payload.ref, 'refs/tags/v')
34
- env:
35
- GH_USERNAME: metanorma-ci
36
- GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
37
- run: |
38
- curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
39
- [[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
40
- CLIENT_PAYLOAD=$(cat <<EOF
41
- "{ "ref": "${{ github.event.client_payload.ref }}", "repo": "${GITHUB_REPOSITORY}" }"
42
- EOF
43
- )
44
- for repo in $DEPENDENT_REPOS
45
- do
46
- sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
47
- done
@@ -1,15 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: rake
4
-
5
- on:
6
- push:
7
- branches: [ master, main ]
8
- tags: [ v* ]
9
- pull_request:
10
-
11
- jobs:
12
- rake:
13
- uses: metanorma/ci/.github/workflows/inkscape-rake.yml@main
14
- secrets:
15
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -1,27 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: release
4
-
5
- on:
6
- workflow_dispatch:
7
- inputs:
8
- next_version:
9
- description: |
10
- Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
- required: true
12
- default: 'skip'
13
- push:
14
- tags: [ v* ]
15
-
16
- jobs:
17
- release:
18
- uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
19
- with:
20
- next_version: ${{ github.event.inputs.next_version }}
21
- release_command: rake release
22
- bundler_cache: false
23
- post_install: gem install bundler rake rspec
24
- secrets:
25
- rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
26
- pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
27
-
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: :spec
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "metanorma"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/metanorma-pdf.js DELETED
@@ -1,39 +0,0 @@
1
- #!/usr/bin/env node
2
- 'use strict';
3
-
4
- const puppeteer = require('puppeteer');
5
-
6
- const args = () => {
7
- let args = ['--no-sandbox', '--disable-setuid-sandbox', '--headless'];
8
- if (!process.platform.startsWith('win')) {
9
- args << '--single-process';
10
- }
11
- return {args};
12
- }
13
-
14
- const createPdf = async() => {
15
- let browser;
16
- let exitCode = 0;
17
- try {
18
- browser = await puppeteer.launch(args());
19
- const page = await browser.newPage();
20
- await page.goto(process.argv[2], {
21
- waitUntil: 'networkidle0',
22
- timeout: 120000 //ms
23
- });
24
- await page.pdf({
25
- path: process.argv[3],
26
- format: 'A4'
27
- });
28
- } catch (err) {
29
- console.error(err.message);
30
- console.error(err.stack);
31
- exitCode = 1;
32
- } finally {
33
- if (browser) {
34
- browser.close();
35
- }
36
- process.exit(exitCode);
37
- }
38
- };
39
- createPdf();
data/bin/rasterize.js DELETED
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var page = require('webpage').create(),
3
- system = require('system'),
4
- address, output, size, pageWidth, pageHeight;
5
-
6
- if (system.args.length < 3 || system.args.length > 5) {
7
- console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]');
8
- console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"');
9
- console.log(' image (png/jpg output) examples: "1920px" entire page, window width 1920px');
10
- console.log(' "800px*600px" window, clipped to 800x600');
11
- phantom.exit(1);
12
- } else {
13
- address = system.args[1];
14
- output = system.args[2];
15
- page.viewportSize = { width: 600, height: 600 };
16
- if (system.args.length > 3 && system.args[2].substr(-4) === ".pdf") {
17
- size = system.args[3].split('*');
18
- page.paperSize = size.length === 2 ? { width: size[0], height: size[1], margin: '0px' }
19
- : { format: system.args[3], orientation: 'portrait', margin: '1cm' };
20
- } else if (system.args.length > 3 && system.args[3].substr(-2) === "px") {
21
- size = system.args[3].split('*');
22
- if (size.length === 2) {
23
- pageWidth = parseInt(size[0], 10);
24
- pageHeight = parseInt(size[1], 10);
25
- page.viewportSize = { width: pageWidth, height: pageHeight };
26
- page.clipRect = { top: 0, left: 0, width: pageWidth, height: pageHeight };
27
- } else {
28
- console.log("size:", system.args[3]);
29
- pageWidth = parseInt(system.args[3], 10);
30
- pageHeight = parseInt(pageWidth * 3/4, 10); // it's as good an assumption as any
31
- console.log ("pageHeight:",pageHeight);
32
- page.viewportSize = { width: pageWidth, height: pageHeight };
33
- }
34
- }
35
- if (system.args.length > 4) {
36
- page.zoomFactor = system.args[4];
37
- }
38
- page.open(address, function (status) {
39
- if (status !== 'success') {
40
- console.log('Unable to load the address!');
41
- phantom.exit(1);
42
- } else {
43
- window.setTimeout(function () {
44
- page.render(output);
45
- phantom.exit();
46
- }, 200);
47
- }
48
- });
49
- }
data/bin/rspec DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- #
5
- # This file was generated by Bundler.
6
- #
7
- # The application 'rspec' is installed as part of a gem, and
8
- # this file is here to facilitate running it.
9
- #
10
-
11
- require "pathname"
12
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
- Pathname.new(__FILE__).realpath)
14
-
15
- bundle_binstub = File.expand_path("../bundle", __FILE__)
16
-
17
- if File.file?(bundle_binstub)
18
- if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
- load(bundle_binstub)
20
- else
21
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
- end
24
- end
25
-
26
- require "rubygems"
27
- require "bundler/setup"
28
-
29
- load Gem.bin_path("rspec-core", "rspec")
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here