pennmarc 1.4.5 → 1.4.6
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 +18 -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: e7fc0d8c3919655fd8c163b6cbe4da2b38e2988238532fe24dc8f62d784fb5ab
|
|
4
|
+
data.tar.gz: a9a907d91af9f7cffb42147803137bb9d7bca7cdc553a749575684bc3b96381b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ffe68635b6ccb154b26edb8cc65a381fff97db77d284a20b8d5643d96895288d6e0caae592a2ae897d500bcdfd1b3a0c2fb9df5c8abcf3809010a9c146ec5dbf
|
|
7
|
+
data.tar.gz: '09cf7165edcf2031a921517dd4cdb9364faed586a53c88f9fde8d6e0d79d4fefe7ba8a5a2e4ca7f69cf50dfef22e82b3fc4001d0a64c39c520f8f71ebae4f5ab'
|
|
@@ -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
|
|
|
@@ -317,7 +317,7 @@ cjsfol:
|
|
|
317
317
|
library: Library at the Katz Center for Advanced Judaic Studies
|
|
318
318
|
display: Library at the Katz Center - Stacks Folio
|
|
319
319
|
cjsgf:
|
|
320
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
320
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
321
321
|
library:
|
|
322
322
|
- Special Collections
|
|
323
323
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
@@ -338,7 +338,7 @@ cjshur:
|
|
|
338
338
|
display: Library at the Katz Center - Hurowitz Collection
|
|
339
339
|
aeon: true
|
|
340
340
|
cjsincun:
|
|
341
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
341
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
342
342
|
library:
|
|
343
343
|
- Special Collections
|
|
344
344
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
@@ -351,7 +351,7 @@ cjsinproc:
|
|
|
351
351
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
352
352
|
display: Library at the Katz Center - Processing
|
|
353
353
|
cjsinprocn:
|
|
354
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
354
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
355
355
|
library:
|
|
356
356
|
- Special Collections
|
|
357
357
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
@@ -407,77 +407,77 @@ cjspergal:
|
|
|
407
407
|
library: Library at the Katz Center for Advanced Judaic Studies
|
|
408
408
|
display: Library at the Katz Center - Periodicals Gallery
|
|
409
409
|
cjsrar:
|
|
410
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
410
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
411
411
|
library:
|
|
412
412
|
- Special Collections
|
|
413
413
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
414
|
-
display: Library at the Katz Center - Rare Book Room
|
|
414
|
+
display: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
415
415
|
aeon: true
|
|
416
416
|
cjsraram:
|
|
417
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
417
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
418
418
|
library:
|
|
419
419
|
- Special Collections
|
|
420
420
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
421
421
|
display: Library at the Katz Center - Rare Book Americana
|
|
422
422
|
aeon: true
|
|
423
423
|
cjsrarbx1:
|
|
424
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
424
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
425
425
|
library:
|
|
426
426
|
- Special Collections
|
|
427
427
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
428
428
|
display: Library at the Katz Center - Rare Book Box 1
|
|
429
429
|
aeon: true
|
|
430
430
|
cjsrarbx2:
|
|
431
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
431
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
432
432
|
library:
|
|
433
433
|
- Special Collections
|
|
434
434
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
435
435
|
display: Library at the Katz Center - Rare Book Box 2
|
|
436
436
|
aeon: true
|
|
437
437
|
cjsrarbx3:
|
|
438
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
438
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
439
439
|
library:
|
|
440
440
|
- Special Collections
|
|
441
441
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
442
442
|
display: Library at the Katz Center - Rare Book Box 3
|
|
443
443
|
aeon: true
|
|
444
444
|
cjsrarbx4:
|
|
445
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
445
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
446
446
|
library:
|
|
447
447
|
- Special Collections
|
|
448
448
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
449
449
|
display: Library at the Katz Center - Rare Book Box 4
|
|
450
450
|
aeon: true
|
|
451
451
|
cjsrarfol:
|
|
452
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
452
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
453
453
|
library:
|
|
454
454
|
- Special Collections
|
|
455
455
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
456
456
|
display: Library at the Katz Center - Rare Book Folio
|
|
457
457
|
aeon: true
|
|
458
458
|
cjsrargiga:
|
|
459
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
459
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
460
460
|
library:
|
|
461
461
|
- Special Collections
|
|
462
462
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
463
463
|
display: Library at the Katz Center - Rare Book Giant
|
|
464
464
|
aeon: true
|
|
465
465
|
cjsrarmini:
|
|
466
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
466
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
467
467
|
library:
|
|
468
468
|
- Special Collections
|
|
469
469
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
470
470
|
display: Library at the Katz Center - Rare Book Miniature
|
|
471
471
|
aeon: true
|
|
472
472
|
cjsrarms:
|
|
473
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
473
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
474
474
|
library:
|
|
475
475
|
- Special Collections
|
|
476
476
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
477
477
|
display: Library at the Katz Center - Rare Book Manuscript
|
|
478
478
|
aeon: true
|
|
479
479
|
cjsrarover:
|
|
480
|
-
specific_location: Library at the Katz Center - Rare Book Room
|
|
480
|
+
specific_location: Library at the Katz Center - Ione Apfelbaum & Hilary Strauss Rare Book Room
|
|
481
481
|
library:
|
|
482
482
|
- Special Collections
|
|
483
483
|
- Library at the Katz Center for Advanced Judaic Studies
|
|
@@ -1384,12 +1384,11 @@ scteer:
|
|
|
1384
1384
|
display: Kislak Center for Special Collections - Teerink Collection
|
|
1385
1385
|
aeon: true
|
|
1386
1386
|
sctehon:
|
|
1387
|
-
specific_location:
|
|
1387
|
+
specific_location: LIBRA - Tehon Collection
|
|
1388
1388
|
library:
|
|
1389
1389
|
- Special Collections
|
|
1390
|
-
-
|
|
1391
|
-
|
|
1392
|
-
display: Kislak Center for Special Collections - Tehon Collection
|
|
1390
|
+
- LIBRA
|
|
1391
|
+
display: LIBRA - Tehon Collection
|
|
1393
1392
|
aeon: true
|
|
1394
1393
|
sctress:
|
|
1395
1394
|
specific_location: Kislak Center for Special Collections - Arthur Tress Collection
|
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.6
|
|
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-06-18 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: activesupport
|