pennmarc 1.2.0 → 1.2.2
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/title.rb +2 -0
- data/lib/pennmarc/mappings/locations.yml +10 -10
- data/lib/pennmarc/version.rb +1 -1
- data/spec/lib/pennmarc/helpers/title_spec.rb +12 -0
- 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: c48634bf726b824f79d9682b82973af5223035ff6e0a999ffb0a83d26f338893
|
4
|
+
data.tar.gz: 4b874bd557519dd16a898faaa4c74ef6415b0b489fbf1ed2082fb1956c4cfaa4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88c102ca50391a3f48076c626bdca735612ddc0ca33eb93c11b4268de1c896c90e12d342080c5a254a07267659f7855cc4ef2dc4ed03a329b57e313754cb6589
|
7
|
+
data.tar.gz: 3c02ea8c8e60fb51b89cdc55f4f7329602cf3d5af20434dda37b181f0db527bce20d4fdaf6fe0383d2f26c9a910d49935ffa0173c832d35c57837e446bca82b4
|
@@ -132,6 +132,8 @@ module PennMARC
|
|
132
132
|
# @return [String] title value for sorting
|
133
133
|
def sort(record)
|
134
134
|
title_field = record.fields('245').first
|
135
|
+
return unless title_field.present?
|
136
|
+
|
135
137
|
# attempt to get number of non-filing characters present, default to 0
|
136
138
|
offset = if /^[0-9]$/.match?(title_field.indicator2)
|
137
139
|
title_field.indicator2.to_i
|
@@ -62,9 +62,9 @@ britimp:
|
|
62
62
|
display: Athenaeum of Philadelphia - British Imprints
|
63
63
|
aeon: true
|
64
64
|
carpco:
|
65
|
-
specific_location:
|
66
|
-
library:
|
67
|
-
display:
|
65
|
+
specific_location: Carpenters' Company of the City and County of Philadelphia
|
66
|
+
library: Special Collections
|
67
|
+
display: Carpenters' Company of the City and County of Philadelphia
|
68
68
|
aeon: true
|
69
69
|
catoffice:
|
70
70
|
specific_location: Athenaeum of Philadelphia - Cataloging Office
|
@@ -160,12 +160,16 @@ vismatl:
|
|
160
160
|
aeon: true
|
161
161
|
athstor:
|
162
162
|
specific_location: LIBRA - Athenaeum of Philadelphia
|
163
|
-
library:
|
163
|
+
library:
|
164
|
+
- LIBRA
|
165
|
+
- Athenaeum of Philadelphia
|
164
166
|
display: LIBRA - Athenaeum of Philadelphia
|
165
167
|
aeon: true
|
166
168
|
athstorcir:
|
167
169
|
specific_location: LIBRA - Athenaeum of Philadelphia Circulating
|
168
|
-
library:
|
170
|
+
library:
|
171
|
+
- LIBRA
|
172
|
+
- Athenaeum of Philadelphia
|
169
173
|
display: LIBRA - Athenaeum of Philadelphia Circulating
|
170
174
|
biom:
|
171
175
|
specific_location: Holman Biotech Commons
|
@@ -594,10 +598,6 @@ dncirc:
|
|
594
598
|
- Health Sciences Libraries
|
595
599
|
- Levy Dental Medicine Library
|
596
600
|
display: Levy Dental Medicine Library - Circulation
|
597
|
-
easiacmx:
|
598
|
-
specific_location: Van Pelt - East Asia Comics
|
599
|
-
library: Van Pelt-Dietrich Library Center
|
600
|
-
display: Van Pelt - East Asia Comics
|
601
601
|
easiaover:
|
602
602
|
specific_location: Van Pelt - East Asia Oversize
|
603
603
|
library: Van Pelt-Dietrich Library Center
|
@@ -1597,7 +1597,7 @@ vpfeatdvd:
|
|
1597
1597
|
vpfolio:
|
1598
1598
|
specific_location: Van Pelt - Folios
|
1599
1599
|
library: Van Pelt-Dietrich Library Center
|
1600
|
-
display: Van Pelt
|
1600
|
+
display: Van Pelt - Folios
|
1601
1601
|
vpjuv:
|
1602
1602
|
specific_location: Van Pelt - Notable Juvenile Books
|
1603
1603
|
library: Van Pelt-Dietrich Library Center
|
data/lib/pennmarc/version.rb
CHANGED
@@ -209,6 +209,18 @@ describe 'PennMARC::Title' do
|
|
209
209
|
end
|
210
210
|
|
211
211
|
describe '.sort' do
|
212
|
+
context 'with no 245' do
|
213
|
+
let(:record) do
|
214
|
+
# Simulate a miscoded record
|
215
|
+
marc_record fields: [marc_field(tag: '246', indicator1: '1', indicator2: '4',
|
216
|
+
subfields: { a: 'The horn concertos', c: 'Mozart' })]
|
217
|
+
end
|
218
|
+
|
219
|
+
it 'returns nil' do
|
220
|
+
expect(helper.sort(record)).to be_nil
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
212
224
|
context 'with a record with a valid indicator2 value' do
|
213
225
|
let(:record) do
|
214
226
|
marc_record fields: [
|
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.2.
|
4
|
+
version: 1.2.2
|
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: 2024-
|
15
|
+
date: 2024-10-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: activesupport
|