relaton-bib 0.3.12 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +3 -1
- data/.github/workflows/ubuntu.yml +3 -1
- data/.github/workflows/windows.yml +3 -1
- data/.gitmodules +6 -0
- data/Gemfile.lock +6 -2
- data/lib/relaton_bib/bib_item_locality.rb +3 -4
- data/lib/relaton_bib/bibliographic_item.rb +1 -1
- data/lib/relaton_bib/contributor.rb +2 -1
- data/lib/relaton_bib/document_relation.rb +1 -1
- data/lib/relaton_bib/person.rb +2 -2
- data/lib/relaton_bib/validity.rb +1 -1
- data/lib/relaton_bib/version.rb +1 -1
- data/lib/relaton_bib/xml_parser.rb +2 -2
- data/relaton-bib.gemspec +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1895db87e6e6d010858802f4ff11b7b948b0b0474bfc3eefbbce32e5f3dcd105
|
4
|
+
data.tar.gz: 20320ba0d5ccf314fe1d92225efde5e3162b9b0325878bfd1e3305a2c0a66416
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe2a6ec289e51ed504e3fd206b623ce81c57a942276070a505de3642b45705f3aea5dfb8f6aa6feaf2e7f3d460db1498c6871498c208043213a6154f7f375eb1
|
7
|
+
data.tar.gz: 1fc4a93c85b30c432750df1e6611a88eb2f3e9ecb701af1d7a149abb59c6d7ce999b89fbbb2374ea95f5ac47c93022d48bba3d9f65f7c6e860ef3be2062b48e1
|
data/.github/workflows/macos.yml
CHANGED
data/.gitmodules
ADDED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
relaton-bib (0.
|
4
|
+
relaton-bib (0.4.0)
|
5
5
|
addressable
|
6
6
|
nokogiri
|
7
7
|
|
@@ -22,6 +22,7 @@ GEM
|
|
22
22
|
mini_portile2 (2.4.0)
|
23
23
|
nokogiri (1.10.3)
|
24
24
|
mini_portile2 (~> 2.4.0)
|
25
|
+
optout (0.0.2)
|
25
26
|
public_suffix (4.0.1)
|
26
27
|
rake (10.5.0)
|
27
28
|
rspec (3.8.0)
|
@@ -39,6 +40,8 @@ GEM
|
|
39
40
|
rspec-support (3.8.2)
|
40
41
|
ruby-debug-ide (0.7.0)
|
41
42
|
rake (>= 0.8.1)
|
43
|
+
ruby-jing (0.0.1)
|
44
|
+
optout (>= 0.0.2)
|
42
45
|
simplecov (0.17.0)
|
43
46
|
docile (~> 1.1)
|
44
47
|
json (>= 1.8, < 3)
|
@@ -57,7 +60,8 @@ DEPENDENCIES
|
|
57
60
|
relaton-bib!
|
58
61
|
rspec (~> 3.0)
|
59
62
|
ruby-debug-ide
|
63
|
+
ruby-jing
|
60
64
|
simplecov
|
61
65
|
|
62
66
|
BUNDLED WITH
|
63
|
-
2.0.
|
67
|
+
2.0.2
|
@@ -37,10 +37,9 @@ module RelatonBib
|
|
37
37
|
|
38
38
|
# @param builder [Nokogiri::XML::Builder]
|
39
39
|
def to_xml(builder)
|
40
|
-
builder.
|
41
|
-
|
42
|
-
|
43
|
-
end
|
40
|
+
builder.parent[:type] = type
|
41
|
+
builder.referenceFrom reference_from # { reference_from.to_xml(builder) }
|
42
|
+
builder.referenceTo reference_to if reference_to
|
44
43
|
end
|
45
44
|
|
46
45
|
# @return [Hash]
|
@@ -350,7 +350,7 @@ module RelatonBib
|
|
350
350
|
series.each { |s| s.to_xml builder }
|
351
351
|
medium&.to_xml builder
|
352
352
|
place.each { |pl| builder.place pl }
|
353
|
-
extent.each { |e| e.to_xml builder }
|
353
|
+
extent.each { |e| builder.extent { e.to_xml builder } }
|
354
354
|
accesslocation.each { |al| builder.accesslocation al }
|
355
355
|
classification&.to_xml builder
|
356
356
|
validity&.to_xml builder
|
data/lib/relaton_bib/person.rb
CHANGED
@@ -51,10 +51,10 @@ module RelatonBib
|
|
51
51
|
builder.completename { completename.to_xml builder }
|
52
52
|
else
|
53
53
|
prefix.each { |p| builder.prefix { p.to_xml builder } }
|
54
|
+
forename.each { |f| builder.forename { f.to_xml builder } }
|
54
55
|
initial.each { |i| builder.initial { i.to_xml builder } }
|
55
|
-
addition.each { |a| builder.addition { a.to_xml builder } }
|
56
56
|
builder.surname { surname.to_xml builder }
|
57
|
-
|
57
|
+
addition.each { |a| builder.addition { a.to_xml builder } }
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
data/lib/relaton_bib/validity.rb
CHANGED
@@ -25,7 +25,7 @@ module RelatonBib
|
|
25
25
|
builder.validity do
|
26
26
|
builder.validityBegins begins.strftime(FORMAT) if begins
|
27
27
|
builder.validityEnds ends.strftime(FORMAT) if ends
|
28
|
-
builder.
|
28
|
+
builder.revision revision.strftime(FORMAT) if revision
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
data/lib/relaton_bib/version.rb
CHANGED
@@ -105,7 +105,7 @@ module RelatonBib
|
|
105
105
|
end
|
106
106
|
|
107
107
|
def fetch_extent(item)
|
108
|
-
item.xpath("./
|
108
|
+
item.xpath("./extent").map do |ex|
|
109
109
|
BibItemLocality.new(
|
110
110
|
ex[:type], ex.at("referenceFrom")&.text, ex.at("referenceTo")&.text
|
111
111
|
)
|
@@ -125,7 +125,7 @@ module RelatonBib
|
|
125
125
|
|
126
126
|
begins = (b = vl.at("validityBegins")) ? Time.strptime(b.text, "%Y-%m-%d %H:%M") : nil
|
127
127
|
ends = (e = vl.at("validityEnds")) ? Time.strptime(e.text, "%Y-%m-%d %H:%M") : nil
|
128
|
-
revision = (r = vl.at("
|
128
|
+
revision = (r = vl.at("revision")) ? Time.strptime(r.text, "%Y-%m-%d %H:%M") : nil
|
129
129
|
Validity.new begins: begins, ends: ends, revision: revision
|
130
130
|
end
|
131
131
|
|
data/relaton-bib.gemspec
CHANGED
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
31
|
spec.add_development_dependency "ruby-debug-ide"
|
32
|
+
spec.add_development_dependency "ruby-jing"
|
32
33
|
spec.add_development_dependency "simplecov"
|
33
34
|
spec.add_development_dependency "byebug"
|
34
35
|
|
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: 0.
|
4
|
+
version: 0.4.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: 2019-10
|
11
|
+
date: 2019-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: ruby-jing
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: simplecov
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,6 +175,7 @@ files:
|
|
161
175
|
- ".github/workflows/ubuntu.yml"
|
162
176
|
- ".github/workflows/windows.yml"
|
163
177
|
- ".gitignore"
|
178
|
+
- ".gitmodules"
|
164
179
|
- ".rspec"
|
165
180
|
- ".rubocop.yml"
|
166
181
|
- Gemfile
|