relaton-bib 1.14.2 → 1.14.3
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/biblio_note.rb +5 -5
- data/lib/relaton_bib/bibliographic_item.rb +1 -1
- data/lib/relaton_bib/bibtex_parser.rb +2 -2
- data/lib/relaton_bib/classification.rb +2 -2
- data/lib/relaton_bib/contributor.rb +3 -3
- data/lib/relaton_bib/document_relation.rb +3 -3
- data/lib/relaton_bib/formatted_string.rb +2 -2
- data/lib/relaton_bib/localized_string.rb +2 -1
- data/lib/relaton_bib/person.rb +1 -1
- data/lib/relaton_bib/structured_identifier.rb +1 -1
- data/lib/relaton_bib/validity.rb +6 -6
- data/lib/relaton_bib/version.rb +1 -1
- data/lib/relaton_bib/xml_parser.rb +2 -2
- data/lib/relaton_bib.rb +1 -1
- 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: d2e95577c2faca4138cb7c099afafcc635f16284da3e146d45b32e3b8ad709a4
|
4
|
+
data.tar.gz: aa23275f02e5972cd67fa71804448fefda53c70d9ec8545eca3775974292e8d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5733045f85f88d7b2339ead874e362d37dea6628a6263bb5a9339359fce67fe334b42612c4ad3346844dbfe80e0b043cafded930c3113e8bd7a6d2ce012a6d0b
|
7
|
+
data.tar.gz: f89db90f0bfb097670d2d1f6342359c40a7a94cb5bb1dba0532ad52c50441b96e2fc9163ad0fee7afddee51db9be67b542fc88f1d262dad9b9be6337e410d5cd
|
@@ -27,14 +27,14 @@ module RelatonBib
|
|
27
27
|
end
|
28
28
|
|
29
29
|
class BiblioNote < FormattedString
|
30
|
-
# @return [String,
|
30
|
+
# @return [String, nil]
|
31
31
|
attr_reader :type
|
32
32
|
|
33
33
|
# @param content [String]
|
34
|
-
# @param type [String,
|
35
|
-
# @param language [String,
|
36
|
-
# @param script [String,
|
37
|
-
# @param format [String,
|
34
|
+
# @param type [String, nil]
|
35
|
+
# @param language [String, nil] language code Iso639
|
36
|
+
# @param script [String, nil] script code Iso15924
|
37
|
+
# @param format [String, nil] the content format
|
38
38
|
def initialize(content:, type: nil, language: nil, script: nil, format: nil)
|
39
39
|
@type = type
|
40
40
|
super content: content, language: language, script: script, format: format
|
@@ -149,7 +149,7 @@ module RelatonBib
|
|
149
149
|
# @param version [Array<RelatonBib::BibliographicItem::Version>]
|
150
150
|
# @param biblionote [RelatonBib::BiblioNoteCollection]
|
151
151
|
# @param series [Array<RelatonBib::Series>]
|
152
|
-
# @param medium [RelatonBib::Medium,
|
152
|
+
# @param medium [RelatonBib::Medium, nil]
|
153
153
|
# @param place [Array<String, RelatonBib::Place>]
|
154
154
|
# @param extent [Array<Relaton::Locality, RelatonBib::LocalityStack>]
|
155
155
|
# @param accesslocation [Array<String>]
|
@@ -44,7 +44,7 @@ module RelatonBib
|
|
44
44
|
end
|
45
45
|
|
46
46
|
# @param bibtex [BibTeX::Entry]
|
47
|
-
# @return [String,
|
47
|
+
# @return [String, nil]
|
48
48
|
def fetch_fetched(bibtex)
|
49
49
|
Date.parse(bibtex.timestamp.to_s) if bibtex["timestamp"]
|
50
50
|
end
|
@@ -225,7 +225,7 @@ module RelatonBib
|
|
225
225
|
end
|
226
226
|
|
227
227
|
# @param bibtex [BibTeX::Entry]
|
228
|
-
# @return [RelatonBib::Classification,
|
228
|
+
# @return [RelatonBib::Classification, nil]
|
229
229
|
def fetch_classification(bibtex)
|
230
230
|
cls = []
|
231
231
|
cls << Classification.new(type: "type", value: bibtex["type"].to_s) if bibtex["type"]
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module RelatonBib
|
2
2
|
class Classification
|
3
|
-
# @return [String,
|
3
|
+
# @return [String, nil]
|
4
4
|
attr_reader :type
|
5
5
|
|
6
6
|
# @return [String]
|
7
7
|
attr_reader :value
|
8
8
|
|
9
|
-
# @param type [String,
|
9
|
+
# @param type [String, nil]
|
10
10
|
# @param value [String]
|
11
11
|
def initialize(type: nil, value:)
|
12
12
|
@type = type
|
@@ -120,7 +120,7 @@ module RelatonBib
|
|
120
120
|
class Affiliation
|
121
121
|
include RelatonBib
|
122
122
|
|
123
|
-
# @return [RelatonBib::LocalizedString,
|
123
|
+
# @return [RelatonBib::LocalizedString, nil]
|
124
124
|
attr_reader :name
|
125
125
|
|
126
126
|
# @return [Array<RelatonBib::FormattedString>]
|
@@ -130,7 +130,7 @@ module RelatonBib
|
|
130
130
|
attr_reader :organization
|
131
131
|
|
132
132
|
# @param organization [RelatonBib::Organization]
|
133
|
-
# @param name [RelatonBib::LocalizedString,
|
133
|
+
# @param name [RelatonBib::LocalizedString, nil]
|
134
134
|
# @param description [Array<RelatonBib::FormattedString>]
|
135
135
|
def initialize(organization:, name: nil, description: [])
|
136
136
|
@name = name
|
@@ -186,7 +186,7 @@ module RelatonBib
|
|
186
186
|
# @return [Array<RelatonBib::Address, RelatonBib::Contact>]
|
187
187
|
attr_reader :contact
|
188
188
|
|
189
|
-
# @param url [String,
|
189
|
+
# @param url [String, nil]
|
190
190
|
# @param contact [Array<RelatonBib::Address, RelatonBib::Contact>]
|
191
191
|
def initialize(url: nil, contact: [])
|
192
192
|
@uri = URI url if url
|
@@ -12,14 +12,14 @@ module RelatonBib
|
|
12
12
|
draftOf hasDraft editionOf hasEdition updates updatedBy derivedFrom
|
13
13
|
derives describes describedBy catalogues cataloguedBy hasSuccessor
|
14
14
|
successorOf adaptedFrom hasAdaptation adoptedFrom adoptedAs reviewOf
|
15
|
-
hasReview commentaryOf hasCommentary related
|
15
|
+
hasReview commentaryOf hasCommentary related hasComplement complementOf
|
16
16
|
obsoletes obsoletedBy cites isCitedIn
|
17
17
|
].freeze
|
18
18
|
|
19
19
|
# @return [String]
|
20
20
|
attr_accessor :type
|
21
21
|
|
22
|
-
# @return [RelatonBib::FormattedString,
|
22
|
+
# @return [RelatonBib::FormattedString, nil]
|
23
23
|
attr_reader :description
|
24
24
|
|
25
25
|
# @return [String]
|
@@ -36,7 +36,7 @@ module RelatonBib
|
|
36
36
|
attr_reader :source_locality
|
37
37
|
|
38
38
|
# @param type [String]
|
39
|
-
# @param description [RelatonBib::FormattedString,
|
39
|
+
# @param description [RelatonBib::FormattedString, nil]
|
40
40
|
# @param bibitem [RelatonBib::BibliographicItem,
|
41
41
|
# RelatonIso::IsoBibliographicItem]
|
42
42
|
# @param locality [Array<RelatonBib::Locality, RelatonBib::LocalityStack>]
|
@@ -13,8 +13,8 @@ module RelatonBib
|
|
13
13
|
attr_reader :format
|
14
14
|
|
15
15
|
# @param content [String, Array<RelatonBib::LocalizedString>]
|
16
|
-
# @param language [String,
|
17
|
-
# @param script [String,
|
16
|
+
# @param language [String, nil] language code Iso639
|
17
|
+
# @param script [String, nil] script code Iso15924
|
18
18
|
# @param format [String] the content type
|
19
19
|
def initialize(content:, language: nil, script: nil, format: "text/plain")
|
20
20
|
# if format && !FORMATS.include?(format)
|
data/lib/relaton_bib/person.rb
CHANGED
@@ -76,7 +76,7 @@ module RelatonBib
|
|
76
76
|
# @param affiliation [Array<RelatonBib::Affiliation>]
|
77
77
|
# @param contact [Array<RelatonBib::Address, RelatonBib::Contact>]
|
78
78
|
# @param identifier [Array<RelatonBib::PersonIdentifier>]
|
79
|
-
# @param url [String,
|
79
|
+
# @param url [String, nil]
|
80
80
|
def initialize(name:, affiliation: [], contact: [], identifier: [],
|
81
81
|
url: nil)
|
82
82
|
super(contact: contact, url: url)
|
data/lib/relaton_bib/validity.rb
CHANGED
@@ -2,18 +2,18 @@ module RelatonBib
|
|
2
2
|
class Validity
|
3
3
|
FORMAT = "%Y-%m-%d %H:%M".freeze
|
4
4
|
|
5
|
-
# @return [Time,
|
5
|
+
# @return [Time, nil]
|
6
6
|
attr_reader :begins
|
7
7
|
|
8
|
-
# @return [Time,
|
8
|
+
# @return [Time, nil]
|
9
9
|
attr_reader :ends
|
10
10
|
|
11
|
-
# @return [Time,
|
11
|
+
# @return [Time, nil]
|
12
12
|
attr_reader :revision
|
13
13
|
|
14
|
-
# @param begins [Time,
|
15
|
-
# @param ends [Time,
|
16
|
-
# @param revision [Time,
|
14
|
+
# @param begins [Time, nil]
|
15
|
+
# @param ends [Time, nil]
|
16
|
+
# @param revision [Time, nil]
|
17
17
|
def initialize(begins: nil, ends: nil, revision: nil)
|
18
18
|
@begins = begins
|
19
19
|
@ends = ends
|
data/lib/relaton_bib/version.rb
CHANGED
@@ -566,7 +566,7 @@ module RelatonBib
|
|
566
566
|
end
|
567
567
|
|
568
568
|
# @param rel [Nokogiri::XML::Element]
|
569
|
-
# @return [RelatonBib::FormattedString,
|
569
|
+
# @return [RelatonBib::FormattedString, nil]
|
570
570
|
def relation_description(rel)
|
571
571
|
d = rel.at "./description"
|
572
572
|
return unless d
|
@@ -635,7 +635,7 @@ module RelatonBib
|
|
635
635
|
end
|
636
636
|
|
637
637
|
# @param item [Nokogiri::XML::Element]
|
638
|
-
# @return [RelatonBib::FormattedRef,
|
638
|
+
# @return [RelatonBib::FormattedRef, nil]
|
639
639
|
def fref(item)
|
640
640
|
ident = item&.at("./formattedref")
|
641
641
|
return unless ident
|
data/lib/relaton_bib.rb
CHANGED
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.14.
|
4
|
+
version: 1.14.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|