relaton-iso-bib 1.18.3 → 1.19.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: bfe688753cc33e16b6e0ee15d5b241239d5f754d4aa8e247eba4c4eb86094293
4
- data.tar.gz: 120e89a7d0eebbb154872c334522301c7c447264f590fa4107863a97164acfa1
3
+ metadata.gz: d11075e07bb8d16a20b5a1c9f980a858d8650f6cc249f34e92f33ad4ddd45e05
4
+ data.tar.gz: e74a8835551db834aa32e77eb64053f748f77b86537d9a9106d7781a24af0921
5
5
  SHA512:
6
- metadata.gz: cb6f4d7b4a6459fa7d0b641c479867bb2f88e02227512f096de8f263f478d392c8e660002af02c476bfc030b0fa3be57144067bb05ad701f62eb48bc79b4b919
7
- data.tar.gz: f9f439dd4e53452544e70efc494f09bbeb18904330b9578b05ac9b086153b4e9065942a9a245255cc8645814cd1ce85e0fdbc441cbdf9e278ae04a1242cd9f56
6
+ metadata.gz: 970553f2568402967d1cea211101d388eef52201d193ef292c0a5d5c356e2aa490d1ef3a0c065dc1dc1ffbccb5f619d10da8cd024dadf18064cc4b30ce6fcd11
7
+ data.tar.gz: c0383507f0765c6f57e34218bde7d20e840b9a6a4236344a1a9eefd2a47a882fc4891e03815787f928f72ed5753632d09ebd8147b247ed0043e750043100b168
data/README.adoc CHANGED
@@ -27,34 +27,23 @@ Or install it yourself as:
27
27
 
28
28
  == Usage
29
29
 
30
- === Configuration
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.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.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.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.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.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]:
@@ -24,7 +24,7 @@ module RelatonIsoBib
24
24
  #
25
25
  def check_doctype(type)
26
26
  unless DOCTYPES.include? type
27
- Util.warn "WARNING: invalid doctype: `#{type}`"
27
+ Util.warn "Invalid doctype: `#{type}`"
28
28
  Util.warn "Allowed doctypes are: `#{DOCTYPES.join('`, `')}`"
29
29
  end
30
30
  end
@@ -1,9 +1,6 @@
1
1
  module RelatonIsoBib
2
2
  module Util
3
3
  extend RelatonBib::Util
4
-
5
- def self.logger
6
- RelatonIsoBib.configuration.logger
7
- end
4
+ PROGNAME = "relaton-iso-bib".freeze
8
5
  end
9
6
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonIsoBib
2
- VERSION = "1.18.3".freeze
2
+ VERSION = "1.19.0".freeze
3
3
  end
@@ -2,7 +2,6 @@ require "nokogiri"
2
2
  require "isoics"
3
3
  require "relaton_bib"
4
4
  require "relaton_iso_bib/version"
5
- require "relaton_iso_bib/config"
6
5
  require "relaton_iso_bib/util"
7
6
  require "relaton_iso_bib/document_type"
8
7
  require "relaton_iso_bib/iso_bibliographic_item"
@@ -27,5 +27,5 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
28
28
 
29
29
  spec.add_dependency "isoics", "~> 0.1.6"
30
- spec.add_dependency "relaton-bib", "~> 1.18.4"
30
+ spec.add_dependency "relaton-bib", "~> 1.19.0"
31
31
  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.18.3
4
+ version: 1.19.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: 2024-05-20 00:00:00.000000000 Z
11
+ date: 2024-07-03 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.18.4
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.18.4
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
@@ -1,10 +0,0 @@
1
- module RelatonIsoBib
2
- module Config
3
- include RelatonBib::Config
4
- end
5
- extend Config
6
-
7
- class Configuration < RelatonBib::Configuration
8
- PROGNAME = "relaton-iso-bib".freeze
9
- end
10
- end