metanorma 1.1.7 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/notify.yml +47 -0
- data/.github/workflows/rake.yml +65 -0
- data/README.adoc +1 -3
- data/lib/metanorma/collection_renderer.rb +54 -15
- data/lib/metanorma/compile.rb +65 -4
- data/lib/metanorma/config.rb +1 -1
- data/lib/metanorma/util.rb +4 -0
- data/lib/metanorma/version.rb +1 -1
- data/metanorma.gemspec +4 -1
- metadata +34 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf7d6f99cb5eec27df20786b79a6932eb9e339c49072f4183b5cf9cb2ff747a3
|
4
|
+
data.tar.gz: '049577c6c56eb8092765b8e3679ac7f0c8362f9129e787e4e7b923f5b3b61734'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7de4db35db282e2ec0665d79533885c31fd8a1b46493177d47a48920ab685e20d2f5a74e473b11d0dfa54b357b8d4e0be15d2908885a770b4e3ec518dd427975
|
7
|
+
data.tar.gz: 8ef45f441c0129920575751b10bf3d86b132395d020794d39e69429e099ba6bcde65f1d5930dca240ad07209e12eddada6926bf56ec54322674ef8f47e07cedc
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: notify
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master ]
|
8
|
+
tags:
|
9
|
+
- '*'
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
notify:
|
13
|
+
name: Notify dependent repos
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
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_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.ref == 'refs/heads/master' || startsWith(github.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_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
|
@@ -0,0 +1,65 @@
|
|
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
|
+
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
|
14
|
+
runs-on: ${{ matrix.os }}
|
15
|
+
continue-on-error: ${{ matrix.experimental }}
|
16
|
+
strategy:
|
17
|
+
fail-fast: false
|
18
|
+
matrix:
|
19
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
20
|
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
21
|
+
experimental: [ false ]
|
22
|
+
include:
|
23
|
+
- ruby: '2.7'
|
24
|
+
os: 'ubuntu-latest'
|
25
|
+
experimental: true
|
26
|
+
- ruby: '2.7'
|
27
|
+
os: 'windows-latest'
|
28
|
+
experimental: true
|
29
|
+
- ruby: '2.7'
|
30
|
+
os: 'macos-latest'
|
31
|
+
experimental: true
|
32
|
+
steps:
|
33
|
+
- uses: actions/checkout@master
|
34
|
+
|
35
|
+
- uses: ruby/setup-ruby@v1
|
36
|
+
with:
|
37
|
+
ruby-version: ${{ matrix.ruby }}
|
38
|
+
|
39
|
+
- if: matrix.os == 'macos-latest'
|
40
|
+
run: brew install autoconf automake libtool
|
41
|
+
|
42
|
+
- uses: actions/cache@v2
|
43
|
+
with:
|
44
|
+
path: vendor/bundle
|
45
|
+
key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
|
46
|
+
restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
|
47
|
+
|
48
|
+
- run: bundle config set path 'vendor/bundle'
|
49
|
+
|
50
|
+
- run: bundle install --jobs 4 --retry 3
|
51
|
+
|
52
|
+
- run: bundle exec rake
|
53
|
+
|
54
|
+
tests-passed:
|
55
|
+
needs: rake
|
56
|
+
runs-on: ubuntu-latest
|
57
|
+
steps:
|
58
|
+
- name: Trigger tests passed event
|
59
|
+
uses: Sibz/github-status-action@v1
|
60
|
+
with:
|
61
|
+
authToken: ${{ secrets.GITHUB_TOKEN }}
|
62
|
+
context: 'tests-passed-successfully'
|
63
|
+
description: 'Tests passed successfully'
|
64
|
+
state: 'success'
|
65
|
+
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
data/README.adoc
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
= Metanorma: the standard for standards
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/metanorma.svg["Gem Version", link="https://rubygems.org/gems/metanorma"]
|
4
|
-
image:https://github.com/metanorma/metanorma/workflows/
|
5
|
-
image:https://github.com/metanorma/metanorma/workflows/macos/badge.svg["OSX Build Status", link="https://github.com/metanorma/metanorma/actions?query=workflow%3Amacos"]
|
6
|
-
image:https://github.com/metanorma/metanorma/workflows/windows/badge.svg["Windows Build Status", link="https://github.com/metanorma/metanorma/actions?query=workflow%3Awindows"]
|
4
|
+
image:https://github.com/metanorma/metanorma/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma/actions?workflow=rake"]
|
7
5
|
image:https://codeclimate.com/github/metanorma/metanorma/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma"]
|
8
6
|
image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma.svg["Pull Requests", link="https://github.com/metanorma/metanorma/pulls"]
|
9
7
|
image:https://img.shields.io/github/commits-since/metanorma/metanorma/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma/releases"]
|
@@ -33,6 +33,7 @@ module Metanorma
|
|
33
33
|
@outdir = options[:output_folder]
|
34
34
|
@coverpage = options[:coverpage]
|
35
35
|
@format = options[:format]
|
36
|
+
@compile_options = options[:compile] || {}
|
36
37
|
|
37
38
|
# list of files in the collection
|
38
39
|
@files = read_files folder
|
@@ -129,12 +130,34 @@ module Metanorma
|
|
129
130
|
end
|
130
131
|
file, _filename = targetfile(files[identifier], true)
|
131
132
|
xml = Nokogiri::XML(file)
|
133
|
+
add_document_suffix(identifier, xml)
|
132
134
|
files[identifier][:anchors] = read_anchors(xml)
|
133
135
|
files[identifier][:bibdata] = xml.at(ns("//bibdata"))
|
134
136
|
end
|
135
137
|
files
|
136
138
|
end
|
137
139
|
|
140
|
+
def add_suffix_to_attributes(doc, suffix, tag_name, attribute_name)
|
141
|
+
doc.xpath(ns("//#{tag_name}[@#{attribute_name}]")).each do |elem|
|
142
|
+
elem.attributes[attribute_name].value =
|
143
|
+
"#{elem.attributes[attribute_name].value}_#{suffix}"
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def add_document_suffix(identifier, doc)
|
148
|
+
document_suffix = Asciidoctor::Standoc::Cleanup.to_ncname(identifier)
|
149
|
+
[%w[* id],
|
150
|
+
%w[* bibitemid],
|
151
|
+
%w[review from],
|
152
|
+
%w[review to],
|
153
|
+
%w[index to],
|
154
|
+
%w[xref target],
|
155
|
+
%w[callout target]]
|
156
|
+
.each do |(tag_name, attribute_name)|
|
157
|
+
add_suffix_to_attributes(doc, document_suffix, tag_name, attribute_name)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
138
161
|
# map locality type and label (e.g. "clause" "1") to id = anchor for
|
139
162
|
# a document
|
140
163
|
def read_anchors(xml)
|
@@ -142,9 +165,13 @@ module Metanorma
|
|
142
165
|
xrefs = @isodoc.xref_init(@lang, @script, @isodoc, @isodoc.i18n, {})
|
143
166
|
xrefs.parse xml
|
144
167
|
xrefs.get.each do |k, v|
|
145
|
-
v[:label] && v[:type] || next
|
146
168
|
ret[v[:type]] ||= {}
|
147
|
-
|
169
|
+
index = v[:container] || v[:label].nil? || v[:label].empty? ?
|
170
|
+
UUIDTools::UUID.random_create.to_s : v[:label]
|
171
|
+
# Note: will only key clauses, which have unambiguous reference label in locality.
|
172
|
+
# Notes, examples etc with containers are just plunked agaisnt UUIDs, so that their
|
173
|
+
# IDs can at least be registered to be tracked as existing.
|
174
|
+
ret[v[:type]][index] = k
|
148
175
|
end
|
149
176
|
ret
|
150
177
|
end
|
@@ -250,6 +277,7 @@ module Metanorma
|
|
250
277
|
newbib = bib.replace(@files[docid][:bibdata])
|
251
278
|
newbib.name = "bibitem"
|
252
279
|
newbib["id"] = id
|
280
|
+
newbib["hidden"] = "true"
|
253
281
|
newbib&.at(ns("./ext"))&.remove
|
254
282
|
_file, url = targetfile(@files[docid], false)
|
255
283
|
uri_node = Nokogiri::XML::Node.new "uri", newbib
|
@@ -270,13 +298,16 @@ module Metanorma
|
|
270
298
|
# @return [String] XML content
|
271
299
|
def update_xrefs(file, identifier)
|
272
300
|
docxml = Nokogiri::XML(file)
|
301
|
+
add_document_suffix(identifier, docxml)
|
273
302
|
docxml.xpath(ns("//bibitem[not(ancestor::bibitem)]")).each do |b|
|
274
303
|
docid = b&.at(ns("./docidentifier[@type = 'repository']"))&.text
|
275
304
|
next unless docid && %r{^current-metanorma-collection/}.match(docid)
|
276
|
-
|
277
305
|
update_bibitem(b, identifier)
|
278
306
|
update_anchors(b, docxml, docid)
|
279
307
|
end
|
308
|
+
docxml.xpath(ns("//references[not(./bibitem[not(@hidden) or @hidden = 'false'])]")).each do |f|
|
309
|
+
f["hidden"] = "true"
|
310
|
+
end
|
280
311
|
docxml.to_xml
|
281
312
|
end
|
282
313
|
|
@@ -284,18 +315,25 @@ module Metanorma
|
|
284
315
|
# anchor given the locality, and insert it into the crossref
|
285
316
|
def update_anchors(bib, docxml, _id) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
286
317
|
docid = bib&.at(ns("./docidentifier"))&.text
|
318
|
+
document_suffix = Asciidoctor::Standoc::Cleanup.to_ncname(docid)
|
287
319
|
docxml.xpath("//xmlns:eref[@citeas = '#{docid}']").each do |e|
|
288
|
-
e.at(ns(".//locality[@type = 'anchor']"))
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
320
|
+
if loc = e.at(ns(".//locality[@type = 'anchor']"))
|
321
|
+
ref = loc.at(ns("./referenceFrom")) || next
|
322
|
+
anchor = "#{ref.text}_#{document_suffix}"
|
323
|
+
next unless @files[docid][:anchors].inject([]) { |m, (_, x)| m+= x.values }.include?(anchor)
|
324
|
+
ref.content = anchor
|
325
|
+
else
|
326
|
+
ins = e.at(ns("./localityStack")) || next
|
327
|
+
type = ins&.at(ns("./locality/@type"))&.text
|
328
|
+
ref = ins&.at(ns("./locality/referenceFrom"))&.text
|
329
|
+
(anchor = @files[docid][:anchors][type][ref]) || next
|
330
|
+
ref_from = Nokogiri::XML::Node.new "referenceFrom", bib
|
331
|
+
ref_from.content = anchor.sub(/^_/, "")
|
332
|
+
locality = Nokogiri::XML::Node.new "locality", bib
|
333
|
+
locality[:type] = "anchor"
|
334
|
+
locality.add_child ref_from
|
335
|
+
ins << locality
|
336
|
+
end
|
299
337
|
end
|
300
338
|
end
|
301
339
|
|
@@ -310,7 +348,8 @@ module Metanorma
|
|
310
348
|
f.close
|
311
349
|
# warn "metanorma compile -x html #{f.path}"
|
312
350
|
c = Compile.new
|
313
|
-
|
351
|
+
options = { format: :asciidoc, extension_keys: @format }.merge @compile_options
|
352
|
+
c.compile f.path, options
|
314
353
|
@files[identifier][:outputs] = {}
|
315
354
|
@format.each do |e|
|
316
355
|
ext = c.processor.output_formats[e]
|
data/lib/metanorma/compile.rb
CHANGED
@@ -2,6 +2,9 @@ require "fileutils"
|
|
2
2
|
require "nokogiri"
|
3
3
|
require "htmlentities"
|
4
4
|
|
5
|
+
require "fontist"
|
6
|
+
require "fontist/manifest/install"
|
7
|
+
|
5
8
|
module Metanorma
|
6
9
|
class Compile
|
7
10
|
# @return [Array<String>]
|
@@ -21,6 +24,7 @@ module Metanorma
|
|
21
24
|
(file, isodoc = process_input(filename, options)) or return nil
|
22
25
|
relaton_export(isodoc, options)
|
23
26
|
extract(isodoc, options[:extract], options[:extract_type])
|
27
|
+
install_fonts(options)
|
24
28
|
process_extensions(extensions, file, isodoc, options)
|
25
29
|
end
|
26
30
|
|
@@ -63,21 +67,32 @@ module Metanorma
|
|
63
67
|
Util.log("[metanorma] Error: Please specify a standard type: #{@registry.supported_backends}.", :error)
|
64
68
|
return nil
|
65
69
|
end
|
70
|
+
|
66
71
|
stdtype = options[:type].to_sym
|
72
|
+
metanorma_flavor = "metanorma-#{stdtype}"
|
73
|
+
|
67
74
|
unless @registry.supported_backends.include? stdtype
|
68
|
-
Util.log("[metanorma] Info: Loading
|
75
|
+
Util.log("[metanorma] Info: Loading `#{metanorma_flavor}` gem for standard type `#{stdtype}`.", :info)
|
69
76
|
end
|
77
|
+
|
70
78
|
begin
|
71
79
|
require "metanorma-#{stdtype}"
|
72
|
-
Util.log("[metanorma] Info: gem
|
80
|
+
Util.log("[metanorma] Info: gem `#{metanorma_flavor}` loaded.", :info)
|
81
|
+
|
82
|
+
rescue Gem::ConflictError
|
83
|
+
Util.log("[metanorma] Error: Couldn't resolve dependencies for `metanorma-#{stdtype}`, Please add it to your Gemfile and run bundle install first", :error)
|
84
|
+
return false
|
85
|
+
|
73
86
|
rescue LoadError
|
74
|
-
Util.log("[metanorma] Error: loading gem
|
87
|
+
Util.log("[metanorma] Error: loading gem `#{metanorma_flavor}` failed. Exiting.", :error)
|
75
88
|
return false
|
76
89
|
end
|
90
|
+
|
77
91
|
unless @registry.supported_backends.include? stdtype
|
78
|
-
Util.log("[metanorma] Error: The
|
92
|
+
Util.log("[metanorma] Error: The `#{metanorma_flavor}` gem still doesn't support `#{stdtype}`. Exiting.", :error)
|
79
93
|
return false
|
80
94
|
end
|
95
|
+
|
81
96
|
true
|
82
97
|
end
|
83
98
|
|
@@ -246,14 +261,60 @@ module Metanorma
|
|
246
261
|
@processor.output(isodoc, xml_name, outfilename, ext, isodoc_options)
|
247
262
|
rescue StandardError => e
|
248
263
|
puts e.message
|
264
|
+
puts e.backtrace.join("\n")
|
249
265
|
end
|
250
266
|
end
|
251
267
|
wrap_html(options, file_extension, outfilename)
|
252
268
|
end
|
253
269
|
end
|
254
270
|
|
271
|
+
def install_fonts(options)
|
272
|
+
if options[:"no-install-fonts"]
|
273
|
+
Util.log("[fontist] Skip font installation because" \
|
274
|
+
" --no-install-fonts argument passed", :debug)
|
275
|
+
return
|
276
|
+
end
|
277
|
+
|
278
|
+
if !@processor.respond_to?(:fonts_manifest) || @processor.fonts_manifest.nil?
|
279
|
+
Util.log("[fontist] Skip font installation because font_manifest is missing", :debug)
|
280
|
+
return
|
281
|
+
end
|
282
|
+
|
283
|
+
manifest = @processor.fonts_manifest
|
284
|
+
agree_to_terms = options[:"agree-to-terms"] || false
|
285
|
+
continue_without_fonts = options[:"continue-without-fonts"] || false
|
286
|
+
|
287
|
+
install_fonts_safe(manifest, agree_to_terms, continue_without_fonts)
|
288
|
+
end
|
289
|
+
|
255
290
|
private
|
256
291
|
|
292
|
+
def install_fonts_safe(manifest, agree, continue)
|
293
|
+
fontist_install(manifest, agree)
|
294
|
+
rescue Fontist::Errors::LicensingError
|
295
|
+
if continue
|
296
|
+
Util.log("[fontist] Processing will continue without fonts installed", :debug)
|
297
|
+
else
|
298
|
+
Util.log("[fontist] Aborting without proper fonts installed," \
|
299
|
+
" make sure that you have set option --agree-to-terms", :fatal)
|
300
|
+
end
|
301
|
+
rescue Fontist::Errors::FontError => e
|
302
|
+
Util.log("[fontist] '#{e.font}' font is not supported. " \
|
303
|
+
"Please report this issue at github.com/metanorma/metanorma-#{@processor.short}/issues" \
|
304
|
+
" to report this issue.", :info)
|
305
|
+
rescue Fontist::Errors::FormulaIndexNotFoundError
|
306
|
+
Util.log("[fontist] Missing formula index. Fetching it...", :debug)
|
307
|
+
Fontist::Formula.update_formulas_repo
|
308
|
+
fontist_install(manifest, agree)
|
309
|
+
end
|
310
|
+
|
311
|
+
def fontist_install(manifest, agree)
|
312
|
+
Fontist::Manifest::Install.from_hash(
|
313
|
+
manifest,
|
314
|
+
confirmation: agree ? "yes" : "no"
|
315
|
+
)
|
316
|
+
end
|
317
|
+
|
257
318
|
# @param options [Hash]
|
258
319
|
# @return [String]
|
259
320
|
def change_output_dir(options)
|
data/lib/metanorma/config.rb
CHANGED
data/lib/metanorma/util.rb
CHANGED
data/lib/metanorma/version.rb
CHANGED
data/metanorma.gemspec
CHANGED
@@ -27,6 +27,9 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_runtime_dependency 'htmlentities'
|
28
28
|
spec.add_runtime_dependency 'nokogiri'
|
29
29
|
spec.add_runtime_dependency 'mn2pdf', "~> 1"
|
30
|
+
spec.add_runtime_dependency 'pry'
|
31
|
+
spec.add_runtime_dependency 'fontist', '~> 1.8'
|
32
|
+
|
30
33
|
# get relaton-cli to avoic circular reference with metanorma-standoc
|
31
34
|
#spec.add_dependency "relaton-cli"
|
32
35
|
#spec.add_dependency "metanorma-standoc", "~> 1.5.3"
|
@@ -36,7 +39,7 @@ Gem::Specification.new do |spec|
|
|
36
39
|
spec.add_development_dependency "byebug", "~> 10.0"
|
37
40
|
spec.add_development_dependency "rspec-command", "~> 1.0"
|
38
41
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
39
|
-
spec.add_development_dependency "metanorma-iso", "~> 1.
|
42
|
+
spec.add_development_dependency "metanorma-iso", "~> 1.6.0"
|
40
43
|
spec.add_development_dependency "sassc", "~> 2.4.0"
|
41
44
|
#spec.add_development_dependency "isodoc", "~> 1.2.1"
|
42
45
|
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.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -66,6 +66,34 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: fontist
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.8'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.8'
|
69
97
|
- !ruby/object:Gem::Dependency
|
70
98
|
name: rake
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +170,14 @@ dependencies:
|
|
142
170
|
requirements:
|
143
171
|
- - "~>"
|
144
172
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
173
|
+
version: 1.6.0
|
146
174
|
type: :development
|
147
175
|
prerelease: false
|
148
176
|
version_requirements: !ruby/object:Gem::Requirement
|
149
177
|
requirements:
|
150
178
|
- - "~>"
|
151
179
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
180
|
+
version: 1.6.0
|
153
181
|
- !ruby/object:Gem::Dependency
|
154
182
|
name: sassc
|
155
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,9 +203,8 @@ extra_rdoc_files:
|
|
175
203
|
- LICENSE.txt
|
176
204
|
files:
|
177
205
|
- ".github/workflows/dependent_repos.env"
|
178
|
-
- ".github/workflows/
|
179
|
-
- ".github/workflows/
|
180
|
-
- ".github/workflows/windows.yml"
|
206
|
+
- ".github/workflows/notify.yml"
|
207
|
+
- ".github/workflows/rake.yml"
|
181
208
|
- ".gitignore"
|
182
209
|
- ".hound.yml"
|
183
210
|
- ".rspec"
|
data/.github/workflows/macos.yml
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: macos
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
paths-ignore:
|
10
|
-
- .github/workflows/ubuntu.yml
|
11
|
-
- .github/workflows/windows.yml
|
12
|
-
|
13
|
-
jobs:
|
14
|
-
test-macos:
|
15
|
-
name: Test on Ruby ${{ matrix.ruby }} macOS
|
16
|
-
runs-on: macos-latest
|
17
|
-
continue-on-error: ${{ matrix.experimental }}
|
18
|
-
strategy:
|
19
|
-
fail-fast: false
|
20
|
-
matrix:
|
21
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
-
experimental: [false]
|
23
|
-
include:
|
24
|
-
- ruby: '2.7'
|
25
|
-
experimental: true
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@master
|
28
|
-
- name: Use Ruby
|
29
|
-
uses: actions/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby }}
|
32
|
-
- name: Update gems
|
33
|
-
run: |
|
34
|
-
sudo gem install bundler --force
|
35
|
-
bundle install --jobs 4 --retry 3
|
36
|
-
- name: Run specs
|
37
|
-
run: |
|
38
|
-
bundle exec rake
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: ubuntu
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
tags:
|
9
|
-
- '*'
|
10
|
-
pull_request:
|
11
|
-
paths-ignore:
|
12
|
-
- .github/workflows/macos.yml
|
13
|
-
- .github/workflows/windows.yml
|
14
|
-
|
15
|
-
jobs:
|
16
|
-
test-linux:
|
17
|
-
name: Test on Ruby ${{ matrix.ruby }} Ubuntu
|
18
|
-
runs-on: ubuntu-latest
|
19
|
-
continue-on-error: ${{ matrix.experimental }}
|
20
|
-
strategy:
|
21
|
-
fail-fast: false
|
22
|
-
matrix:
|
23
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
24
|
-
experimental: [false]
|
25
|
-
include:
|
26
|
-
- ruby: '2.7'
|
27
|
-
experimental: true
|
28
|
-
steps:
|
29
|
-
- uses: actions/checkout@master
|
30
|
-
- name: Use Ruby
|
31
|
-
uses: actions/setup-ruby@v1
|
32
|
-
with:
|
33
|
-
ruby-version: ${{ matrix.ruby }}
|
34
|
-
- name: Update gems
|
35
|
-
run: |
|
36
|
-
gem install bundler
|
37
|
-
bundle install --jobs 4 --retry 3
|
38
|
-
- name: Run specs
|
39
|
-
run: |
|
40
|
-
bundle exec rake
|
41
|
-
- name: Trigger repositories
|
42
|
-
if: matrix.ruby == '2.6'
|
43
|
-
env:
|
44
|
-
GH_USERNAME: metanorma-ci
|
45
|
-
GH_ACCESS_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
46
|
-
run: |
|
47
|
-
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/trigger-gh-actions.sh
|
48
|
-
[[ -f ".github/workflows/dependent_repos.env" ]] && source .github/workflows/dependent_repos.env
|
49
|
-
CLIENT_PAYLOAD=$(cat <<EOF
|
50
|
-
"{ "ref": "${GITHUB_REF}", "repo": "${GITHUB_REPOSITORY}" }"
|
51
|
-
EOF
|
52
|
-
)
|
53
|
-
for repo in $REPOS
|
54
|
-
do
|
55
|
-
sh trigger-gh-actions.sh $ORGANISATION $repo $GH_USERNAME $GH_ACCESS_TOKEN $GITHUB_REPOSITORY "$CLIENT_PAYLOAD"
|
56
|
-
done
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
name: windows
|
4
|
-
|
5
|
-
on:
|
6
|
-
push:
|
7
|
-
branches: [ master ]
|
8
|
-
pull_request:
|
9
|
-
paths-ignore:
|
10
|
-
- .github/workflows/macos.yml
|
11
|
-
- .github/workflows/ubuntu.yml
|
12
|
-
|
13
|
-
jobs:
|
14
|
-
test-windows:
|
15
|
-
name: Test on Ruby ${{ matrix.ruby }} Windows
|
16
|
-
runs-on: windows-latest
|
17
|
-
continue-on-error: ${{ matrix.experimental }}
|
18
|
-
strategy:
|
19
|
-
fail-fast: false
|
20
|
-
matrix:
|
21
|
-
ruby: [ '2.6', '2.5', '2.4' ]
|
22
|
-
experimental: [false]
|
23
|
-
include:
|
24
|
-
- ruby: '2.7'
|
25
|
-
experimental: true
|
26
|
-
steps:
|
27
|
-
- uses: actions/checkout@master
|
28
|
-
- name: Use Ruby
|
29
|
-
uses: actions/setup-ruby@v1
|
30
|
-
with:
|
31
|
-
ruby-version: ${{ matrix.ruby }}
|
32
|
-
- name: Update gems
|
33
|
-
shell: pwsh
|
34
|
-
run: |
|
35
|
-
gem install bundler
|
36
|
-
bundle config --local path vendor/bundle
|
37
|
-
bundle install --jobs 4 --retry 3
|
38
|
-
- name: Run specs
|
39
|
-
run: |
|
40
|
-
bundle exec rake
|