metanorma-generic 1.11.1 → 1.11.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 +4 -4
- data/lib/asciidoctor/generic/isodoc.rng +14 -0
- data/lib/isodoc/generic/html/scripts.html +0 -1
- data/lib/metanorma/generic/version.rb +1 -1
- data/lib/metanorma/generic.rb +9 -21
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97de85e9d88318cf3718865280ca5e855bce23377442c9316d0dc9923227e63e
|
4
|
+
data.tar.gz: a46b6d97a7be1e38c57092d8789451d5a7851f2f0e617ab88dfe3ec16e6615ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e80f83a0195978fe797dede990db71f346540d7e11b5ee4b5f54bda2d2790127aaa7e665b77d906048334d9195bd4cb7b698259c64b331c0af0d0f55f5c7f74
|
7
|
+
data.tar.gz: 4cd866cb0d250759e77d89ef7b91a3ceb380e79f6e04e9ef74d0d0b76c94cfb15f09ad206b2a184540ade1fee7cc10163898389eb17caddc5f120321329f4316
|
@@ -1796,6 +1796,20 @@
|
|
1796
1796
|
<data type="ID"/>
|
1797
1797
|
</attribute>
|
1798
1798
|
</optional>
|
1799
|
+
<optional>
|
1800
|
+
<attribute name="language"/>
|
1801
|
+
</optional>
|
1802
|
+
<optional>
|
1803
|
+
<attribute name="script"/>
|
1804
|
+
</optional>
|
1805
|
+
<optional>
|
1806
|
+
<attribute name="tag"/>
|
1807
|
+
</optional>
|
1808
|
+
<optional>
|
1809
|
+
<attribute name="multilingual-rendering">
|
1810
|
+
<ref name="MultilingualRenderingType"/>
|
1811
|
+
</attribute>
|
1812
|
+
</optional>
|
1799
1813
|
<oneOrMore>
|
1800
1814
|
<ref name="preferred"/>
|
1801
1815
|
</oneOrMore>
|
data/lib/metanorma/generic.rb
CHANGED
@@ -4,7 +4,7 @@ require "forwardable"
|
|
4
4
|
require "yaml"
|
5
5
|
|
6
6
|
module Metanorma
|
7
|
-
module Generic
|
7
|
+
module Generic # rubocop:disable Style/MutableConstant
|
8
8
|
ORGANIZATION_NAME_SHORT = "Acme"
|
9
9
|
ORGANIZATION_NAME_LONG = "Acme Corp."
|
10
10
|
DOCUMENT_NAMESPACE = "https://www.metanorma.org/ns/generic"
|
@@ -63,23 +63,10 @@ module Metanorma
|
|
63
63
|
].freeze
|
64
64
|
|
65
65
|
def filepath_attrs
|
66
|
-
%i[
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
logo_paths
|
71
|
-
header
|
72
|
-
htmlcoverpage
|
73
|
-
htmlintropage
|
74
|
-
htmlstylesheet
|
75
|
-
scripts
|
76
|
-
scripts_pdf
|
77
|
-
standardstylesheet
|
78
|
-
validate_rng_file
|
79
|
-
wordcoverpage
|
80
|
-
wordintropage
|
81
|
-
wordstylesheet
|
82
|
-
]
|
66
|
+
%i[i18nyaml boilerplate logo_path logo_paths header
|
67
|
+
htmlcoverpage htmlintropage htmlstylesheet scripts scripts_pdf
|
68
|
+
standardstylesheet validate_rng_file wordcoverpage wordintropage
|
69
|
+
wordstylesheet]
|
83
70
|
end
|
84
71
|
|
85
72
|
attr_accessor(*CONFIG_ATTRS)
|
@@ -88,7 +75,7 @@ module Metanorma
|
|
88
75
|
attr_accessor :_file
|
89
76
|
end
|
90
77
|
|
91
|
-
def self.inherited(klass)
|
78
|
+
def self.inherited(klass) # rubocop:disable Lint/MissingSuper
|
92
79
|
klass._file = caller_locations(1..1).first.absolute_path
|
93
80
|
end
|
94
81
|
|
@@ -115,7 +102,8 @@ module Metanorma
|
|
115
102
|
|
116
103
|
def set_default_values_from_yaml_file(config_file)
|
117
104
|
root_path = File.dirname(self.class::_file || __FILE__)
|
118
|
-
default_config_options =
|
105
|
+
default_config_options =
|
106
|
+
YAML.safe_load(File.read(config_file, encoding: "UTF-8"))
|
119
107
|
if default_config_options["doctypes"].is_a? Array
|
120
108
|
default_config_options["doctypes"] =
|
121
109
|
default_config_options["doctypes"].each_with_object({}) do |k, m|
|
@@ -133,7 +121,7 @@ module Metanorma
|
|
133
121
|
end
|
134
122
|
|
135
123
|
def blank?(val)
|
136
|
-
val.nil? || val.respond_to?(:empty?) && val.empty?
|
124
|
+
val.nil? || (val.respond_to?(:empty?) && val.empty?)
|
137
125
|
end
|
138
126
|
|
139
127
|
def absolute_path(value, root_path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-generic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.11.
|
4
|
+
version: 1.11.2
|
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-
|
11
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
- !ruby/object:Gem::Version
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
|
-
rubygems_version: 3.2.
|
270
|
+
rubygems_version: 3.2.32
|
271
271
|
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: Metanorma template gem for customisation.
|