pennmarc 1.4.5 → 1.4.7
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/genre.rb +2 -7
- data/lib/pennmarc/mappings/locations.yml +35 -19
- data/lib/pennmarc/version.rb +1 -1
- data/spec/lib/pennmarc/helpers/genre_spec.rb +9 -36
- 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: 5c6566efba615c1f9650111854b27a6adcea24aaf00da64ec95256bb14466ad7
|
|
4
|
+
data.tar.gz: fccfe662a84df33c95a38d0a424e1cbb75c29ff1156ee0bb5da524a96a7aa779
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 292fb70e7eb3338fb05db2c4837977210c1ff69269a759d82fb6075af9e425a349dd66579a7d61739482ca67147a8e9ec230321b04eca9a75aded713d2e02a4b
|
|
7
|
+
data.tar.gz: 2ce3244bcdb92f05d880dd82306021059c56bfe0bacddbce43084985a7600be7e12ff0d4fd180ff426150b1ac1522d0eb3825e80743a177efb4e529a026528ec
|
|
@@ -43,18 +43,13 @@ module PennMARC
|
|
|
43
43
|
}.uniq
|
|
44
44
|
end
|
|
45
45
|
|
|
46
|
-
# Genre values for faceting.
|
|
47
|
-
#
|
|
46
|
+
# Genre values for faceting.
|
|
47
|
+
# @note Prior to 5/2026, we only set Genre facet values for movies (videos) and manuscripts.
|
|
48
48
|
# @todo the Genre facet in Franklin is pretty ugly. It could be cleaned up by limiting the subfields included
|
|
49
49
|
# here and cleaning up punctuation.
|
|
50
50
|
# @param record [MARC::Record]
|
|
51
51
|
# @return [Array<String>]
|
|
52
52
|
def facet(record)
|
|
53
|
-
format_code = record.leader[6] || ' '
|
|
54
|
-
manuscript = Format.include_manuscripts?(format_code)
|
|
55
|
-
video = record.fields('007').any? { |field| field.value.starts_with? 'v' }
|
|
56
|
-
return [] unless manuscript || video
|
|
57
|
-
|
|
58
53
|
record.fields('655').filter_map { |field|
|
|
59
54
|
next unless allowed_genre_field?(field)
|
|
60
55
|
|
|
@@ -168,6 +168,12 @@ biom:
|
|
|
168
168
|
- Health Sciences Libraries
|
|
169
169
|
- Holman Biotech Commons
|
|
170
170
|
display: Holman Biotech Commons
|
|
171
|
+
biombest:
|
|
172
|
+
specific_location: Holman Biotech Commons - Bestsellers
|
|
173
|
+
library:
|
|
174
|
+
- Health Sciences Libraries
|
|
175
|
+
- Holman Biotech Commons
|
|
176
|
+
display: Holman Biotech Commons - Bestsellers
|
|
171
177
|
biomclin:
|
|
172
178
|
specific_location: Holman Biotech Commons - Clinical Reading Room
|
|
173
179
|
library:
|
|
@@ -317,7 +323,7 @@ cjsfol:
|
|
|
317
323
|
library: Library at the Katz Center for Advanced Judaic Studies
|
|
318
324
|
display: Library at the Katz Center - Stacks Folio
|
|
319
325
|
cjsgf:
|
|
320
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
326
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
321
327
|
library:
|
|
322
328
|
- Special Collections
|
|
323
329
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
@@ -338,7 +344,7 @@ cjshur:
|
|
|
338
344
|
display: Library at the Katz Center - Hurowitz Collection
|
|
339
345
|
aeon: true
|
|
340
346
|
cjsincun:
|
|
341
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
347
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
342
348
|
library:
|
|
343
349
|
- Special Collections
|
|
344
350
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
@@ -351,7 +357,7 @@ cjsinproc:
|
|
|
351
357
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
352
358
|
display: Library at the Katz Center - Processing
|
|
353
359
|
cjsinprocn:
|
|
354
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
360
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
355
361
|
library:
|
|
356
362
|
- Special Collections
|
|
357
363
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
@@ -407,77 +413,77 @@ cjspergal:
|
|
|
407
413
|
library: Library at the Katz Center for Advanced Judaic Studies
|
|
408
414
|
display: Library at the Katz Center - Periodicals Gallery
|
|
409
415
|
cjsrar:
|
|
410
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
416
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
411
417
|
library:
|
|
412
418
|
- Special Collections
|
|
413
419
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
414
|
-
display: Library at the Katz Center - Rare Book Room
|
|
420
|
+
display: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
415
421
|
aeon: true
|
|
416
422
|
cjsraram:
|
|
417
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
423
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
418
424
|
library:
|
|
419
425
|
- Special Collections
|
|
420
426
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
421
427
|
display: Library at the Katz Center - Rare Book Americana
|
|
422
428
|
aeon: true
|
|
423
429
|
cjsrarbx1:
|
|
424
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
430
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
425
431
|
library:
|
|
426
432
|
- Special Collections
|
|
427
433
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
428
434
|
display: Library at the Katz Center - Rare Book Box 1
|
|
429
435
|
aeon: true
|
|
430
436
|
cjsrarbx2:
|
|
431
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
437
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
432
438
|
library:
|
|
433
439
|
- Special Collections
|
|
434
440
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
435
441
|
display: Library at the Katz Center - Rare Book Box 2
|
|
436
442
|
aeon: true
|
|
437
443
|
cjsrarbx3:
|
|
438
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
444
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
439
445
|
library:
|
|
440
446
|
- Special Collections
|
|
441
447
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
442
448
|
display: Library at the Katz Center - Rare Book Box 3
|
|
443
449
|
aeon: true
|
|
444
450
|
cjsrarbx4:
|
|
445
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
451
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
446
452
|
library:
|
|
447
453
|
- Special Collections
|
|
448
454
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
449
455
|
display: Library at the Katz Center - Rare Book Box 4
|
|
450
456
|
aeon: true
|
|
451
457
|
cjsrarfol:
|
|
452
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
458
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
453
459
|
library:
|
|
454
460
|
- Special Collections
|
|
455
461
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
456
462
|
display: Library at the Katz Center - Rare Book Folio
|
|
457
463
|
aeon: true
|
|
458
464
|
cjsrargiga:
|
|
459
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
465
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
460
466
|
library:
|
|
461
467
|
- Special Collections
|
|
462
468
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
463
469
|
display: Library at the Katz Center - Rare Book Giant
|
|
464
470
|
aeon: true
|
|
465
471
|
cjsrarmini:
|
|
466
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
472
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
467
473
|
library:
|
|
468
474
|
- Special Collections
|
|
469
475
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
470
476
|
display: Library at the Katz Center - Rare Book Miniature
|
|
471
477
|
aeon: true
|
|
472
478
|
cjsrarms:
|
|
473
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
479
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
474
480
|
library:
|
|
475
481
|
- Special Collections
|
|
476
482
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
477
483
|
display: Library at the Katz Center - Rare Book Manuscript
|
|
478
484
|
aeon: true
|
|
479
485
|
cjsrarover:
|
|
480
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
486
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
481
487
|
library:
|
|
482
488
|
- Special Collections
|
|
483
489
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
@@ -1235,6 +1241,13 @@ sclea:
|
|
|
1235
1241
|
- Van Pelt-Dietrich Library Center
|
|
1236
1242
|
display: Kislak Center for Special Collections - Lea Collection
|
|
1237
1243
|
aeon: true
|
|
1244
|
+
scleastor:
|
|
1245
|
+
specific_location: LIBRA Lea Collection
|
|
1246
|
+
library:
|
|
1247
|
+
- Special Collections
|
|
1248
|
+
- LIBRA
|
|
1249
|
+
display: LIBRA Lea Collection
|
|
1250
|
+
aeon: true
|
|
1238
1251
|
scmap:
|
|
1239
1252
|
specific_location: Kislak Center for Special Collections - Rare Book Collection
|
|
1240
1253
|
library:
|
|
@@ -1384,12 +1397,11 @@ scteer:
|
|
|
1384
1397
|
display: Kislak Center for Special Collections - Teerink Collection
|
|
1385
1398
|
aeon: true
|
|
1386
1399
|
sctehon:
|
|
1387
|
-
specific_location:
|
|
1400
|
+
specific_location: LIBRA - Tehon Collection
|
|
1388
1401
|
library:
|
|
1389
1402
|
- Special Collections
|
|
1390
|
-
-
|
|
1391
|
-
|
|
1392
|
-
display: Kislak Center for Special Collections - Tehon Collection
|
|
1403
|
+
- LIBRA
|
|
1404
|
+
display: LIBRA - Tehon Collection
|
|
1393
1405
|
aeon: true
|
|
1394
1406
|
sctress:
|
|
1395
1407
|
specific_location: Kislak Center for Special Collections - Arthur Tress Collection
|
|
@@ -1619,6 +1631,10 @@ vpnewbook:
|
|
|
1619
1631
|
specific_location: Van Pelt - New Book Display
|
|
1620
1632
|
library: Van Pelt-Dietrich Library Center
|
|
1621
1633
|
display: Van Pelt - New Book Display
|
|
1634
|
+
vppendcc:
|
|
1635
|
+
specific_location: Van Pelt - Pending Review (G133 CC)
|
|
1636
|
+
library: Van Pelt-Dietrich Library Center
|
|
1637
|
+
display: Van Pelt - Pending Review (G133 CC)
|
|
1622
1638
|
vpref:
|
|
1623
1639
|
specific_location: Van Pelt Reference - Stacks
|
|
1624
1640
|
library:
|
data/lib/pennmarc/version.rb
CHANGED
|
@@ -42,44 +42,17 @@ describe 'PennMARC::Genre' do
|
|
|
42
42
|
|
|
43
43
|
describe '.facet' do
|
|
44
44
|
let(:values) { helper.facet(record) }
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
it 'returns no genre values for faceting' do
|
|
54
|
-
expect(values).to be_empty
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
context 'with a video record' do
|
|
59
|
-
let(:fields) do
|
|
60
|
-
[marc_control_field(tag: '007', value: 'v'),
|
|
61
|
-
marc_field(tag: 'hld', subfields: { c: 'vanp' }),
|
|
62
|
-
marc_field(tag: '655', indicator2: '0', subfields: { a: 'Documentary films' }),
|
|
63
|
-
marc_field(tag: '655', indicator2: '7', subfields: { a: 'Sports', '2': 'fast' }),
|
|
64
|
-
marc_field(tag: '655', indicator2: '7', subfields: { a: 'Le cyclisme', '2': 'qlsp' }), # excluded due to sf2
|
|
65
|
-
marc_field(tag: '655', indicator2: '1', subfields: { a: 'Shredding' })] # excluded, invalid indicator value
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
it 'contains only the desired genre facet values' do
|
|
69
|
-
expect(values).to contain_exactly 'Documentary films', 'Sports'
|
|
70
|
-
end
|
|
45
|
+
let(:fields) do
|
|
46
|
+
[marc_control_field(tag: '007', value: 'v'),
|
|
47
|
+
marc_field(tag: 'hld', subfields: { c: 'vanp' }),
|
|
48
|
+
marc_field(tag: '655', indicator2: '0', subfields: { a: 'Documentary films' }),
|
|
49
|
+
marc_field(tag: '655', indicator2: '7', subfields: { a: 'Sports', '2': 'fast' }),
|
|
50
|
+
marc_field(tag: '655', indicator2: '7', subfields: { a: 'Le cyclisme', '2': 'qlsp' }), # excluded due to sf2
|
|
51
|
+
marc_field(tag: '655', indicator2: '1', subfields: { a: 'Shredding' })] # excluded, invalid indicator value
|
|
71
52
|
end
|
|
72
53
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
let(:fields) do
|
|
76
|
-
[marc_control_field(tag: '007', value: 'x'),
|
|
77
|
-
marc_field(tag: '655', indicator2: '7', subfields: { a: 'Astronomy', '2': 'fast' })]
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
it 'returns the expected genre values' do
|
|
81
|
-
expect(values).to contain_exactly 'Astronomy'
|
|
82
|
-
end
|
|
54
|
+
it 'contains only the genre facet values from approved ontologies' do
|
|
55
|
+
expect(values).to contain_exactly 'Documentary films', 'Sports'
|
|
83
56
|
end
|
|
84
57
|
end
|
|
85
58
|
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.4.
|
|
4
|
+
version: 1.4.7
|
|
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: 2026-
|
|
15
|
+
date: 2026-07-20 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: activesupport
|