pennmarc 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pennmarc/helpers/creator.rb +36 -0
- data/lib/pennmarc/mappings/locations.yml +44 -44
- data/lib/pennmarc/version.rb +1 -1
- data/spec/lib/pennmarc/helpers/creator_spec.rb +181 -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: cb5991760f2f82ed299e5602451881e8b71a88fec9cae1f570afe8e5c90d56f9
|
4
|
+
data.tar.gz: d0fa00068ed63eb1ea9de2127f706c4076b56eb567ac29fc0e88c77a74b5605d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edff4fba2a3e3edf56b7e7fb79992f595becf46e588fa81cb4ed327153deacc6a4bf2c8b040808830f5963e2c64db8a6165bfbdcb04698884ac5ebe4b997d4f0
|
7
|
+
data.tar.gz: f3024891d0d48b13e18b3d25ec09e33c134cb77a152bb3849079589b893f99eef9489b8a81307cab14d941467d36242f829c0a9120d42b24064e862c9411fe80
|
@@ -313,6 +313,42 @@ module PennMARC
|
|
313
313
|
}.uniq
|
314
314
|
end
|
315
315
|
|
316
|
+
# Similar to contributor_show, excluding the authors included in extended_show
|
317
|
+
# @param record [MARC::Record]
|
318
|
+
# @param relator_map [Hash]
|
319
|
+
# @param name_only [Boolean]
|
320
|
+
# @param vernacular [Boolean]
|
321
|
+
# @return [Array<String>]
|
322
|
+
def contributor_noauthor_show(record, relator_map: Mappers.relator, name_only: false, vernacular: true)
|
323
|
+
contributor_fields = record.fields(CONTRIBUTOR_TAGS)
|
324
|
+
|
325
|
+
# Exclude the 700 authors and collect their linkages
|
326
|
+
excluded_linkages = []
|
327
|
+
filtered_fields = contributor_fields.reject do |f|
|
328
|
+
is_author = f.tag == '700' && (f['4']&.downcase == 'aut' || f['e']&.downcase&.start_with?('author'))
|
329
|
+
excluded_linkages << "700-#{f['6'].split('-').last}" if is_author && f['6']
|
330
|
+
is_author
|
331
|
+
end
|
332
|
+
|
333
|
+
# Add vernacular fields that are not excluded by checking the linkages
|
334
|
+
if vernacular
|
335
|
+
vernacular_fields = record.fields('880').select do |f|
|
336
|
+
CONTRIBUTOR_TAGS.any? { |tag| f['6']&.start_with?(tag) } && !excluded_linkages.include?(f['6'])
|
337
|
+
end
|
338
|
+
filtered_fields.concat(vernacular_fields)
|
339
|
+
end
|
340
|
+
|
341
|
+
sf = name_only ? %w[a] : CONTRIBUTOR_DISPLAY_SUBFIELDS
|
342
|
+
|
343
|
+
filtered_fields.filter_map { |field|
|
344
|
+
next if ['', ' ', '0'].exclude?(field.indicator2) && field.tag.in?(CONTRIBUTOR_TAGS)
|
345
|
+
next if subfield_defined? field, 'i'
|
346
|
+
|
347
|
+
contributor = join_subfields(field, &subfield_in?(sf))
|
348
|
+
append_relator(field: field, joined_subfields: contributor, relator_term_sf: 'e', relator_map: relator_map)
|
349
|
+
}.uniq
|
350
|
+
end
|
351
|
+
|
316
352
|
private
|
317
353
|
|
318
354
|
# @param record [MARC::Record]
|
@@ -101,6 +101,10 @@ litaward:
|
|
101
101
|
library: Athenaeum of Philadelphia
|
102
102
|
display: Athenaeum of Philadelphia - Literary Award
|
103
103
|
aeon: true
|
104
|
+
lounge:
|
105
|
+
specific_location: Athenaeum of Philadelphia - Member Lounge
|
106
|
+
library: Athenaeum of Philadelphia
|
107
|
+
display: Athenaeum of Philadelphia - Member Lounge
|
104
108
|
microfilm:
|
105
109
|
specific_location: Athenaeum of Philadelphia - Microfilm
|
106
110
|
library: Athenaeum of Philadelphia
|
@@ -970,12 +974,11 @@ newbofc:
|
|
970
974
|
- 'Veterinary: du Pont Library (New Bolton)'
|
971
975
|
display: 'Veterinary: du Pont Library (New Bolton) - Office'
|
972
976
|
newbrare:
|
973
|
-
specific_location:
|
977
|
+
specific_location: LIBRA - Fairman Rogers Collection
|
974
978
|
library:
|
975
979
|
- Special Collections
|
976
|
-
-
|
977
|
-
|
978
|
-
display: Kislak Center for Special Collections - Fairman Rogers Coll.
|
980
|
+
- LIBRA
|
981
|
+
display: LIBRA - Fairman Rogers Collection
|
979
982
|
aeon: true
|
980
983
|
newbrefe:
|
981
984
|
specific_location: 'Veterinary: du Pont Library (New Bolton) - Reference'
|
@@ -1085,20 +1088,18 @@ scg123:
|
|
1085
1088
|
display: Kislak Center for Special Collections - Rare Book Collection 123
|
1086
1089
|
aeon: true
|
1087
1090
|
sc1100c:
|
1088
|
-
specific_location:
|
1091
|
+
specific_location: LIBRA - 1100C Collection
|
1089
1092
|
library:
|
1090
1093
|
- Special Collections
|
1091
|
-
-
|
1092
|
-
|
1093
|
-
display: Kislak Center for Special Collections - 1100C Collection
|
1094
|
+
- LIBRA
|
1095
|
+
display: LIBRA - 1100C Collection
|
1094
1096
|
aeon: true
|
1095
1097
|
scadams:
|
1096
|
-
specific_location:
|
1098
|
+
specific_location: LIBRA - Adams Collection
|
1097
1099
|
library:
|
1098
1100
|
- Special Collections
|
1099
|
-
-
|
1100
|
-
|
1101
|
-
display: Kislak Center for Special Collections - Adams Collection
|
1101
|
+
- LIBRA
|
1102
|
+
display: LIBRA - Adams Collection
|
1102
1103
|
aeon: true
|
1103
1104
|
scartbk:
|
1104
1105
|
specific_location: Kislak Center for Special Collections - Artists' Books
|
@@ -1117,12 +1118,11 @@ scbanks:
|
|
1117
1118
|
display: Kislak Center for Special Collections - Joanna Banks Collection
|
1118
1119
|
aeon: true
|
1119
1120
|
scblank:
|
1120
|
-
specific_location:
|
1121
|
+
specific_location: LIBRA - Blank Collection
|
1121
1122
|
library:
|
1122
1123
|
- Special Collections
|
1123
|
-
-
|
1124
|
-
|
1125
|
-
display: Kislak Center for Special Collections - Blank Collection
|
1124
|
+
- LIBRA
|
1125
|
+
display: LIBRA - Blank Collection
|
1126
1126
|
aeon: true
|
1127
1127
|
scbyron:
|
1128
1128
|
specific_location: Kislak Center for Special Collections - Byron Collection
|
@@ -1205,12 +1205,11 @@ scelz:
|
|
1205
1205
|
display: Kislak Center for Special Collections - Elzevier Collection
|
1206
1206
|
aeon: true
|
1207
1207
|
scfast:
|
1208
|
-
specific_location:
|
1208
|
+
specific_location: LIBRA - Fast Collection
|
1209
1209
|
library:
|
1210
1210
|
- Special Collections
|
1211
|
-
-
|
1212
|
-
|
1213
|
-
display: Kislak Center for Special Collections - Fast Collection
|
1211
|
+
- LIBRA
|
1212
|
+
display: LIBRA - Fast Collection
|
1214
1213
|
aeon: true
|
1215
1214
|
scforr:
|
1216
1215
|
specific_location: Kislak Center for Special Collections - Forrest Collection
|
@@ -1253,20 +1252,18 @@ scfurnlib:
|
|
1253
1252
|
display: Kislak Center for Special Collections - Furness Shakespeare Library (Van
|
1254
1253
|
Pelt 628)
|
1255
1254
|
scfurnst:
|
1256
|
-
specific_location:
|
1255
|
+
specific_location: LIBRA - Furness Collection
|
1257
1256
|
library:
|
1258
1257
|
- Special Collections
|
1259
|
-
-
|
1260
|
-
|
1261
|
-
display: Kislak Center for Special Collections - Furness Storage
|
1258
|
+
- LIBRA
|
1259
|
+
display: LIBRA - Furness Storage
|
1262
1260
|
aeon: true
|
1263
1261
|
scgull:
|
1264
|
-
specific_location:
|
1262
|
+
specific_location: LIBRA - Gulliver's Travels Collection
|
1265
1263
|
library:
|
1266
1264
|
- Special Collections
|
1267
|
-
-
|
1268
|
-
|
1269
|
-
display: Kislak Center for Special Collections - Gulliver's Travels Collection
|
1265
|
+
- LIBRA
|
1266
|
+
display: LIBRA - Gulliver's Travels Collection
|
1270
1267
|
aeon: true
|
1271
1268
|
scinc:
|
1272
1269
|
specific_location: Kislak Center for Special Collections - Incunables
|
@@ -1309,12 +1306,11 @@ scmss:
|
|
1309
1306
|
display: Kislak Center for Special Collections - Manuscripts
|
1310
1307
|
aeon: true
|
1311
1308
|
scmst:
|
1312
|
-
specific_location:
|
1309
|
+
specific_location: LIBRA - Manuscripts Storage
|
1313
1310
|
library:
|
1314
1311
|
- Special Collections
|
1315
|
-
-
|
1316
|
-
|
1317
|
-
display: Kislak Center for Special Collections - Manuscripts Storage
|
1312
|
+
- LIBRA
|
1313
|
+
display: LIBRA - Manuscripts Storage
|
1318
1314
|
aeon: true
|
1319
1315
|
scmsw:
|
1320
1316
|
specific_location: Kislak Center for Special Collections - Web
|
@@ -1367,12 +1363,11 @@ screfe:
|
|
1367
1363
|
display: Kislak Center for Special Collections - Reference Collection
|
1368
1364
|
aeon: true
|
1369
1365
|
screfestor:
|
1370
|
-
specific_location:
|
1366
|
+
specific_location: LIBRA - Reference Storage
|
1371
1367
|
library:
|
1372
1368
|
- Special Collections
|
1373
|
-
-
|
1374
|
-
|
1375
|
-
display: Kislak Center for Special Collections Reference Storage
|
1369
|
+
- LIBRA
|
1370
|
+
display: LIBRA - Reference Storage
|
1376
1371
|
aeon: true
|
1377
1372
|
scschimmel:
|
1378
1373
|
specific_location: Kislak Center for Special Collections - Schimmel Collection
|
@@ -1399,12 +1394,11 @@ scsmith:
|
|
1399
1394
|
display: Kislak Center for Special Collections - E.F. Smith Collection
|
1400
1395
|
aeon: true
|
1401
1396
|
scsmithst:
|
1402
|
-
specific_location:
|
1397
|
+
specific_location: LIBRA - E.F. Smith Collection
|
1403
1398
|
library:
|
1404
1399
|
- Special Collections
|
1405
|
-
-
|
1406
|
-
|
1407
|
-
display: Kislak Center for Special Collections - E.F. Smith Collection Storage
|
1400
|
+
- LIBRA
|
1401
|
+
display: LIBRA - E.F. Smith Collection Storage
|
1408
1402
|
aeon: true
|
1409
1403
|
scsterne:
|
1410
1404
|
specific_location: Kislak Center for Special Collections - Day Sterne Collection
|
@@ -1415,12 +1409,11 @@ scsterne:
|
|
1415
1409
|
display: Kislak Center for Special Collections - Day Sterne Collection
|
1416
1410
|
aeon: true
|
1417
1411
|
scstor:
|
1418
|
-
specific_location:
|
1412
|
+
specific_location: LIBRA - Rare Book Collection
|
1419
1413
|
library:
|
1420
1414
|
- Special Collections
|
1421
|
-
-
|
1422
|
-
|
1423
|
-
display: Kislak Center for Special Collections - Rare Book Collection Storage
|
1415
|
+
- LIBRA
|
1416
|
+
display: LIBRA - Rare Book Collection Storage
|
1424
1417
|
aeon: true
|
1425
1418
|
scstorvil:
|
1426
1419
|
specific_location: LIBRA Vilain-Wieck Collection
|
@@ -1649,6 +1642,13 @@ veteresov:
|
|
1649
1642
|
- 'Veterinary: Atwood Library (Campus)'
|
1650
1643
|
- Reserve
|
1651
1644
|
display: 'Veterinary: Atwood Library (Campus) - Reserve Oversize'
|
1645
|
+
vetewellrm:
|
1646
|
+
specific_location: 'Veterinary: Atwood Library (Campus)- Wellness Room'
|
1647
|
+
library:
|
1648
|
+
- Health Sciences Libraries
|
1649
|
+
- Veterinary
|
1650
|
+
- 'Veterinary: Atwood Library (Campus)'
|
1651
|
+
display: 'Veterinary: Atwood Library (Campus)- Wellness Room'
|
1652
1652
|
vpexhibit:
|
1653
1653
|
specific location: Van Pelt - Exhibits and Events
|
1654
1654
|
library: Van Pelt-Dietrich Library Center
|
data/lib/pennmarc/version.rb
CHANGED
@@ -478,7 +478,7 @@ describe 'PennMARC::Creator' do
|
|
478
478
|
describe '.contributor_show' do
|
479
479
|
let(:record) { marc_record fields: fields }
|
480
480
|
|
481
|
-
context 'when
|
481
|
+
context 'when indicator2 is "1"' do
|
482
482
|
let(:fields) do
|
483
483
|
[marc_field(tag: '700', subfields: { a: 'Ignore' }, indicator2: '1')]
|
484
484
|
end
|
@@ -554,4 +554,184 @@ describe 'PennMARC::Creator' do
|
|
554
554
|
end
|
555
555
|
end
|
556
556
|
end
|
557
|
+
|
558
|
+
describe '.contributor_noauthor_show' do
|
559
|
+
let(:record) { marc_record fields: fields }
|
560
|
+
|
561
|
+
context 'when indicator2 is "1"' do
|
562
|
+
let(:fields) do
|
563
|
+
[marc_field(tag: '700', subfields: { a: 'Ignore' }, indicator2: '1')]
|
564
|
+
end
|
565
|
+
|
566
|
+
it 'ignores the field' do
|
567
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping)
|
568
|
+
expect(values).to be_empty
|
569
|
+
end
|
570
|
+
end
|
571
|
+
|
572
|
+
context 'with subfield "i"' do
|
573
|
+
let(:fields) do
|
574
|
+
[
|
575
|
+
marc_field(tag: '700', subfields: { i: 'Ignore', e: 'author' }),
|
576
|
+
marc_field(tag: '880', subfields: { i: 'Ignore', '6': '700' })
|
577
|
+
]
|
578
|
+
end
|
579
|
+
|
580
|
+
it 'ignores the field' do
|
581
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping)
|
582
|
+
expect(values).to be_empty
|
583
|
+
end
|
584
|
+
end
|
585
|
+
|
586
|
+
context 'with a single contributor and linked alternate' do
|
587
|
+
let(:fields) do
|
588
|
+
[
|
589
|
+
marc_field(tag: '700', subfields: { a: 'Name', b: 'I', c: 'laureate', d: '1968', e: 'author',
|
590
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
591
|
+
'4': 'aut' }),
|
592
|
+
marc_field(tag: '880', subfields: { '6': '700', a: 'Alt Name', b: 'Alt num', c: 'Alt title',
|
593
|
+
d: 'Alt date', e: 'Alt relator', j: 'Alt qualifier',
|
594
|
+
q: 'Alt Fuller Name', u: 'Alt affiliation', '3': 'Alt material' })
|
595
|
+
]
|
596
|
+
end
|
597
|
+
|
598
|
+
it 'returns the non-author contributor only' do
|
599
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping)
|
600
|
+
expect(values).to contain_exactly(
|
601
|
+
'Alt Name Alt num Alt title Alt date Alt qualifier Alt Fuller Name Alt affiliation Alt material, Alt relator.'
|
602
|
+
)
|
603
|
+
end
|
604
|
+
|
605
|
+
it 'returns the non-author contributor name only when called with name_only as true' do
|
606
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping, name_only: true)
|
607
|
+
expect(values).to contain_exactly 'Alt Name, Alt relator.'
|
608
|
+
end
|
609
|
+
|
610
|
+
it 'returns empty when called with vernacular as false' do
|
611
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping, vernacular: false)
|
612
|
+
expect(values).to be_empty
|
613
|
+
end
|
614
|
+
end
|
615
|
+
|
616
|
+
context 'with four contributors two of which are authors' do
|
617
|
+
let(:fields) do
|
618
|
+
[
|
619
|
+
marc_field(tag: '700', subfields: { a: '01 (Ignore)', b: 'I', c: 'laureate',
|
620
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
621
|
+
'4': 'aut', '6': '880-01' }),
|
622
|
+
marc_field(tag: '700', subfields: { a: '02 (Ignore)', d: '1968', e: 'author',
|
623
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
624
|
+
'6': '880-02' }),
|
625
|
+
marc_field(tag: '700', subfields: { a: '03 (Show)', b: 'J', c: 'laureate',
|
626
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
627
|
+
'4': 'edt', '6': '880-03' }),
|
628
|
+
marc_field(tag: '700', subfields: { a: '04 (Show)', d: '1968', e: 'editor',
|
629
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
630
|
+
'6': '880-04' })
|
631
|
+
]
|
632
|
+
end
|
633
|
+
|
634
|
+
it 'returns two non-author contributors' do
|
635
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping)
|
636
|
+
expect(values).to contain_exactly(
|
637
|
+
'03 (Show) J laureate pseud Fuller Name affiliation materials',
|
638
|
+
'04 (Show) 1968 pseud Fuller Name affiliation materials, editor.'
|
639
|
+
)
|
640
|
+
end
|
641
|
+
|
642
|
+
it 'returns contributor name only when called with name_only as true' do
|
643
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping, name_only: true)
|
644
|
+
expect(values).to contain_exactly('03 (Show)', '04 (Show), editor.')
|
645
|
+
end
|
646
|
+
|
647
|
+
it 'returns contributor values without alternatives when called with vernacular as false' do
|
648
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping, vernacular: false)
|
649
|
+
expect(values).to contain_exactly(
|
650
|
+
'03 (Show) J laureate pseud Fuller Name affiliation materials',
|
651
|
+
'04 (Show) 1968 pseud Fuller Name affiliation materials, editor.'
|
652
|
+
)
|
653
|
+
end
|
654
|
+
end
|
655
|
+
|
656
|
+
context 'with four contributors having respective alternatives, two of the contributors are authors' do
|
657
|
+
let(:fields) do
|
658
|
+
[
|
659
|
+
marc_field(tag: '700', subfields: { a: '01 (Ignore)', b: 'I', c: 'laureate',
|
660
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
661
|
+
'4': 'aut', '6': '880-01' }),
|
662
|
+
marc_field(tag: '700', subfields: { a: '02 (Ignore)', d: '1968', e: 'author',
|
663
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
664
|
+
'6': '880-02' }),
|
665
|
+
marc_field(tag: '700', subfields: { a: '03 (Show)', b: 'J', c: 'laureate',
|
666
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
667
|
+
'4': 'edt', '6': '880-03' }),
|
668
|
+
marc_field(tag: '700', subfields: { a: '04 (Show)', d: '1968', e: 'editor',
|
669
|
+
j: 'pseud', q: 'Fuller Name', u: 'affiliation', '3': 'materials',
|
670
|
+
'6': '880-04' }),
|
671
|
+
marc_field(tag: '880', subfields: { a: 'Alt Name 01 (Ignore)', '6': '700-01', b: 'Alt num 01',
|
672
|
+
c: 'Alt title 01', d: 'Alt date 01', e: 'Alt relator 01',
|
673
|
+
j: 'Alt qualifier 01', q: 'Alt Fuller Name 01', u: 'Alt affiliation 01',
|
674
|
+
'3': 'Alt material 01' }),
|
675
|
+
marc_field(tag: '880', subfields: { a: 'Alt Name 02 (Ignore)', '6': '700-02', b: 'Alt num 02',
|
676
|
+
c: 'Alt title 02', d: 'Alt date 02', e: 'Alt relator 02',
|
677
|
+
j: 'Alt qualifier 02', q: 'Alt Fuller Name 02', u: 'Alt affiliation 02',
|
678
|
+
'3': 'Alt material 02' }),
|
679
|
+
marc_field(tag: '880', subfields: { a: 'Alt Name 03 (Show)', '6': '700-03', b: 'Alt num 03',
|
680
|
+
c: 'Alt title 03', d: 'Alt date 03', e: 'Alt relator 03',
|
681
|
+
j: 'Alt qualifier 03', q: 'Alt Fuller Name 03', u: 'Alt affiliation 03',
|
682
|
+
'3': 'Alt material 03' }),
|
683
|
+
marc_field(tag: '880', subfields: { a: 'Alt Name 04 (Show)', '6': '700-04', b: 'Alt num 04',
|
684
|
+
c: 'Alt title 04', d: 'Alt date 04', e: 'Alt relator 04',
|
685
|
+
j: 'Alt qualifier 04', q: 'Alt Fuller Name 04', u: 'Alt affiliation 04',
|
686
|
+
'3': 'Alt material 04' })
|
687
|
+
]
|
688
|
+
end
|
689
|
+
|
690
|
+
it 'returns two non-author contributors with their alternatives' do
|
691
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping)
|
692
|
+
expect(values).to contain_exactly(
|
693
|
+
'03 (Show) J laureate pseud Fuller Name affiliation materials',
|
694
|
+
'04 (Show) 1968 pseud Fuller Name affiliation materials, editor.',
|
695
|
+
'Alt Name 03 (Show) Alt num 03 Alt title 03 Alt date 03 Alt qualifier 03 Alt Fuller Name 03 '\
|
696
|
+
'Alt affiliation 03 Alt material 03, Alt relator 03.',
|
697
|
+
'Alt Name 04 (Show) Alt num 04 Alt title 04 Alt date 04 Alt qualifier 04 Alt Fuller Name 04 '\
|
698
|
+
'Alt affiliation 04 Alt material 04, Alt relator 04.'
|
699
|
+
)
|
700
|
+
end
|
701
|
+
|
702
|
+
it 'returns two non-author contributors name and alternative names only when called with name_only as true' do
|
703
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping, name_only: true)
|
704
|
+
expect(values).to contain_exactly('03 (Show)', 'Alt Name 03 (Show), Alt relator 03.',
|
705
|
+
'04 (Show), editor.', 'Alt Name 04 (Show), Alt relator 04.')
|
706
|
+
end
|
707
|
+
|
708
|
+
it 'returns two non-author contributors without alternatives when called with vernacular as false' do
|
709
|
+
values = helper.contributor_noauthor_show(record, relator_map: mapping, vernacular: false)
|
710
|
+
expect(values).to contain_exactly(
|
711
|
+
'03 (Show) J laureate pseud Fuller Name affiliation materials',
|
712
|
+
'04 (Show) 1968 pseud Fuller Name affiliation materials, editor.'
|
713
|
+
)
|
714
|
+
end
|
715
|
+
end
|
716
|
+
|
717
|
+
context 'with a corporate contributor and linked alternate' do
|
718
|
+
let(:fields) do
|
719
|
+
[
|
720
|
+
marc_field(tag: '710', subfields: { a: 'Corporation', b: 'A division', c: 'Office', d: '1968', e: 'author',
|
721
|
+
u: 'affiliation', '3': 'materials', '4': 'aut' }),
|
722
|
+
marc_field(tag: '880', subfields: { '6': '710', a: 'Alt Corp Name', b: 'Alt unit', c: 'Alt location',
|
723
|
+
d: 'Alt date', e: ['Alt relator', 'another'], u: 'Alt Affiliation',
|
724
|
+
'3': 'Alt materials' })
|
725
|
+
]
|
726
|
+
end
|
727
|
+
|
728
|
+
it 'returns expected contributor values' do
|
729
|
+
values = helper.contributor_noauthor_show(record)
|
730
|
+
expect(values).to contain_exactly(
|
731
|
+
'Corporation A division Office 1968 affiliation materials, Author.',
|
732
|
+
'Alt Corp Name Alt unit Alt location Alt date Alt Affiliation Alt materials, Alt relator, another.'
|
733
|
+
)
|
734
|
+
end
|
735
|
+
end
|
736
|
+
end
|
557
737
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pennmarc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Kanning
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2025-
|
15
|
+
date: 2025-09-19 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|