metanorma-csa 1.8.3 → 1.8.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: 1c7e132a7ba4bc10103b15b3e017a682872eef818912d69a24a0245364864c3f
4
- data.tar.gz: b1856f5f189efc7263ac72cc447d82809403cc8e1b1c42086fcd14f14d8ddc0a
3
+ metadata.gz: 336d7f47e040b261aff839d9a72a0aea35b619f63e92080826f60609632d1317
4
+ data.tar.gz: d75ca439e62213b743bf7d332960bb85e08538e39a24bc52055aec264b4ef5af
5
5
  SHA512:
6
- metadata.gz: f0f0e53eb1e557d5a971f3049ec2bf8cdd717dab84779a000fae8d19d35850f930c7ff2b61b0f4f9a1e256106aa8e55d7e91f919424d0e4e8708468846d5ffe8
7
- data.tar.gz: f6d84227cde217a93dd6fb18b4e886b7e9708fe111706acb852f19ef992c00eb411eb706837f47cd980f2ada769faec575686ad48f37635cccd7d136196c9d7e
6
+ metadata.gz: 11e0b4fdd0f904f437745c9dc3be1b233d6676c6a45c7507e94c5cefd058bdf203b4d5bde78103ae0e9bc2d207e7c4e509e19ff92174b1057091ab18b6cdfee1
7
+ data.tar.gz: ed6db8db7dd3a9e25d7b859fb4017bb47cab99b80b6b1c4c7543eec4dc5235137d92cd22532fbba2f163dfba0164c6de14f730549e4ad84bed90c7e7b498c9f1
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@v2
34
24
  with:
@@ -40,3 +30,14 @@ jobs:
40
30
  bundler-cache: true
41
31
 
42
32
  - run: bundle exec rake
33
+
34
+ tests-passed:
35
+ needs: rake
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: peter-evans/repository-dispatch@v1
39
+ with:
40
+ token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
41
+ repository: ${{ github.repository }}
42
+ event-type: tests-passed
43
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,12 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
10
  TargetRubyVersion: 2.4
@@ -72,6 +72,9 @@
72
72
  <optional>
73
73
  <ref name="doctype"/>
74
74
  </optional>
75
+ <optional>
76
+ <ref name="docsubtype"/>
77
+ </optional>
75
78
  <ref name="editorialgroup"/>
76
79
  <zeroOrMore>
77
80
  <ref name="ics"/>
@@ -45,6 +45,11 @@
45
45
  <optional>
46
46
  <attribute name="alt"/>
47
47
  </optional>
48
+ <optional>
49
+ <attribute name="updatetype">
50
+ <data type="boolean"/>
51
+ </attribute>
52
+ </optional>
48
53
  <text/>
49
54
  </element>
50
55
  </define>
@@ -543,6 +548,9 @@
543
548
  </define>
544
549
  <define name="BibDataExtensionType">
545
550
  <ref name="doctype"/>
551
+ <optional>
552
+ <ref name="docsubtype"/>
553
+ </optional>
546
554
  <optional>
547
555
  <ref name="editorialgroup"/>
548
556
  </optional>
@@ -890,6 +898,14 @@
890
898
  </define>
891
899
  </include>
892
900
  <!-- end overrides -->
901
+ <define name="docsubtype">
902
+ <element name="docsubtype">
903
+ <ref name="DocumentSubtype"/>
904
+ </element>
905
+ </define>
906
+ <define name="DocumentSubtype">
907
+ <text/>
908
+ </define>
893
909
  <define name="colgroup">
894
910
  <element name="colgroup">
895
911
  <oneOrMore>
@@ -1041,6 +1041,7 @@
1041
1041
 
1042
1042
 
1043
1043
 
1044
+
1044
1045
  <xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
1045
1046
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1046
1047
 
@@ -1108,6 +1109,7 @@
1108
1109
 
1109
1110
 
1110
1111
 
1112
+
1111
1113
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1112
1114
 
1113
1115
  <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
@@ -1132,9 +1134,7 @@
1132
1134
 
1133
1135
 
1134
1136
 
1135
-
1136
-
1137
-
1137
+
1138
1138
 
1139
1139
 
1140
1140
 
@@ -1178,6 +1178,7 @@
1178
1178
 
1179
1179
 
1180
1180
 
1181
+
1181
1182
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1182
1183
 
1183
1184
 
@@ -1193,6 +1194,7 @@
1193
1194
 
1194
1195
 
1195
1196
 
1197
+
1196
1198
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1197
1199
 
1198
1200
  <xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
@@ -1201,6 +1203,7 @@
1201
1203
 
1202
1204
 
1203
1205
 
1206
+
1204
1207
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1205
1208
 
1206
1209
 
@@ -1298,6 +1301,7 @@
1298
1301
 
1299
1302
 
1300
1303
 
1304
+
1301
1305
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1302
1306
 
1303
1307
  <xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
@@ -1305,6 +1309,7 @@
1305
1309
 
1306
1310
 
1307
1311
 
1312
+
1308
1313
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1309
1314
 
1310
1315
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1375,8 +1380,10 @@
1375
1380
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1376
1381
 
1377
1382
 
1383
+
1378
1384
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1379
1385
 
1386
+
1380
1387
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1381
1388
 
1382
1389
  <xsl:attribute name="space-after">6pt</xsl:attribute>
@@ -2120,6 +2127,7 @@
2120
2127
 
2121
2128
 
2122
2129
 
2130
+
2123
2131
  <xsl:if test="$lang = 'ar'">
2124
2132
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2125
2133
  </xsl:if>
@@ -2479,6 +2487,7 @@
2479
2487
 
2480
2488
 
2481
2489
 
2490
+
2482
2491
  <xsl:variable name="title-key">
2483
2492
 
2484
2493
 
@@ -2760,6 +2769,8 @@
2760
2769
 
2761
2770
  <xsl:apply-templates/>
2762
2771
  </fo:inline>
2772
+ </xsl:template><xsl:template match="*[local-name()='padding']">
2773
+ <fo:inline padding-right="{@value}"> </fo:inline>
2763
2774
  </xsl:template><xsl:template match="*[local-name()='sup']">
2764
2775
  <fo:inline font-size="80%" vertical-align="super">
2765
2776
  <xsl:apply-templates/>
@@ -3252,6 +3263,16 @@
3252
3263
  <mathml:mspace width="0.5ex"/>
3253
3264
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3254
3265
  <xsl:variable name="target">
3266
+ <xsl:choose>
3267
+ <xsl:when test="@updatetype = 'true'">
3268
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
3269
+ </xsl:when>
3270
+ <xsl:otherwise>
3271
+ <xsl:value-of select="normalize-space(@target)"/>
3272
+ </xsl:otherwise>
3273
+ </xsl:choose>
3274
+ </xsl:variable>
3275
+ <xsl:variable name="target_text">
3255
3276
  <xsl:choose>
3256
3277
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3257
3278
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -3264,19 +3285,19 @@
3264
3285
  <fo:inline xsl:use-attribute-sets="link-style">
3265
3286
 
3266
3287
  <xsl:choose>
3267
- <xsl:when test="$target = ''">
3288
+ <xsl:when test="$target_text = ''">
3268
3289
  <xsl:apply-templates/>
3269
3290
  </xsl:when>
3270
3291
  <xsl:otherwise>
3271
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3292
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
3272
3293
  <xsl:choose>
3273
3294
  <xsl:when test="normalize-space(.) = ''">
3274
- <!-- <xsl:value-of select="$target"/> -->
3275
3295
  <xsl:call-template name="add-zero-spaces-link-java">
3276
- <xsl:with-param name="text" select="$target"/>
3296
+ <xsl:with-param name="text" select="$target_text"/>
3277
3297
  </xsl:call-template>
3278
3298
  </xsl:when>
3279
3299
  <xsl:otherwise>
3300
+ <!-- output text from <link>text</link> -->
3280
3301
  <xsl:apply-templates/>
3281
3302
  </xsl:otherwise>
3282
3303
  </xsl:choose>
@@ -3854,6 +3875,7 @@
3854
3875
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3855
3876
 
3856
3877
  <fo:block-container margin-left="0mm">
3878
+ <xsl:copy-of select="@id"/>
3857
3879
  <xsl:if test="parent::*[local-name() = 'note']">
3858
3880
  <xsl:attribute name="margin-left">
3859
3881
  <xsl:choose>
@@ -4131,6 +4153,7 @@
4131
4153
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4132
4154
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4133
4155
 
4156
+
4134
4157
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4135
4158
 
4136
4159
  <xsl:variable name="element">
@@ -4240,12 +4263,13 @@
4240
4263
 
4241
4264
 
4242
4265
 
4266
+
4243
4267
  <xsl:call-template name="getTitle">
4244
4268
  <xsl:with-param name="name" select="'title-source'"/>
4245
4269
  </xsl:call-template>
4270
+ <xsl:text>: </xsl:text>
4246
4271
 
4247
4272
 
4248
- <xsl:text>: </xsl:text>
4249
4273
  </fo:inline>
4250
4274
 
4251
4275
  <fo:inline xsl:use-attribute-sets="origin-style">
@@ -4363,6 +4387,7 @@
4363
4387
 
4364
4388
 
4365
4389
 
4390
+
4366
4391
  </xsl:variable>
4367
4392
 
4368
4393
  <xsl:variable name="padding-right">
@@ -5033,6 +5058,9 @@
5033
5058
  <xsl:when test="parent::*[local-name() = 'preface']">
5034
5059
  <xsl:value-of select="$level_total - 1"/>
5035
5060
  </xsl:when>
5061
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
5062
+ <xsl:value-of select="$level_total - 1"/>
5063
+ </xsl:when>
5036
5064
  <xsl:when test="ancestor::*[local-name() = 'preface']">
5037
5065
  <xsl:value-of select="$level_total - 2"/>
5038
5066
  </xsl:when>
@@ -5173,7 +5201,14 @@
5173
5201
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5174
5202
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5175
5203
  </xsl:when>
5176
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
5204
+ <xsl:otherwise>
5205
+ <xsl:variable name="key_">
5206
+ <xsl:call-template name="capitalize">
5207
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
5208
+ </xsl:call-template>
5209
+ </xsl:variable>
5210
+ <xsl:value-of select="$key_"/>
5211
+ </xsl:otherwise>
5177
5212
  </xsl:choose>
5178
5213
 
5179
5214
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csa
3
- VERSION = "1.8.3".freeze
3
+ VERSION = "1.8.4".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.3
4
+ version: 1.8.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: 2021-05-24 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic