relaton-bib 0.3.9 → 0.3.10

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
- SHA1:
3
- metadata.gz: c135f7e0e77b7cfa7c31ae9743e0c6bf716a27e0
4
- data.tar.gz: 4998ac95553d5ab1e6248b48e7c41e36179c49c3
2
+ SHA256:
3
+ metadata.gz: 9b42eafbf9448563a45ab378935e70a2d2a775c321e0b225faa8b4647e39f9c9
4
+ data.tar.gz: bc8e4bddc6696599920216173948bf4d4bda5cbde3021e09fbb39d3d2b4a4bd4
5
5
  SHA512:
6
- metadata.gz: 290f43263f27e6a5f66e091d89bb95e296470311994525359dfd7f8dc63c11e329b404a6a56f8f834666e78f7a6aea6d7b5c05e3b4563f225454cad119ec7f33
7
- data.tar.gz: 40f1bb2b469029b5cfa334207bd1d230deb49b4eae361dec3ef221f2efe3714e91e22c1d0706c8f6e43f14343907b9b6d08be6e75959b2c10d483234d182cf11
6
+ metadata.gz: d7e53538c03400077f1eb59881bcb611e82fad5db204014ae33bd3716ae2145d67f2f0fb33097ab04b87c10f8ad69b49bc2b56f1d1be16eaf77465630a3a402f
7
+ data.tar.gz: 27eea52dec92f202436ad56b9af1185876e2f33eb95ffbfba18d3c331ce5bd2dfe335c7535b32f7ae883a17693341deab2ec9b0056213bb74f62eb112238982a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton-bib (0.3.9)
4
+ relaton-bib (0.3.10)
5
5
  addressable
6
6
  nokogiri
7
7
 
@@ -273,7 +273,7 @@ for the entry, the subclause title should be left as `{blank}`.
273
273
 
274
274
  So the following is a very simple reference in Metanorma Asciidoctor:
275
275
 
276
- [source,asciidoctor]
276
+ [source,asciidoc]
277
277
  ----
278
278
  [%bibitem]
279
279
  === Rubber latex -- Sampling
@@ -291,7 +291,7 @@ The anchor crossreference for the bibliographic entry may be encoded as the
291
291
  `id` entry in the definition list, or as the normal Asciidoctor anchor on the
292
292
  subclause, which takes priority over it:
293
293
 
294
- [source,asciidoctor]
294
+ [source,asciidoc]
295
295
  ----
296
296
  [[iso123]]
297
297
  [%bibitem]
@@ -306,7 +306,7 @@ Asciidoctor does not currently cope with definition lists more than four levels
306
306
  deep. If deeper nesting is needed, you will need to attach a new definition
307
307
  list with a list continuation:
308
308
 
309
- [source,asciidoctor]
309
+ [source,asciidoc]
310
310
  ----
311
311
  [[iso123]]
312
312
  [%bibitem]
@@ -555,7 +555,7 @@ The foregoing structure requires frequent breakouts into open blocks, to deal
555
555
  with the limitation on Asciidoctor nested definition lists. An alternative is to
556
556
  represent the nested structure of Relaton records in a simple, one-level definition list, and to use the key for each key-value pair to represent the hierarchical nesting of entries, as a dot-delimited path of keys. For example,
557
557
 
558
- [source,asciidoctor]
558
+ [source,asciidoc]
559
559
  ----
560
560
  [%bibitem]
561
561
  === Rubber latex -- Sampling
@@ -567,7 +567,7 @@ docid::
567
567
 
568
568
  can instead be represented as:
569
569
 
570
- [source,asciidoctor]
570
+ [source,asciidoc]
571
571
  ----
572
572
  [%bibitem]
573
573
  === Rubber latex -- Sampling
@@ -578,7 +578,7 @@ docid.id::: ISO 123
578
578
 
579
579
  Whenever part of the key is repeated between entries, the entries are assumed to attach to the same parent. If an array of hashes is needed, a blank entry is required for the key of each repeating element: For example,
580
580
 
581
- [source,asciidoctor]
581
+ [source,asciidoc]
582
582
  ----
583
583
  [%bibitem]
584
584
  === Rubber latex -- Sampling
@@ -594,7 +594,7 @@ type:: standard
594
594
 
595
595
  can instead be represented as:
596
596
 
597
- [source,asciidoctor]
597
+ [source,asciidoc]
598
598
  ----
599
599
  [%bibitem]
600
600
  === Rubber latex -- Sampling
@@ -609,7 +609,7 @@ docid.id:: 32784
609
609
 
610
610
  Embedded elements can also repeat:
611
611
 
612
- [source,asciidoctor]
612
+ [source,asciidoc]
613
613
  ----
614
614
  [%bibitem]
615
615
  ...
@@ -629,7 +629,7 @@ person::
629
629
 
630
630
  can instead be represented as:
631
631
 
632
- [source,asciidoctor]
632
+ [source,asciidoc]
633
633
  ----
634
634
  [%bibitem]
635
635
  ...
@@ -284,6 +284,7 @@ module RelatonBib
284
284
  hash["contributor"] = single_element_array(contributor) if contributor&.any?
285
285
  hash["edition"] = edition if edition
286
286
  hash["version"] = version.to_hash if version
287
+ hash["revdate"] = revdate
287
288
  hash["biblionote"] = single_element_array(biblionote) if biblionote&.any?
288
289
  hash["language"] = single_element_array(language) if language&.any?
289
290
  hash["script"] = single_element_array(script) if script&.any?
@@ -305,6 +306,16 @@ module RelatonBib
305
306
 
306
307
  private
307
308
 
309
+ # If revision_date exists then returns it else returns published date or nil
310
+ # @return [String, NilClass]
311
+ def revdate
312
+ if version&.revision_date
313
+ version.revision_date
314
+ else
315
+ date.detect { |d| d.type == "published" }&.on&.to_s
316
+ end
317
+ end
318
+
308
319
  # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
309
320
  # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
310
321
  # rubocop:disable Style/NestedParenthesizedCalls, Metrics/BlockLength
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "0.3.9".freeze
2
+ VERSION = "0.3.10".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-bib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
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-10-12 00:00:00.000000000 Z
11
+ date: 2019-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -222,8 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  - !ruby/object:Gem::Version
223
223
  version: '0'
224
224
  requirements: []
225
- rubyforge_project:
226
- rubygems_version: 2.6.12
225
+ rubygems_version: 3.0.6
227
226
  signing_key:
228
227
  specification_version: 4
229
228
  summary: 'RelatonBib: Ruby XMLDOC impementation.'