metanorma-unece 0.2.3 → 0.2.4

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: 4b8c41599292d647d40925888e5d8fc7588398f61e49a1f703109de638c1f7a3
4
- data.tar.gz: 9a02d9518139c73ae7235d1275df62b0f88ebea3b0c23fb5f7e1adeb18d21340
3
+ metadata.gz: d186a9b0a4e2be3fe56017650701e47c8fe4cb55e4bc689ced7bf2279b29fecf
4
+ data.tar.gz: d1ec6aad5d792df9ad536a7b9ca6c0921d455bc10d5ba188daf2dd86c6e1735a
5
5
  SHA512:
6
- metadata.gz: 116d17989fc2b2ceb8eaecac6c24f3f69550f6ffb67cf86c54cf96b637aa12c5dcda194aa367f36783066d5ed9592918ccf0ec920771d04e9b01ee3c547bf185
7
- data.tar.gz: 5b1316642cdeeb0e8438a8ee12b52249a2a01c2513ec2b53cdf7f50b3320a22dfb3da75b0aece04a4eaef15cb42dc17c0d7610464c6df1ffa048d09d6a9df8e3
6
+ metadata.gz: f5db984f5783f1e20faba52608636b657f4aa35d663041807323174ddfcb1e7a861cb2fbf3b7e6dd516d0ee57d531af891ae623f91c169225f8a0178cd0a9497
7
+ data.tar.gz: e78a749e64c11425a8857b9ca07cee72165dac17ef82120a84fdd634619ff6f55aecd0857ac25f2bf2817a8a6eaab0847f6fc6b8cde46912a1c5da8a36ecda03
@@ -0,0 +1,27 @@
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: Run specs
26
+ run: |
27
+ bundle exec rake
@@ -0,0 +1,27 @@
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: Run specs
26
+ run: |
27
+ bundle exec rake
@@ -0,0 +1,30 @@
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: Run specs
29
+ run: |
30
+ 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">
@@ -79,31 +79,31 @@ module IsoDoc
79
79
 
80
80
  def section_names(clause, num, lvl)
81
81
  return num if clause.nil?
82
- clause.at(ns("./clause | ./term | ./terms | ./definitions")) or
82
+ clause.at(ns("./clause | ./term | ./terms | ./definitions | ./references")) or
83
83
  leaf_section(clause, lvl) && return
84
84
  num = num + 1
85
85
  lbl = levelnumber(num, 1)
86
86
  @anchors[clause["id"]] =
87
87
  { label: lbl, xref: l10n("#{@clause_lbl} #{lbl}"), level: lvl, type: "clause" }
88
88
  i = 1
89
- clause.xpath(ns("./clause | ./term | ./terms | ./definitions")).each do |c|
89
+ clause.xpath(ns("./clause | ./term | ./terms | ./definitions | ./references")).each do |c|
90
90
  section_names1(c, "#{lbl}.#{levelnumber(i, lvl + 1)}", lvl + 1)
91
- i += 1 if c.at(ns("./clause | ./term | ./terms | ./definitions"))
91
+ i += 1 if c.at(ns("./clause | ./term | ./terms | ./definitions | ./references"))
92
92
  end
93
93
  num
94
94
  end
95
95
 
96
96
  def section_names1(clause, num, level)
97
- unless clause.at(ns("./clause | ./term | ./terms | ./definitions"))
97
+ unless clause.at(ns("./clause | ./term | ./terms | ./definitions | ./references"))
98
98
  leaf_section(clause, level) and return
99
99
  end
100
100
  /\.(?<leafnum>[^.]+$)/ =~ num
101
101
  @anchors[clause["id"]] =
102
102
  { label: leafnum, level: level, xref: l10n("#{@clause_lbl} #{num}"), type: "clause" }
103
103
  i = 1
104
- clause.xpath(ns("./clause | ./terms | ./term | ./definitions")).each do |c|
104
+ clause.xpath(ns("./clause | ./terms | ./term | ./definitions | ./references")).each do |c|
105
105
  section_names1(c, "#{num}.#{levelnumber(i, level + 1)}", level + 1)
106
- i += 1 if c.at(ns("./clause | ./term | ./terms | ./definitions"))
106
+ i += 1 if c.at(ns("./clause | ./term | ./terms | ./definitions | ./references"))
107
107
  end
108
108
  end
109
109
 
@@ -113,7 +113,7 @@ module IsoDoc
113
113
 
114
114
  def annex_names(clause, num)
115
115
  hierarchical_asset_names(clause, num)
116
- unless clause.at(ns("./clause | ./term | ./terms | ./definitions"))
116
+ unless clause.at(ns("./clause | ./term | ./terms | ./definitions | ./references"))
117
117
  annex_leaf_section(clause, num, 1) and return
118
118
  end
119
119
  @anchors[clause["id"]] = { label: annex_name_lbl(clause, num), type: "clause",
@@ -121,21 +121,21 @@ module IsoDoc
121
121
  i = 1
122
122
  clause.xpath(ns("./clause")).each do |c|
123
123
  annex_names1(c, "#{num}.#{annex_levelnumber(i, 2)}", 2)
124
- i += 1 if c.at(ns("./clause | ./term | ./terms | ./definitions"))
124
+ i += 1 if c.at(ns("./clause | ./term | ./terms | ./definitions | ./references"))
125
125
  end
126
126
  end
127
127
 
128
128
  def annex_names1(clause, num, level)
129
- unless clause.at(ns("./clause | ./term | ./terms | ./definitions"))
129
+ unless clause.at(ns("./clause | ./term | ./terms | ./definitions | ./references"))
130
130
  annex_leaf_section(clause, num, level) and return
131
131
  end
132
132
  /\.(?<leafnum>[^.]+$)/ =~ num
133
133
  @anchors[clause["id"]] = { label: leafnum, xref: "#{@annex_lbl} #{num}",
134
134
  level: level, type: "clause" }
135
135
  i = 1
136
- clause.xpath(ns("./clause")).each do |c|
136
+ clause.xpath(ns("./clause | ./references")).each do |c|
137
137
  annex_names1(c, "#{num}.#{annex_levelnumber(i, level + 1)}", level + 1)
138
- i += 1 if c.at(ns("./clause | ./term | ./terms | ./definitions"))
138
+ i += 1 if c.at(ns("./clause | ./term | ./terms | ./definitions | ./references"))
139
139
  end
140
140
  end
141
141
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Unece
3
- VERSION = "0.2.3"
3
+ VERSION = "0.2.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-unece
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
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
@@ -285,16 +285,17 @@ executables: []
285
285
  extensions: []
286
286
  extra_rdoc_files: []
287
287
  files:
288
+ - ".github/workflows/macos.yml"
289
+ - ".github/workflows/ubuntu.yml"
290
+ - ".github/workflows/windows.yml"
288
291
  - ".gitignore"
289
292
  - ".hound.yml"
290
293
  - ".rubocop.yml"
291
- - ".travis.yml"
292
294
  - CODE_OF_CONDUCT.md
293
295
  - Gemfile
294
296
  - LICENSE
295
297
  - README.adoc
296
298
  - Rakefile
297
- - appveyor.yml
298
299
  - bin/console
299
300
  - bin/rspec
300
301
  - bin/setup
data/.travis.yml DELETED
@@ -1,18 +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
- - gem install bundler -v "~> 2"
15
- - bundle update
16
- matrix:
17
- allow_failures:
18
- - rvm: ruby-head
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