stanford-mods 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stanford-mods/name.rb +7 -4
- data/lib/stanford-mods/version.rb +1 -1
- data/spec/name_spec.rb +20 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dec8a7a5501522cd7e061ee8c78ad8e9155f09ee
|
4
|
+
data.tar.gz: 279acc503c49653d0edf63d86909fd7b3679efcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a2239d5219fffa8346568392897d2561f7a0c68307329fa4bdbe72dc5ad5d3f24b9aeb3b3fbc4b1085d26fdb19a0eedadd00c439aa93c1313a3726d3b216a18
|
7
|
+
data.tar.gz: b03a84ad3ae27ebd0b6222959afc534f2468169f1262659d74645107339b9bb21b6168a55c7252b032f000edb4b3c3e8862983adaf5c4475143c39b08899ea62
|
data/lib/stanford-mods/name.rb
CHANGED
@@ -53,10 +53,13 @@ module Stanford
|
|
53
53
|
def non_collector_person_authors
|
54
54
|
result = []
|
55
55
|
@mods_ng_xml.personal_name.map do |n|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
unless n.role.size == 0
|
57
|
+
n.role.each { |r|
|
58
|
+
unless (r.authority.include?('marcrelator') && r.value.include?('Collector')) ||
|
59
|
+
r.roleTerm.valueURI.first == COLLECTOR_ROLE_URI
|
60
|
+
result << n.display_value_w_date
|
61
|
+
end
|
62
|
+
}
|
60
63
|
end
|
61
64
|
end
|
62
65
|
result unless result.empty?
|
data/spec/name_spec.rb
CHANGED
@@ -305,6 +305,16 @@ describe "name/author concepts" do
|
|
305
305
|
smods_rec.from_str(mods_start + name_snippet + mods_end)
|
306
306
|
expect(smods_rec.non_collector_person_authors).to eq nil
|
307
307
|
end
|
308
|
+
it 'no role present' do
|
309
|
+
name_snippet =
|
310
|
+
<<-EOF
|
311
|
+
<name type="personal" usage="primary">
|
312
|
+
<namePart>#{name}</namePart>
|
313
|
+
</name>
|
314
|
+
EOF
|
315
|
+
smods_rec.from_str(mods_start + name_snippet + mods_end)
|
316
|
+
expect(smods_rec.non_collector_person_authors).to eq nil
|
317
|
+
end
|
308
318
|
end
|
309
319
|
|
310
320
|
context '#collectors_w_dates' do
|
@@ -417,5 +427,15 @@ describe "name/author concepts" do
|
|
417
427
|
smods_rec.from_str(mods_start + name_snippet + mods_end)
|
418
428
|
expect(smods_rec.collectors_w_dates).to eq nil
|
419
429
|
end
|
430
|
+
it 'no role present' do
|
431
|
+
name_snippet =
|
432
|
+
<<-EOF
|
433
|
+
<name type="personal" usage="primary">
|
434
|
+
<namePart>Nobody</namePart>
|
435
|
+
</name>
|
436
|
+
EOF
|
437
|
+
smods_rec.from_str(mods_start + name_snippet + mods_end)
|
438
|
+
expect(smods_rec.collectors_w_dates).to eq nil
|
439
|
+
end
|
420
440
|
end
|
421
441
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stanford-mods
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naomi Dushay
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-11-
|
12
|
+
date: 2015-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mods
|
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
143
|
rubyforge_project:
|
144
|
-
rubygems_version: 2.4.
|
144
|
+
rubygems_version: 2.4.5.1
|
145
145
|
signing_key:
|
146
146
|
specification_version: 4
|
147
147
|
summary: Stanford specific wrangling of MODS metadata
|