metanorma-itu 0.2.5 → 0.2.6

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: c26dd78f21a8922175597c45a4570101e0bc80ea1089f508f1f363a3fc02b440
4
- data.tar.gz: a061bb4174075cc27f6aaaecbb11f0c5e9db58545d8087885630420ea953c289
3
+ metadata.gz: 786ad4b858755dc7228fb7aa516093c03557f26e341a8daa99f3718e5fcdcd4c
4
+ data.tar.gz: 5242d55de66da6c90f09e8b638d7e0942fd0e52f4c0eac9751da8069cfa36b4c
5
5
  SHA512:
6
- metadata.gz: a1445d077b0f147f53a4e3a3a5a69789fcfe20eccc475c482c4131151e2138429bd03809650b637eae8adbaeba74df8f649272b5b0d14cebf722716950f0aa66
7
- data.tar.gz: dcca5c7362f9777208f13d26c84b4e4cda972d07ac6f25a059a2b792139a0263ad5db217348c69056d2f5cfca863efab3ac3f2e3ff87dd870ebb8a3787b0b38e
6
+ metadata.gz: 71bf062f4d6eae3040dff1d4e7b06a236658eabda739d91fbb547926944f3506abcce39918692dd5525202d28bb2fe8662ee19702b5da1cd316c58c55083b15b
7
+ data.tar.gz: 1739a7c6b47dec20c6b011f4f9b8dc47613b9b1670abbe6386497ac76748f4af2a54a27cff58014b1dd268cd8ef9a7bd69d354152fbb2fa71265dd1e04e204b3
@@ -0,0 +1,34 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: macos
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-macos:
9
+ name: Test on Ruby ${{ matrix.ruby }} macOS
10
+ runs-on: macos-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ - name: Use Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ architecture: 'x64'
21
+ - name: Update gems
22
+ run: |
23
+ sudo gem install bundler -v "~> 2" --force
24
+ bundle install --jobs 4 --retry 3
25
+ - name: Use Node
26
+ uses: actions/setup-node@v1
27
+ with:
28
+ node-version: '8'
29
+ - name: Install Puppeteer
30
+ run: |
31
+ npm install -g puppeteer
32
+ - name: Run specs
33
+ run: |
34
+ bundle exec rake
@@ -0,0 +1,34 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: ubuntu
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-linux:
9
+ name: Test on Ruby ${{ matrix.ruby }} Ubuntu
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ - name: Use Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ architecture: 'x64'
21
+ - name: Update gems
22
+ run: |
23
+ gem install bundler -v "~> 2"
24
+ bundle install --jobs 4 --retry 3
25
+ - name: Use Node
26
+ uses: actions/setup-node@v1
27
+ with:
28
+ node-version: '8'
29
+ - name: Install Puppeteer
30
+ run: |
31
+ npm install -g puppeteer
32
+ - name: Run specs
33
+ run: |
34
+ bundle exec rake
@@ -0,0 +1,37 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
+ name: windows
4
+
5
+ on: [push]
6
+
7
+ jobs:
8
+ test-windows:
9
+ name: Test on Ruby ${{ matrix.ruby }} Windows
10
+ runs-on: windows-latest
11
+ strategy:
12
+ matrix:
13
+ ruby: [ '2.6', '2.5', '2.4' ]
14
+ steps:
15
+ - uses: actions/checkout@master
16
+ - name: Use Ruby
17
+ uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ architecture: 'x64'
21
+ - name: Update gems
22
+ shell: pwsh
23
+ run: |
24
+ gem install bundler -v "~> 2"
25
+ bundle config --local path vendor/bundle
26
+ bundle update
27
+ bundle install --jobs 4 --retry 3
28
+ - name: Use Node
29
+ uses: actions/setup-node@v1
30
+ with:
31
+ node-version: '8'
32
+ - name: Install Puppeteer
33
+ run: |
34
+ npm install -g puppeteer
35
+ - name: Run specs
36
+ run: |
37
+ bundle exec rake
@@ -443,6 +443,9 @@
443
443
  <optional>
444
444
  <attribute name="subsequence"/>
445
445
  </optional>
446
+ <optional>
447
+ <ref name="tname"/>
448
+ </optional>
446
449
  <oneOrMore>
447
450
  <choice>
448
451
  <ref name="formula"/>
@@ -44,6 +44,27 @@
44
44
  </oneOrMore>
45
45
  </element>
46
46
  </define>
47
+ <define name="references">
48
+ <element name="references">
49
+ <optional>
50
+ <attribute name="id">
51
+ <data type="ID"/>
52
+ </attribute>
53
+ </optional>
54
+ <optional>
55
+ <ref name="section-title"/>
56
+ </optional>
57
+ <zeroOrMore>
58
+ <ref name="BasicBlock"/>
59
+ </zeroOrMore>
60
+ <zeroOrMore>
61
+ <ref name="bibitem"/>
62
+ <zeroOrMore>
63
+ <ref name="note"/>
64
+ </zeroOrMore>
65
+ </zeroOrMore>
66
+ </element>
67
+ </define>
47
68
  </include>
48
69
  <define name="standard-document">
49
70
  <element name="standard-document">
@@ -42,11 +42,11 @@ module IsoDoc
42
42
  t.b do |b|
43
43
  name&.children&.each { |c2| parse(c2, b) }
44
44
  end
45
- type = annex&.document&.root&.at("//bibdata/ext/doctype")&.text || "recommendation"
46
- type = type.split(" ").map {|w| w.capitalize }.join(" ")
47
- info = annex["obligation"] == "informative"
48
- t.p { |p| p << (info ? @inform_annex_lbl : @norm_annex_lbl).sub(/%/, type) }
49
45
  end
46
+ type = annex&.document&.root&.at("//bibdata/ext/doctype")&.text || "recommendation"
47
+ type = type.split(" ").map {|w| w.capitalize }.join(" ")
48
+ info = annex["obligation"] == "informative"
49
+ div.p { |p| p << (info ? @inform_annex_lbl : @norm_annex_lbl).sub(/%/, type) }
50
50
  end
51
51
 
52
52
  def annex_name_lbl(clause, num)
@@ -54,6 +54,16 @@ module IsoDoc
54
54
  l10n("<b>#{lbl} #{num}</b>")
55
55
  end
56
56
 
57
+ def annex_names(clause, num)
58
+ lbl = clause["obligation"] == "informative" ? @appendix_lbl : @annex_lbl
59
+ @anchors[clause["id"]] = { label: annex_name_lbl(clause, num), type: "clause",
60
+ xref: "#{lbl} #{num}", level: 1 }
61
+ clause.xpath(ns("./clause | ./references | ./terms | ./definitions ")).each_with_index do |c, i|
62
+ annex_names1(c, "#{num}.#{i + 1}", 2)
63
+ end
64
+ hierarchical_asset_names(clause, num)
65
+ end
66
+
57
67
  def back_anchor_names(docxml)
58
68
  super
59
69
  if annexid = docxml&.at(ns("//bibdata/ext/structuredidentifier/annexid"))&.text
@@ -68,6 +78,14 @@ module IsoDoc
68
78
  end
69
79
  end
70
80
 
81
+ def annex_names1(clause, num, level)
82
+ @anchors[clause["id"]] = { label: num, xref: "#{@labels["annex_subclause"]} #{num}",
83
+ level: level, type: "clause" }
84
+ clause.xpath(ns("./clause")).each_with_index do |c, i|
85
+ annex_names1(c, "#{num}.#{i + 1}", level + 1)
86
+ end
87
+ end
88
+
71
89
  def i18n_init(lang, script)
72
90
  super
73
91
  end
@@ -124,12 +142,6 @@ module IsoDoc
124
142
  num
125
143
  end
126
144
 
127
- def split_bibitems(f)
128
- bibitem = []
129
- f.xpath(ns("./bibitem")).each { |x| bibitem << x }
130
- bibitem
131
- end
132
-
133
145
  def nonstd_bibitem(list, b, ordinal, biblio)
134
146
  list.p **attr_code(iso_bibitem_entry_attrs(b, biblio)) do |ref|
135
147
  ref << "[#{render_identifier(bibitem_ref_code(b))}]"
@@ -9,3 +9,4 @@ norm_annex: (This annex forms an integral part of this %.)
9
9
  inform_annex: (This appendix does not form an integral part of this %.)
10
10
  formula: Equation
11
11
  inequality: Inequality
12
+ annex_subclause: Clause
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "0.2.5"
3
+ VERSION = "0.2.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-itu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2019-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -243,16 +243,17 @@ executables: []
243
243
  extensions: []
244
244
  extra_rdoc_files: []
245
245
  files:
246
+ - ".github/workflows/macos.yml"
247
+ - ".github/workflows/ubuntu.yml"
248
+ - ".github/workflows/windows.yml"
246
249
  - ".gitignore"
247
250
  - ".hound.yml"
248
251
  - ".rubocop.yml"
249
- - ".travis.yml"
250
252
  - CODE_OF_CONDUCT.md
251
253
  - Gemfile
252
254
  - LICENSE
253
255
  - README.adoc
254
256
  - Rakefile
255
- - appveyor.yml
256
257
  - bin/console
257
258
  - bin/rspec
258
259
  - bin/setup
data/.travis.yml DELETED
@@ -1,22 +0,0 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
- language: ruby
4
- cache: bundler
5
- os:
6
- - linux
7
- - osx
8
- rvm:
9
- - 2.6
10
- - 2.5
11
- - 2.4
12
- - ruby-head
13
- before_install:
14
- - nvm install 8
15
- - npm install -g puppeteer
16
- - npm install
17
- - gem install bundler -v "~> 2"
18
- - bundle update
19
- matrix:
20
- allow_failures:
21
- - rvm: ruby-head
22
-
data/appveyor.yml DELETED
@@ -1,37 +0,0 @@
1
- # Auto-generated !!! Do not edit it manually
2
- # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
- version: '{build}'
4
-
5
- cache:
6
- - vendor/bundle
7
-
8
- environment:
9
- matrix:
10
- - RUBY_VERSION: 26
11
- - RUBY_VERSION: 25
12
- - RUBY_VERSION: 24
13
- - RUBY_VERSION: _trunk
14
-
15
- matrix:
16
- allow_failures:
17
- - RUBY_VERSION: _trunk
18
-
19
- install:
20
- - ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
21
- - refreshenv
22
-
23
- build_script:
24
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
25
- - set GIT_TERMINAL_PROMPT=0
26
- - gem install bundler -v "~> 2"
27
- - bundle config --local path vendor/bundle
28
- - bundle update
29
- - bundle install
30
-
31
- before_test:
32
- - ruby -v
33
- - gem -v
34
- - bundle -v
35
-
36
- test_script:
37
- - bundle exec rake