relaton-iso-bib 1.16.0 → 1.16.1

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: 9178932b5f1aeda46f0f96953c3af24f9a0f972b2a814a944fac874b1750aa18
4
- data.tar.gz: bc4581d1396b7da73f085dbfb2dc24563a7f5ff3e9d304364a68950e856f3841
3
+ metadata.gz: 9f7d51e059f163a137cbd3bf2a21c7ebff8e56c3521126d2641374900b90b203
4
+ data.tar.gz: 8fb275454cc41ca26aa90198b916298bcd7683b10a5e386cda5add9035a3c9aa
5
5
  SHA512:
6
- metadata.gz: e2323ef8d43d2c64d4638f1c0ef7da3e7cce6cf9e0c660a4256c81062f60d26c293cc58165215f7472174936cd5fa3a746b5423183ad0ddeee8ebf40c5125ebd
7
- data.tar.gz: f5713dd3d4ec1e6b37e8623bec3ac3bd1b524f4bdf0a58cdcbde60f18303e6e05c05671c91daf69b0070413e8b7d60ea550d1375611e3da934fd4beb7ffc2252
6
+ metadata.gz: ac0d7d21d23201f5f2569d20ec0ff645642546c75a7f7faf5dec7aa4beb84af8f207997ca89d1124c62e3fe02db85692aafde76a16cab9546b7e0280532c3438
7
+ data.tar.gz: fe94a38bb8535645ffe2fc67ebbf5470003cad1374552b3150683e872806d603b76420c51977d5a7aa22a7e764dd93cc2c38d7dd183c6653674dd1423e72d642
@@ -0,0 +1,10 @@
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
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
- require "nokogiri"
4
- require "isoics"
5
- require "relaton_bib"
6
3
  require "relaton_iso_bib/editorial_group"
7
4
  require "relaton_iso_bib/xml_parser"
8
5
  require "relaton_iso_bib/structured_identifier"
@@ -151,7 +148,7 @@ module RelatonIsoBib
151
148
  end
152
149
 
153
150
  if args[:subdoctype] && !self.class::SUBDOCTYPES.include?(args[:subdoctype])
154
- warn "Invald subdoctype '#{args[:subdoctype]}'. Allowed values are: #{self.class::SUBDOCTYPES.join(', ')}"
151
+ Util.warn "Invald subdoctype `#{args[:subdoctype]}`. Allowed values are: #{self.class::SUBDOCTYPES.join(', ')}"
155
152
  end
156
153
  @subdoctype = args[:subdoctype]
157
154
  @structuredidentifier = args[:structuredidentifier]
@@ -231,8 +228,8 @@ module RelatonIsoBib
231
228
  # @raise ArgumentError
232
229
  def check_doctype(doctype)
233
230
  if doctype && !self.class::DOCTYPES.include?(doctype)
234
- warn "[relaton-iso-bib] WARNING: invalid doctype: #{doctype}"
235
- warn "[relaton-iso-bib] Allowed doctypes are: #{self.class::DOCTYPES.join(', ')}"
231
+ Util.warn "WARNING: invalid doctype: #{doctype}"
232
+ Util.warn "Allowed doctypes are: #{self.class::DOCTYPES.join(', ')}"
236
233
  end
237
234
  end
238
235
 
@@ -0,0 +1,9 @@
1
+ module RelatonIsoBib
2
+ module Util
3
+ extend RelatonBib::Util
4
+
5
+ def self.logger
6
+ RelatonIsoBib.configuration.logger
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module RelatonIsoBib
2
- VERSION = "1.16.0".freeze
2
+ VERSION = "1.16.1".freeze
3
3
  end
@@ -1,4 +1,9 @@
1
+ require "nokogiri"
2
+ require "isoics"
3
+ require "relaton_bib"
1
4
  require "relaton_iso_bib/version"
5
+ require "relaton_iso_bib/config"
6
+ require "relaton_iso_bib/util"
2
7
  require "relaton_iso_bib/iso_bibliographic_item"
3
8
  require "digest/md5"
4
9
 
@@ -8,9 +13,9 @@ module RelatonIsoBib
8
13
  # Returns hash of XML reammar
9
14
  # @return [String]
10
15
  def self.grammar_hash
11
- gem_path = File.expand_path "..", __dir__
12
- grammars_path = File.join gem_path, "grammars", "*"
13
- grammars = Dir[grammars_path].sort.map { |gp| File.read gp, encoding: "UTF-8" }.join
14
- Digest::MD5.hexdigest grammars
16
+ # gem_path = File.expand_path "..", __dir__
17
+ # grammars_path = File.join gem_path, "grammars", "*"
18
+ # grammars = Dir[grammars_path].sort.map { |gp| File.read gp, encoding: "UTF-8" }.join
19
+ Digest::MD5.hexdigest RelatonIsoBib::VERSION + RelatonBib::VERSION # grammars
15
20
  end
16
21
  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.16.0
4
+ version: 1.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-03 00:00:00.000000000 Z
11
+ date: 2023-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isoics
@@ -63,12 +63,14 @@ 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
66
67
  - lib/relaton_iso_bib/editorial_group.rb
67
68
  - lib/relaton_iso_bib/hash_converter.rb
68
69
  - lib/relaton_iso_bib/ics.rb
69
70
  - lib/relaton_iso_bib/iso_bibliographic_item.rb
70
71
  - lib/relaton_iso_bib/iso_document_relation.rb
71
72
  - lib/relaton_iso_bib/structured_identifier.rb
73
+ - lib/relaton_iso_bib/util.rb
72
74
  - lib/relaton_iso_bib/version.rb
73
75
  - lib/relaton_iso_bib/xml_parser.rb
74
76
  - relaton_iso_bib.gemspec
@@ -76,7 +78,7 @@ homepage: https://github.com/relaton/relaton-iso-bib
76
78
  licenses:
77
79
  - BSD-2-Clause
78
80
  metadata: {}
79
- post_install_message:
81
+ post_install_message:
80
82
  rdoc_options: []
81
83
  require_paths:
82
84
  - lib
@@ -91,8 +93,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
93
  - !ruby/object:Gem::Version
92
94
  version: '0'
93
95
  requirements: []
94
- rubygems_version: 3.4.9
95
- signing_key:
96
+ rubygems_version: 3.3.26
97
+ signing_key:
96
98
  specification_version: 4
97
99
  summary: 'RelatonIsoBib: Ruby ISOXMLDOC impementation.'
98
100
  test_files: []