relaton-iso-bib 1.18.3 → 1.19.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +10 -17
- data/lib/relaton_iso_bib/document_type.rb +2 -2
- data/lib/relaton_iso_bib/util.rb +1 -4
- data/lib/relaton_iso_bib/version.rb +1 -1
- data/lib/relaton_iso_bib.rb +0 -1
- data/relaton_iso_bib.gemspec +1 -1
- metadata +4 -5
- data/lib/relaton_iso_bib/config.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3f14f5b8cc3dbe724c93588ad9eada6d4e41c1c0824dc64894d0a2945b7367d
|
4
|
+
data.tar.gz: 9de276830894f49558ff8143286f85db9db98ed8ca4df89802c910110da51245
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c20d5936a5a5cb9a85224b7061928b3bdaf0dceea36b355766f51fbd4662f283f5c5784ed717a7e4ebe9648572b28cb68bbed5c98d7323eea7bf3a3fb2d27b5
|
7
|
+
data.tar.gz: 4820479fa71ddd05f01e6d7dd426aae3c4b7054d608699f31985641058573af5ce6e119c5ca289dec670081f1877085e5f159136707c5c2f5a80298dc5f97482
|
data/README.adoc
CHANGED
@@ -27,34 +27,23 @@ Or install it yourself as:
|
|
27
27
|
|
28
28
|
== Usage
|
29
29
|
|
30
|
-
===
|
31
|
-
|
32
|
-
Configuration is optional. The available option is `logger` which is a `Logger` instance. By default, the logger is `Logger.new($stderr)` with `Logger::WARN` level. To change the logger level, use `RelatonIsoBib.configure` block.
|
30
|
+
=== Create ISO bibliographic item
|
33
31
|
|
34
32
|
[source,ruby]
|
35
33
|
----
|
36
34
|
require 'relaton_iso_bib'
|
37
35
|
=> true
|
38
36
|
|
39
|
-
RelatonIsoBib.configure do |config|
|
40
|
-
config.logger.level = Logger::DEBUG
|
41
|
-
end
|
42
|
-
----
|
43
|
-
|
44
|
-
=== Create ISO bibliographic item
|
45
|
-
|
46
|
-
[source,ruby]
|
47
|
-
----
|
48
37
|
hash = YAML.load_file "spec/examples/iso_bib_item.yml"
|
49
38
|
=> {
|
50
|
-
"schema-version"=>"v1.0.
|
39
|
+
"schema-version"=>"v1.0.3",
|
51
40
|
"id"=>"ISO/TC211",
|
52
41
|
"title"=>[
|
53
42
|
{"type"=>"title-intro", "content"=>"Geographic information", "language"=>"en", "script"=>"Latn", "format"=>"text/plain"},
|
54
43
|
...
|
55
44
|
|
56
45
|
bib_hash = RelatonIsoBib::HashConverter.hash_to_bib hash
|
57
|
-
=> {:"schema-version"=>"v1.0.
|
46
|
+
=> {:"schema-version"=>"v1.0.3",
|
58
47
|
:id=>"ISO/TC211",
|
59
48
|
:fetched=>"2011-06-22",
|
60
49
|
:title=>
|
@@ -373,7 +362,7 @@ item.to_xml(bibdata: true)
|
|
373
362
|
<title type="title-part" format="text/plain" language="fr" script="Latn">Information géographique</title>
|
374
363
|
<title type="main" format="text/plain" language="fr" script="Latn">Information géographique – Métadonnées – Information géographique</title>
|
375
364
|
...
|
376
|
-
<ext schema-version="v1.0.
|
365
|
+
<ext schema-version="v1.0.3">
|
377
366
|
<doctype>international-standard</doctype>
|
378
367
|
...
|
379
368
|
</ext>
|
@@ -438,12 +427,12 @@ title.format:: text/plain
|
|
438
427
|
[source,ruby]
|
439
428
|
----
|
440
429
|
hash = YAML.load_file 'spec/examples/iso_bib_item.yml'
|
441
|
-
=> {"schema-version"=>"v1.0.
|
430
|
+
=> {"schema-version"=>"v1.0.3",
|
442
431
|
"id"=>"ISO/TC211",
|
443
432
|
...
|
444
433
|
|
445
434
|
bib_hash = RelatonIsoBib::HashConverter.hash_to_bib hash
|
446
|
-
=> {:"schema-version"=>"v1.0.
|
435
|
+
=> {:"schema-version"=>"v1.0.3",
|
447
436
|
:id=>"ISO/TC211",
|
448
437
|
...
|
449
438
|
|
@@ -452,6 +441,10 @@ RelatonIsoBib::IsoBibliographicItem.new **bib_hash
|
|
452
441
|
...
|
453
442
|
----
|
454
443
|
|
444
|
+
=== Logging
|
445
|
+
|
446
|
+
RelatonIsoBib uses the relaton-logger gem for logging. By default, it logs to STDOUT. To change the log levels and add other loggers, read the https://github.com/relaton/relaton-logger#usage[relaton-logger] documentation.
|
447
|
+
|
455
448
|
== BibliographicItem
|
456
449
|
|
457
450
|
The ISO standards use a subset of the generic bibliographic fields specified in the https://github.com/metanorma/metanorma-model-iso#iso-bibliographic-item[IsoBibliographicItem model]:
|
@@ -3,7 +3,7 @@ module RelatonIsoBib
|
|
3
3
|
DOCTYPES = %w[
|
4
4
|
international-standard technical-specification technical-report
|
5
5
|
publicly-available-specification international-workshop-agreement guide
|
6
|
-
recommendation amendment technical-corrigendum directive committee-document
|
6
|
+
recommendation amendment technical-corrigendum directive committee-document addendum
|
7
7
|
].freeze
|
8
8
|
|
9
9
|
#
|
@@ -24,7 +24,7 @@ module RelatonIsoBib
|
|
24
24
|
#
|
25
25
|
def check_doctype(type)
|
26
26
|
unless DOCTYPES.include? type
|
27
|
-
Util.warn "
|
27
|
+
Util.warn "Invalid doctype: `#{type}`"
|
28
28
|
Util.warn "Allowed doctypes are: `#{DOCTYPES.join('`, `')}`"
|
29
29
|
end
|
30
30
|
end
|
data/lib/relaton_iso_bib/util.rb
CHANGED
data/lib/relaton_iso_bib.rb
CHANGED
data/relaton_iso_bib.gemspec
CHANGED
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
|
+
version: 1.19.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: isoics
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.19.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.19.0
|
41
41
|
description: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
|
42
42
|
email:
|
43
43
|
- open.source@ribose.com
|
@@ -63,7 +63,6 @@ files:
|
|
63
63
|
- grammars/relaton-iso-compile.rng
|
64
64
|
- grammars/relaton-iso.rng
|
65
65
|
- lib/relaton_iso_bib.rb
|
66
|
-
- lib/relaton_iso_bib/config.rb
|
67
66
|
- lib/relaton_iso_bib/document_type.rb
|
68
67
|
- lib/relaton_iso_bib/editorial_group.rb
|
69
68
|
- lib/relaton_iso_bib/hash_converter.rb
|