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 +4 -4
- data/lib/relaton_bib/bib_item_locality.rb +1 -1
- data/lib/relaton_bib/bibliographic_item.rb +1 -1
- data/lib/relaton_bib/contribution_info.rb +1 -1
- data/lib/relaton_bib/contributor.rb +4 -0
- data/lib/relaton_bib/document_relation.rb +1 -1
- data/lib/relaton_bib/hash_converter.rb +1 -1
- data/lib/relaton_bib/version.rb +1 -1
- data/lib/relaton_bib/xml_parser.rb +1 -2
- data/lib/relaton_bib.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6165095300e083fe287e6c6cd187f26f0449d0de89a32aade55d3dc5481c939f
|
4
|
+
data.tar.gz: fca1f9e076e2d6ed8267c86be8bc0b3fa2bae34a19feddfac306958a2d400016
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
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
|
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
|
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:
|
49
|
+
Util.warn "WARNING: invalid relation type: `#{type}`"
|
50
50
|
end
|
51
51
|
@type = type
|
52
52
|
@description = description
|
data/lib/relaton_bib/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|