relaton-iso-bib 1.4.0 → 1.7.0

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: e5643471617a1871a10b52251f403444b783fcc4c3ccea5bb002d101dd1193d8
4
- data.tar.gz: d8729ecaf1bee4908050c1ce8c220185c86bdcbecfd2e71a2580751394f4823e
3
+ metadata.gz: dcb10aff8412c86a24ebdc56ad3236dbb6539479d33c5ce5a974c0f331c6614f
4
+ data.tar.gz: 667381a5e8ab39c940dd06b5e671707e5b7fc20755ba98a2ce5b4558e230d436
5
5
  SHA512:
6
- metadata.gz: '088b4e7edb2ea24090e2bd53b751ee7a2505e7670b490ab45f9edabbf185f6eaa4208e8b1cfb59adc9065f8e979bf92a7df9ff63c3157f0387a4f1a12155bc8f'
7
- data.tar.gz: bdb6797ab989763eefaafb6d84b3c4d6f88fc93c3f0010aa044287fe23b2a5b6f867ae284c71e4c9913b164af5d1e25c46d1f3adb441a3f99af48318a68c7b01
6
+ metadata.gz: 472a1a8703fd5b9c0bfc464da7f1b1565c28986ad1ca76662ebe5ffe46f47aaca75d28f015a0be5a2e1d5c0e80af8146c666108a86bab62e8679c06e32d191be
7
+ data.tar.gz: 93fb843644985615a1e9c1fcf466eae8e799e437a039f71c3f381575171e97d2a480ef98da14c43c3b2891d9d8f581179f807fd92befc8bcfe2972b332bbfc78
@@ -26,6 +26,8 @@ jobs:
26
26
  - name: Update gems
27
27
  run: |
28
28
  sudo gem install bundler --force
29
+ ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
30
+ ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
29
31
  bundle install --jobs 4 --retry 3
30
32
  - name: Run specs
31
33
  run: |
@@ -24,6 +24,14 @@
24
24
  <start>
25
25
  <ref name="standard-document"/>
26
26
  </start>
27
+ <define name="doctype">
28
+ <element name="doctype">
29
+ <optional>
30
+ <attribute name="abbreviation"/>
31
+ </optional>
32
+ <ref name="DocumentType"/>
33
+ </element>
34
+ </define>
27
35
  <define name="hyperlink">
28
36
  <element name="link">
29
37
  <attribute name="target">
@@ -42,7 +50,6 @@
42
50
  </define>
43
51
  <define name="xref">
44
52
  <element name="xref">
45
- <!-- attribute target { xsd:IDREF }, -->
46
53
  <attribute name="target">
47
54
  <data type="string">
48
55
  <param name="pattern">\i\c*|\c+#\c+</param>
@@ -142,6 +149,11 @@
142
149
  <data type="boolean"/>
143
150
  </attribute>
144
151
  </optional>
152
+ <optional>
153
+ <attribute name="key">
154
+ <data type="boolean"/>
155
+ </attribute>
156
+ </optional>
145
157
  <oneOrMore>
146
158
  <ref name="dt"/>
147
159
  <ref name="dd"/>
@@ -864,6 +876,13 @@
864
876
  </define>
865
877
  <define name="standard-document">
866
878
  <element name="standard-document">
879
+ <attribute name="version"/>
880
+ <attribute name="type">
881
+ <choice>
882
+ <value>semantic</value>
883
+ <value>presentation</value>
884
+ </choice>
885
+ </attribute>
867
886
  <ref name="bibdata"/>
868
887
  <optional>
869
888
  <ref name="boilerplate"/>
@@ -1158,49 +1177,7 @@
1158
1177
  </define>
1159
1178
  <define name="annex">
1160
1179
  <element name="annex">
1161
- <optional>
1162
- <attribute name="id">
1163
- <data type="ID"/>
1164
- </attribute>
1165
- </optional>
1166
- <optional>
1167
- <attribute name="language"/>
1168
- </optional>
1169
- <optional>
1170
- <attribute name="script"/>
1171
- </optional>
1172
- <optional>
1173
- <attribute name="inline-header">
1174
- <data type="boolean"/>
1175
- </attribute>
1176
- </optional>
1177
- <attribute name="obligation">
1178
- <choice>
1179
- <value>normative</value>
1180
- <value>informative</value>
1181
- </choice>
1182
- </attribute>
1183
- <optional>
1184
- <ref name="section-title"/>
1185
- </optional>
1186
- <group>
1187
- <group>
1188
- <zeroOrMore>
1189
- <ref name="BasicBlock"/>
1190
- </zeroOrMore>
1191
- <zeroOrMore>
1192
- <ref name="note"/>
1193
- </zeroOrMore>
1194
- </group>
1195
- <zeroOrMore>
1196
- <choice>
1197
- <ref name="annex-subsection"/>
1198
- <ref name="terms"/>
1199
- <ref name="definitions"/>
1200
- <ref name="references"/>
1201
- </choice>
1202
- </zeroOrMore>
1203
- </group>
1180
+ <ref name="Annex-Section"/>
1204
1181
  </element>
1205
1182
  </define>
1206
1183
  <define name="terms">
@@ -405,6 +405,13 @@
405
405
  -->
406
406
  <define name="iso-standard">
407
407
  <element name="iso-standard">
408
+ <attribute name="version"/>
409
+ <attribute name="type">
410
+ <choice>
411
+ <value>semantic</value>
412
+ <value>presentation</value>
413
+ </choice>
414
+ </attribute>
408
415
  <ref name="bibdata"/>
409
416
  <zeroOrMore>
410
417
  <ref name="termdocsource"/>
@@ -126,24 +126,15 @@ module RelatonIsoBib
126
126
  check_doctype args[:doctype]
127
127
 
128
128
  super_args = args.select do |k|
129
- %i[id docnumber language script docstatus date abstract contributor
130
- edition version relation biblionote series medium place copyright
131
- link fetched docid formattedref extent accesslocation classification
132
- validity doctype keyword].include? k
129
+ %i[id title docnumber language script docstatus date abstract
130
+ contributor edition version relation biblionote series medium place
131
+ copyright link fetched docid formattedref extent accesslocation
132
+ classification validity doctype keyword].include? k
133
133
  end
134
134
  super super_args
135
135
 
136
136
  @type = args[:type] || "standard"
137
137
 
138
- @title = args.fetch(:title, []).map do |t|
139
- if t.is_a? Hash
140
- # a + typed_titles(t)
141
- RelatonBib::TypedTitleString.new t
142
- else
143
- t
144
- end
145
- end
146
-
147
138
  if args[:editorialgroup]
148
139
  @editorialgroup = if args[:editorialgroup].is_a?(Hash)
149
140
  EditorialGroup.new(args[:editorialgroup])
@@ -158,9 +149,13 @@ module RelatonIsoBib
158
149
  @id_attribute = true
159
150
  end
160
151
 
161
- # @return [String]
162
- def to_xml(builder = nil, **opts)
163
- super builder, **opts do |b|
152
+ # @param opts [Hash]
153
+ # @option opts [Nokogiri::XML::Builder] :builder XML builder
154
+ # @option opts [Boolean] :bibdata
155
+ # @option opts [String] :lang language
156
+ # @return [String] XML
157
+ def to_xml(**opts)
158
+ super **opts do |b|
164
159
  if opts[:bibdata] && (doctype || respond_to?(:committee) && committee ||
165
160
  editorialgroup || ics.any? || structuredidentifier || stagename ||
166
161
  block_given?)
@@ -1,3 +1,3 @@
1
1
  module RelatonIsoBib
2
- VERSION = "1.4.0".freeze
2
+ VERSION = "1.7.0".freeze
3
3
  end
@@ -41,22 +41,10 @@ module RelatonIsoBib
41
41
  )
42
42
  end
43
43
 
44
- # Override RelatonBib::XMLParser.ttitle method.
45
- # @param title [Nokogiri::XML::Element]
46
- # @return [RelatonBib::TypedTitleString]
47
- def ttitle(title)
48
- return unless title
49
-
50
- RelatonBib::TypedTitleString.new(
51
- type: title[:type], content: title.text, language: title[:language],
52
- script: title[:script], format: title[:format]
53
- )
54
- end
55
-
56
44
  # @TODO Organization doesn't recreated
57
45
  # @param ext [Nokogiri::XML::Element]
58
46
  # @return [RelatonIsoBib::EditorialGroup]
59
- def fetch_editorialgroup(ext) # rubocop:disable Metrics/CyclomaticComplexity
47
+ def fetch_editorialgroup(ext) # rubocop:disable Metrics/CyclomaticComplexity,Metrics/AbcSize,Metrics/PerceivedComplexity
60
48
  eg = ext&.at("./editorialgroup")
61
49
  return unless eg
62
50
 
@@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "simplecov"
37
37
 
38
38
  spec.add_dependency "isoics", "~> 0.1.6"
39
- spec.add_dependency "relaton-bib", "~> 1.4.0"
39
+ spec.add_dependency "relaton-bib", "~> 1.7.0"
40
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iso-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-18 00:00:00.000000000 Z
11
+ date: 2020-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.4.0
145
+ version: 1.7.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.4.0
152
+ version: 1.7.0
153
153
  description: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
154
154
  email:
155
155
  - open.source@ribose.com