relaton-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: dd317444aa9a19d7743cd045d0bc0e99257d2f8c99bc4bea4faa845a39598650
4
- data.tar.gz: 665098b0cd7c798d67b46dc783f6e1706f9feb5c20c4ad558f84037a2f258c31
3
+ metadata.gz: 6165095300e083fe287e6c6cd187f26f0449d0de89a32aade55d3dc5481c939f
4
+ data.tar.gz: fca1f9e076e2d6ed8267c86be8bc0b3fa2bae34a19feddfac306958a2d400016
5
5
  SHA512:
6
- metadata.gz: 6a8f39d133e1f1ca938f72ba75b7bf9aa3e38c156b162fab52f802672d6b1319c1def15442f60a6f8eb8d2ea91ca158dc1fddc68e40e251082ef08117b1c677f
7
- data.tar.gz: 5c5142f5a69e1000cad1ce7cbbb361de011518aa2f1af2f4b63b57471a1cec0ba205089e7c9f4182243ab0d47cbc370c7abb3d5807acc22c42ca636129be30f1
6
+ metadata.gz: 1bf3f71377b6ee41cc12ee9bf80be44c0ab81d10f237535c17372f1ebdd5a17f7f6685ceda9dc684764c85663015be88ecb7a5060680b3a4a7e8af1c8c65ddaf
7
+ data.tar.gz: e2fbf83739f64942dc259573446f9925e613a29c822b3158db261d69d5fb9aa42e1468104368a2668cc535b9ee5a3e9b65ce9cdfa1e0b444d03f8d78a95ad079
@@ -18,7 +18,7 @@ module RelatonBib
18
18
  whole|table|annex|figure|note|list|example|volume|issue|time|anchor|
19
19
  locality:[a-zA-Z0-9_]+}x
20
20
  unless type&.match? type_ptrn
21
- Util.warn "WARNING: invalid locality type: #{type}"
21
+ Util.warn "WARNING: invalid locality type: `#{type}`"
22
22
  end
23
23
 
24
24
  @type = type
@@ -204,7 +204,7 @@ module RelatonBib
204
204
  # @option link [String] :content
205
205
  def initialize(**args)
206
206
  if args[:type] && !TYPES.include?(args[:type])
207
- Util.warn %{WARNING: type "#{args[:type]}" is invalid.}
207
+ Util.warn %{WARNING: type `#{args[:type]}` is invalid.}
208
208
  end
209
209
 
210
210
  @title = if args[:title].is_a?(TypedTitleStringCollection)
@@ -22,7 +22,7 @@ module RelatonBib
22
22
  # @param description [Array<String>]
23
23
  def initialize(**args)
24
24
  if args[:type] && !TYPES.include?(args[:type])
25
- Util.warn %{Contributor's type "#{args[:type]}" is invalid.}
25
+ Util.warn %{Contributor's type `#{args[:type]}` is invalid.}
26
26
  end
27
27
 
28
28
  @type = args[:type]
@@ -133,6 +133,10 @@ module RelatonBib
133
133
  # @param name [RelatonBib::LocalizedString, nil]
134
134
  # @param description [Array<RelatonBib::FormattedString>]
135
135
  def initialize(organization:, name: nil, description: [])
136
+ unless organization.is_a? RelatonBib::Organization
137
+ raise ArgumentError, "organization should be an instance of RelatonBib::Organization"
138
+ end
139
+
136
140
  @name = name
137
141
  @organization = organization
138
142
  @description = description
@@ -46,7 +46,7 @@ module RelatonBib
46
46
  source_locality: [])
47
47
  type = "obsoletes" if type == "Now withdrawn"
48
48
  unless self.class::TYPES.include? type
49
- Util.warn "WARNING: invalid relation type: #{type}"
49
+ Util.warn "WARNING: invalid relation type: `#{type}`"
50
50
  end
51
51
  @type = type
52
52
  @description = description
@@ -348,7 +348,7 @@ module RelatonBib
348
348
  if rel[:bibitem]
349
349
  rel[:bibitem] = bib_item hash_to_bib(rel[:bibitem])
350
350
  else
351
- Util.warn "bibitem missing: #{rel}"
351
+ Util.warn "bibitem missing: `#{rel}`"
352
352
  rel[:bibitem] = nil
353
353
  end
354
354
  end
@@ -1,3 +1,3 @@
1
1
  module RelatonBib
2
- VERSION = "1.16.0".freeze
2
+ VERSION = "1.16.1".freeze
3
3
  end
@@ -17,8 +17,7 @@ module RelatonBib
17
17
  if bibitem
18
18
  bib_item item_data(bibitem)
19
19
  else
20
- Util.warn "WARNING: can't find bibitem or bibdata element " \
21
- "in the XML"
20
+ Util.warn "WARNING: can't find bibitem or bibdata element in the XML"
22
21
  nil
23
22
  end
24
23
  end
data/lib/relaton_bib.rb CHANGED
@@ -86,10 +86,10 @@ module RelatonBib
86
86
  end
87
87
 
88
88
  def self.grammar_hash
89
- gem_path = File.expand_path "..", __dir__
90
- grammars_path = File.join gem_path, "grammars", "*"
91
- grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
92
- Digest::MD5.hexdigest grammars
89
+ # gem_path = File.expand_path "..", __dir__
90
+ # grammars_path = File.join gem_path, "grammars", "*"
91
+ # grammars = Dir[grammars_path].sort.map { |gp| File.read gp }.join
92
+ Digest::MD5.hexdigest RelatonBib::VERSION # grammars
93
93
  end
94
94
 
95
95
  private
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: 1.16.0
4
+ version: 1.16.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: 2023-09-02 00:00:00.000000000 Z
11
+ date: 2023-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable