pennmarc 1.0.9 → 1.0.11.pre1
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/.gitlab-ci.yml +72 -0
- data/Gemfile.lock +3 -0
- data/README.md +17 -19
- data/lib/pennmarc/enriched_marc.rb +2 -0
- data/lib/pennmarc/helpers/access.rb +2 -4
- data/lib/pennmarc/helpers/database.rb +3 -3
- data/lib/pennmarc/helpers/date.rb +2 -1
- data/lib/pennmarc/helpers/format.rb +20 -8
- data/lib/pennmarc/helpers/link.rb +2 -2
- data/lib/pennmarc/helpers/location.rb +6 -1
- data/lib/pennmarc/helpers/note.rb +5 -4
- data/lib/pennmarc/helpers/series.rb +2 -2
- data/lib/pennmarc/helpers/title.rb +3 -3
- data/lib/pennmarc/mappings/locations.yml +13 -197
- data/lib/pennmarc/version.rb +1 -1
- data/pennmarc.gemspec +1 -1
- data/spec/lib/pennmarc/helpers/access_spec.rb +2 -2
- data/spec/lib/pennmarc/helpers/database_spec.rb +10 -10
- data/spec/lib/pennmarc/helpers/format_spec.rb +25 -5
- data/spec/lib/pennmarc/helpers/link_spec.rb +6 -6
- data/spec/lib/pennmarc/helpers/location_spec.rb +12 -0
- data/spec/lib/pennmarc/helpers/note_spec.rb +2 -0
- data/spec/lib/pennmarc/helpers/series_spec.rb +8 -8
- data/spec/lib/pennmarc/helpers/title_spec.rb +6 -6
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 102f9a975e2d103cdec48de5ef76c1577216d1055f46893ca39ac40a9fd717aa
|
4
|
+
data.tar.gz: 759fef85e9a2f5cc69bd100cd8552912831c7f70df5066f52824ec51ab483e03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2fbd84b36717b7c24a3966a19912e59be09b258eea4d62f2905ff7f117786f0594a9a9e9a6da031c52e639bad2407efa5feeef65d092e991457a449e8a17259
|
7
|
+
data.tar.gz: 1297a465f711238695f9faace643c20d06f2a07e56ba641c239ee4af71db38c6a1067a073703f0898031cb76bad1c4c8668835d5970ab5f6fc58508af7596105
|
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
include:
|
2
|
+
- project: "devops/gitlab/ci-templates/ruby"
|
3
|
+
ref: "sans-dind"
|
4
|
+
file:
|
5
|
+
- ".rspec.yml"
|
6
|
+
- ".rubocop.yml"
|
7
|
+
- template: "Workflows/MergeRequest-Pipelines.gitlab-ci.yml"
|
8
|
+
|
9
|
+
stages:
|
10
|
+
- test
|
11
|
+
- deploy
|
12
|
+
|
13
|
+
rspec_app_test:
|
14
|
+
stage: test
|
15
|
+
image: ruby:3.2.2
|
16
|
+
before_script:
|
17
|
+
- bundle install -j $(nproc)
|
18
|
+
extends:
|
19
|
+
- .rspec
|
20
|
+
tags:
|
21
|
+
- build
|
22
|
+
|
23
|
+
rubocop_app_test:
|
24
|
+
stage: test
|
25
|
+
image: ruby:3.2.2
|
26
|
+
before_script:
|
27
|
+
- bundle install -j $(nproc)
|
28
|
+
extends:
|
29
|
+
- .rubocop
|
30
|
+
tags:
|
31
|
+
- build
|
32
|
+
allow_failure: true
|
33
|
+
|
34
|
+
# This step was inspired from Gitlab's example of gem publication:
|
35
|
+
# https://gitlab.com/gitlab-org/quality/pipeline-common/-/blob/master/ci/gem-release.yml
|
36
|
+
gem_publication:
|
37
|
+
stage: deploy
|
38
|
+
image: ruby:3.2.2
|
39
|
+
variables:
|
40
|
+
GEMSPEC_FILE: "${CI_PROJECT_NAME}.gemspec"
|
41
|
+
VAULT_VERSION: "1.10.1"
|
42
|
+
before_script:
|
43
|
+
- |
|
44
|
+
apt-get update && apt-get -y install \
|
45
|
+
wget \
|
46
|
+
unzip && \
|
47
|
+
wget https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip -O /tmp/vault_${VAULT_VERSION}.zip && \
|
48
|
+
unzip /tmp/vault_${VAULT_VERSION}.zip -d /usr/bin && \
|
49
|
+
rm -fr /tmp/vault_${VAULT_VERSION}.zip && \
|
50
|
+
apt-get remove -y wget unzip && \
|
51
|
+
apt-get clean
|
52
|
+
- export VAULT_ADDR=${VAULT_URL}
|
53
|
+
- export VAULT_TOKEN="$(vault write -field=token auth/jwt/${CI_SERVER_HOST}/login role=${JWT_ROLE} jwt=${CI_JOB_JWT})"
|
54
|
+
- export GEM_HOST_API_KEY="$(vault kv get -field=rubygems_api_key ${VAULT_KV_ENDPOINT}${ENVIRONMENT})"
|
55
|
+
- |
|
56
|
+
gem -v
|
57
|
+
rm -f ./*.gem
|
58
|
+
[ -f "${GEMSPEC_FILE}" ] || (echo "No ${GEMSPEC_FILE} file found!" && exit 1)
|
59
|
+
- '[ -n "${GEM_HOST_API_KEY}" ] || (echo "GEM_HOST_API_KEY is not set!" && exit 1)'
|
60
|
+
script:
|
61
|
+
- GEM_FILE=$(echo "${CI_PROJECT_NAME}-${CI_COMMIT_TAG:1}.gem")
|
62
|
+
- |
|
63
|
+
gem build "${GEMSPEC_FILE}"
|
64
|
+
[ -f "${GEM_FILE}" ] || (echo "No ${GEM_FILE} file found!" && exit 1)
|
65
|
+
- '[ "${DISABLE_GEM_PUSH}" == "true" ] || gem push "${GEM_FILE}"'
|
66
|
+
rules:
|
67
|
+
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+(\.[a-zA-Z0-9]+)?$/
|
68
|
+
artifacts:
|
69
|
+
paths:
|
70
|
+
- "*.gem"
|
71
|
+
tags:
|
72
|
+
- deploy
|
data/Gemfile.lock
CHANGED
@@ -23,6 +23,8 @@ GEM
|
|
23
23
|
racc (~> 1.4)
|
24
24
|
nokogiri (1.15.2-x64-mingw-ucrt)
|
25
25
|
racc (~> 1.4)
|
26
|
+
nokogiri (1.15.2-x86_64-darwin)
|
27
|
+
racc (~> 1.4)
|
26
28
|
nokogiri (1.15.2-x86_64-linux)
|
27
29
|
racc (~> 1.4)
|
28
30
|
parallel (1.23.0)
|
@@ -104,6 +106,7 @@ PLATFORMS
|
|
104
106
|
arm64-darwin-21
|
105
107
|
arm64-darwin-22
|
106
108
|
x64-mingw-ucrt
|
109
|
+
x86_64-darwin-21
|
107
110
|
x86_64-linux
|
108
111
|
|
109
112
|
DEPENDENCIES
|
data/README.md
CHANGED
@@ -71,22 +71,20 @@ rspec
|
|
71
71
|
|
72
72
|
## Publishing the Gem
|
73
73
|
|
74
|
-
1. Update the `VERSION` constant in
|
75
|
-
2.
|
76
|
-
3.
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
- rubocop check
|
92
|
-
- rdoc/yard coverage checks?
|
74
|
+
1. Update the `VERSION` constant in [lib/pennmarc/version.rb](lib/pennmarc/version.rb) following this gem's versioning pattern (ex 1.1.0).
|
75
|
+
2. Merge the change into `main`.
|
76
|
+
3. Create a Gitlab Release:
|
77
|
+
1. Go to https://gitlab.library.upenn.edu/dld/catalog/pennmarc/-/releases/new
|
78
|
+
2. Create a new tag that matches the version set in step 1 (ex: v1.1.0).
|
79
|
+
3. Add a release title that is the same as the tag name.
|
80
|
+
4. Submit by clicking "Create Release".
|
81
|
+
4. Once the release is created a pipeline will run to publish the gem to RubyGems.
|
82
|
+
|
83
|
+
### Versioning Guidelines
|
84
|
+
|
85
|
+
We do not explicitly follow [Semantic Versioning](https://semver.org/) principles, but follow it's general principles.
|
86
|
+
In common cases, here's what to do:
|
87
|
+
|
88
|
+
- Increment **MAJOR_VERSION** if the `Parser` class functionality is modified in a breaking fashion.
|
89
|
+
- Increment **MINOR_VERSION** if a `Helper` class is renamed, or if an existing helper method is renamed.
|
90
|
+
- Increment **PATCH_VERSION** if a new `Helper` class or method is added, of if any non-breaking bugfix is made.
|
@@ -5,8 +5,6 @@ module PennMARC
|
|
5
5
|
class Access < Helper
|
6
6
|
ONLINE = 'Online'
|
7
7
|
AT_THE_LIBRARY = 'At the library'
|
8
|
-
ELEC_AVAILABILITY_TAG = 'AVE'
|
9
|
-
PHYS_AVAILABILITY_TAG = 'AVA'
|
10
8
|
|
11
9
|
class << self
|
12
10
|
# Based on enhanced metadata fields added by Alma publishing process or API, determine if the record has
|
@@ -35,14 +33,14 @@ module PennMARC
|
|
35
33
|
# @param [MARC::Field] field
|
36
34
|
# @return [Boolean]
|
37
35
|
def electronic_holding_tag?(field)
|
38
|
-
field.tag.in? [EnrichedMarc::TAG_ELECTRONIC_INVENTORY,
|
36
|
+
field.tag.in? [EnrichedMarc::TAG_ELECTRONIC_INVENTORY, EnrichedMarc::AlmaApi::TAG_ELECTRONIC_INVENTORY]
|
39
37
|
end
|
40
38
|
|
41
39
|
# Does the record have added physical holding info?
|
42
40
|
# @param [MARC::Field] field
|
43
41
|
# @return [Boolean]
|
44
42
|
def physical_holding_tag?(field)
|
45
|
-
field.tag.in? [EnrichedMarc::TAG_HOLDING,
|
43
|
+
field.tag.in? [EnrichedMarc::TAG_HOLDING, EnrichedMarc::AlmaApi::TAG_PHYSICAL_INVENTORY]
|
46
44
|
end
|
47
45
|
|
48
46
|
# Check if a record contains an 856 entry for an online finding aid, meeting these criteria:
|
@@ -18,7 +18,7 @@ module PennMARC
|
|
18
18
|
# local field 944}. Only returns database subtype if Penn's Database facet value is present in subfield 'a'.
|
19
19
|
# @param [Marc::Record]
|
20
20
|
# @return [Array<string>] Array of types
|
21
|
-
def
|
21
|
+
def type_facet(record)
|
22
22
|
record.fields('944').filter_map do |field|
|
23
23
|
# skip unless specified database format type present
|
24
24
|
next unless subfield_value?(field, 'a', /#{DATABASES_FACET_VALUE}/o)
|
@@ -34,7 +34,7 @@ module PennMARC
|
|
34
34
|
# subfield '2'.
|
35
35
|
# @param [Marc::Record]
|
36
36
|
# @return [Array<string>] Array of categories
|
37
|
-
def
|
37
|
+
def category_facet(record)
|
38
38
|
return [] unless curated_db?(record)
|
39
39
|
|
40
40
|
record.fields('943').filter_map do |field|
|
@@ -55,7 +55,7 @@ module PennMARC
|
|
55
55
|
# an empty array.
|
56
56
|
# @param [Marc::Record]
|
57
57
|
# @return [Array<string>] Array of "category--subcategory"
|
58
|
-
def
|
58
|
+
def subcategory_facet(record)
|
59
59
|
return [] unless curated_db?(record)
|
60
60
|
|
61
61
|
record.fields('943').filter_map do |field|
|
@@ -20,7 +20,8 @@ module PennMARC
|
|
20
20
|
end
|
21
21
|
|
22
22
|
# Retrieve date added (subfield 'q') from enriched marc 'itm' field.
|
23
|
-
# {PennMARC::EnrichedMarc} maps enriched marc fields and subfields created during Alma publishing.
|
23
|
+
# {PennMARC::EnrichedMarc} maps enriched marc fields and subfields created during Alma publishing. The enriched
|
24
|
+
# metadata provided by the Alma API does not include the date created value, so we can't work with that here.
|
24
25
|
# @param [MARC::Record] record
|
25
26
|
# @return [DateTime, nil] The date added, or nil if date found in record is invalid
|
26
27
|
def added(record)
|
@@ -80,13 +80,6 @@ module PennMARC
|
|
80
80
|
title_medium = subfield_values_for tag: '245', subfield: :h, record: record
|
81
81
|
media_type = subfield_values_for tag: '337', subfield: :a, record: record
|
82
82
|
|
83
|
-
# Get Call Number for holdings - ǂh gives us the 'Classification part' which can contain strings like
|
84
|
-
# 'Microfilm'
|
85
|
-
call_nums = record.fields(EnrichedMarc::TAG_HOLDING).map do |field|
|
86
|
-
join_subfields(field, &subfield_in?([EnrichedMarc::SUB_HOLDING_CLASSIFICATION_PART,
|
87
|
-
EnrichedMarc::SUB_HOLDING_ITEM_PART]))
|
88
|
-
end
|
89
|
-
|
90
83
|
# get all specific_location values from inventory info
|
91
84
|
locations = Location.location record: record, location_map: location_map,
|
92
85
|
display_value: :specific_location
|
@@ -95,7 +88,7 @@ module PennMARC
|
|
95
88
|
formats << MANUSCRIPT
|
96
89
|
elsif archives_but_not_cajs_or_nursing?(locations)
|
97
90
|
formats << ARCHIVE
|
98
|
-
elsif micro_or_microform?(call_nums, locations, media_type, title_medium)
|
91
|
+
elsif micro_or_microform?(call_nums(record), locations, media_type, title_medium)
|
99
92
|
formats << MICROFORMAT
|
100
93
|
else
|
101
94
|
# any of these
|
@@ -167,6 +160,25 @@ module PennMARC
|
|
167
160
|
|
168
161
|
private
|
169
162
|
|
163
|
+
# Get Call Numbers for holdings using the 'Classification part' which can contain strings like
|
164
|
+
# 'Microfilm'. Look in enriched tags used by both Alma Publishing and API.
|
165
|
+
# @param [MARC::Record] record
|
166
|
+
# @return [Array]
|
167
|
+
def call_nums(record)
|
168
|
+
if field_defined?(record, EnrichedMarc::TAG_HOLDING)
|
169
|
+
record.fields(EnrichedMarc::TAG_HOLDING).map do |field|
|
170
|
+
join_subfields(field, &subfield_in?([EnrichedMarc::SUB_HOLDING_CLASSIFICATION_PART,
|
171
|
+
EnrichedMarc::SUB_HOLDING_ITEM_PART]))
|
172
|
+
end
|
173
|
+
elsif field_defined?(record, EnrichedMarc::AlmaApi::TAG_PHYSICAL_INVENTORY)
|
174
|
+
record.fields(EnrichedMarc::AlmaApi::TAG_PHYSICAL_INVENTORY).map do |field|
|
175
|
+
join_subfields(field, &subfield_in?([EnrichedMarc::AlmaApi::SUB_PHYSICAL_CALL_NUMBER_TYPE]))
|
176
|
+
end
|
177
|
+
else
|
178
|
+
[]
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
170
182
|
# Get 'Curated' format from.
|
171
183
|
# {https://upennlibrary.atlassian.net/wiki/spaces/ALMA/pages/323912493/Local+9XX+Field+Use+in+Alma local field
|
172
184
|
# 944} ǂa, as long as it is not a numerical value.
|
@@ -13,7 +13,7 @@ module PennMARC
|
|
13
13
|
# Full text links from MARC 856 fields.
|
14
14
|
# @param [MARC::Record] record
|
15
15
|
# @return [Array] array of hashes
|
16
|
-
def
|
16
|
+
def full_text_links(record)
|
17
17
|
indicator2_options = %w[0 1]
|
18
18
|
links_from_record(record, indicator2_options)
|
19
19
|
end
|
@@ -21,7 +21,7 @@ module PennMARC
|
|
21
21
|
# Web text links from MARC 856 fields.
|
22
22
|
# @param [MARC::Record] record
|
23
23
|
# @return [Array] array of hashes
|
24
|
-
def
|
24
|
+
def web_links(record)
|
25
25
|
indicator2_options = ['2', ' ', '']
|
26
26
|
links_from_record(record, indicator2_options)
|
27
27
|
end
|
@@ -85,9 +85,14 @@ module PennMARC
|
|
85
85
|
tag = PennMARC::EnrichedMarc::TAG_HOLDING
|
86
86
|
subfield_code = PennMARC::EnrichedMarc::SUB_HOLDING_SHELVING_LOCATION
|
87
87
|
|
88
|
-
if record
|
88
|
+
# if the record has an enriched item field present, use it
|
89
|
+
if field_defined?(record, PennMARC::EnrichedMarc::TAG_ITEM)
|
89
90
|
tag = PennMARC::EnrichedMarc::TAG_ITEM
|
90
91
|
subfield_code = PennMARC::EnrichedMarc::SUB_ITEM_CURRENT_LOCATION
|
92
|
+
# otherwise, use the api enriched field value
|
93
|
+
elsif field_defined?(record, EnrichedMarc::AlmaApi::TAG_PHYSICAL_INVENTORY)
|
94
|
+
tag = EnrichedMarc::AlmaApi::TAG_PHYSICAL_INVENTORY
|
95
|
+
subfield_code = EnrichedMarc::AlmaApi::SUB_HOLDING_LOCATION_CODE
|
91
96
|
end
|
92
97
|
|
93
98
|
{ tag: tag, subfield_code: subfield_code }
|
@@ -6,15 +6,16 @@ module PennMARC
|
|
6
6
|
class << self
|
7
7
|
# Retrieve notes for display from fields {https://www.oclc.org/bibformats/en/5xx/500.html 500},
|
8
8
|
# {https://www.oclc.org/bibformats/en/5xx/502.html 502}, {https://www.oclc.org/bibformats/en/5xx/504.html 504},
|
9
|
-
# {https://www.oclc.org/bibformats/en/5xx/515.html 515}, {https://www.oclc.org/bibformats/en/5xx/518.html 518}
|
9
|
+
# {https://www.oclc.org/bibformats/en/5xx/515.html 515}, {https://www.oclc.org/bibformats/en/5xx/518.html 518},
|
10
10
|
# {https://www.oclc.org/bibformats/en/5xx/525.html 525}, {https://www.oclc.org/bibformats/en/5xx/533.html 533},
|
11
|
-
# {https://www.oclc.org/bibformats/en/5xx/
|
12
|
-
# {https://www.oclc.org/bibformats/en/5xx/
|
11
|
+
# {https://www.oclc.org/bibformats/en/5xx/540.html 540}, {https://www.oclc.org/bibformats/en/5xx/550.html 550},
|
12
|
+
# {https://www.oclc.org/bibformats/en/5xx/580.html 580}, {https://www.oclc.org/bibformats/en/5xx/586.html 586},
|
13
|
+
# {https://www.oclc.org/bibformats/en/5xx/588.html 588}
|
13
14
|
# and their linked alternates.
|
14
15
|
# @param [MARC::Record] record
|
15
16
|
# @return [Array<String>]
|
16
17
|
def notes_show(record)
|
17
|
-
notes_fields = %w[500 502 504 515 518 525 533 550 580 586 588]
|
18
|
+
notes_fields = %w[500 502 504 515 518 525 533 540 550 580 586 588]
|
18
19
|
record.fields(notes_fields + ['880']).filter_map do |field|
|
19
20
|
next if field.tag == '880' && subfield_value_not_in?(field, '6', notes_fields)
|
20
21
|
|
@@ -84,7 +84,7 @@ module PennMARC
|
|
84
84
|
# https://www.loc.gov/marc/bibliographic/bd780.html
|
85
85
|
# @param [MARC::Record] record
|
86
86
|
# @return [String] continues fields string
|
87
|
-
def
|
87
|
+
def get_continues_show(record)
|
88
88
|
continues(record, '780')
|
89
89
|
end
|
90
90
|
|
@@ -94,7 +94,7 @@ module PennMARC
|
|
94
94
|
# https://www.loc.gov/marc/bibliographic/bd785.html
|
95
95
|
# @param [MARC::Record] record
|
96
96
|
# @return [String] continued by fields string
|
97
|
-
def
|
97
|
+
def get_continued_by_show(record)
|
98
98
|
continues(record, '785')
|
99
99
|
end
|
100
100
|
|
@@ -149,7 +149,7 @@ module PennMARC
|
|
149
149
|
# title browse and we will not be supporting that at this time
|
150
150
|
# @param [MARC::Record] record
|
151
151
|
# @return [Array<String>] Array of standardized titles as strings
|
152
|
-
def
|
152
|
+
def standardized_show(record)
|
153
153
|
standardized_titles = record.fields(%w[130 240]).map do |field|
|
154
154
|
join_subfields(field, &subfield_not_in?(%w[0 6 8 e w]))
|
155
155
|
end
|
@@ -177,7 +177,7 @@ module PennMARC
|
|
177
177
|
#
|
178
178
|
# @param [MARC::Record] record
|
179
179
|
# @return [Array<String>] Array of other titles as strings
|
180
|
-
def
|
180
|
+
def other_show(record)
|
181
181
|
other_titles = record.fields('246').map do |field|
|
182
182
|
join_subfields(field, &subfield_not_in?(%w[6 8]))
|
183
183
|
end
|
@@ -202,7 +202,7 @@ module PennMARC
|
|
202
202
|
# @todo what are e and w subfields?
|
203
203
|
# @param [MARC::Record] record
|
204
204
|
# @return [Array<String>] array of former titles
|
205
|
-
def
|
205
|
+
def former_show(record)
|
206
206
|
record.fields
|
207
207
|
.filter_map do |field|
|
208
208
|
next unless field.tag == '247' || (field.tag == '880' && subfield_value?(field, '6', /^247/))
|
@@ -1,8 +1,4 @@
|
|
1
1
|
---
|
2
|
-
3eastelev:
|
3
|
-
specific_location: Van Pelt - third floor east elevator lobby
|
4
|
-
library: Van Pelt-Dietrich Library Center
|
5
|
-
display: Van Pelt - third floor east elevator lobby
|
6
2
|
afro:
|
7
3
|
specific_location: Van Pelt - Africana Studies Resource Room
|
8
4
|
library: Van Pelt-Dietrich Library Center
|
@@ -177,12 +173,6 @@ biomlibr:
|
|
177
173
|
- Health Sciences Libraries
|
178
174
|
- Holman Biotech Commons
|
179
175
|
display: Holman Biotech Commons - Librarian's Office
|
180
|
-
biomonli:
|
181
|
-
specific_location: Holman Biotech Commons - Online Office
|
182
|
-
library:
|
183
|
-
- Health Sciences Libraries
|
184
|
-
- Holman Biotech Commons
|
185
|
-
display: Holman Biotech Commons - Online Office
|
186
176
|
biomperi:
|
187
177
|
specific_location: Holman Biotech Commons - Periodicals
|
188
178
|
library:
|
@@ -550,10 +540,6 @@ dncirc:
|
|
550
540
|
- Health Sciences Libraries
|
551
541
|
- Levy Dental Medicine Library
|
552
542
|
display: Levy Dental Medicine Library - Circulation
|
553
|
-
easiacom:
|
554
|
-
specific_location: Van Pelt - East Asia Compact Shelving
|
555
|
-
library: Van Pelt-Dietrich Library Center
|
556
|
-
display: Van Pelt - East Asia Compact Shelving
|
557
543
|
easiacmx:
|
558
544
|
specific_location: Van Pelt - East Asia Comics
|
559
545
|
library: Van Pelt-Dietrich Library Center
|
@@ -576,40 +562,6 @@ edcomm:
|
|
576
562
|
- Van Pelt-Dietrich Library Center
|
577
563
|
- Education Commons
|
578
564
|
display: Education Commons
|
579
|
-
engi:
|
580
|
-
specific_location: Engineering Library
|
581
|
-
library: Engineering Library
|
582
|
-
display: Engineering Library
|
583
|
-
engicirc:
|
584
|
-
specific_location: Engineering Library - Circulation Desk
|
585
|
-
library: Engineering Library
|
586
|
-
display: Engineering Library - Circulation Desk
|
587
|
-
enginewbk:
|
588
|
-
specific_location: Engineering Library - New Book
|
589
|
-
library: Engineering Library
|
590
|
-
display: Engineering Library - New Book
|
591
|
-
engiperi:
|
592
|
-
specific_location: Engineering Library - Periodicals
|
593
|
-
library: Engineering Library
|
594
|
-
display: Engineering Library - Periodicals (alphabetical by title)
|
595
|
-
engirefe:
|
596
|
-
specific_location: Engineering Library - Reference
|
597
|
-
library: Engineering Library
|
598
|
-
display: Engineering Library - Reference
|
599
|
-
engirese:
|
600
|
-
specific_location: Engineering Library - Reserve
|
601
|
-
library:
|
602
|
-
- Engineering Library
|
603
|
-
- Reserve
|
604
|
-
display: Engineering Library - Reserve
|
605
|
-
engsc:
|
606
|
-
specific_location: Engineering Library - Study Collection
|
607
|
-
library: Engineering Library
|
608
|
-
display: Engineering Library - Study Collection
|
609
|
-
eres:
|
610
|
-
specific_location:
|
611
|
-
library:
|
612
|
-
display: E-reserves
|
613
565
|
fanewbook:
|
614
566
|
specific_location: Fisher Fine Arts Library - New Book Display
|
615
567
|
library: Fisher Fine Arts Library
|
@@ -684,10 +636,6 @@ finestudio:
|
|
684
636
|
specific_location: Fisher Fine Arts Library - Studio Collection
|
685
637
|
library: Fisher Fine Arts Library
|
686
638
|
display: Fine Arts Library - Studio Collection
|
687
|
-
HARR:
|
688
|
-
specific_location:
|
689
|
-
library:
|
690
|
-
display:
|
691
639
|
judaica:
|
692
640
|
specific_location: Van Pelt - Judaica and Ancient Near East Resource Room
|
693
641
|
library: Van Pelt-Dietrich Library Center
|
@@ -822,20 +770,6 @@ mideastres:
|
|
822
770
|
- Van Pelt-Dietrich Library Center
|
823
771
|
- Reserve
|
824
772
|
display: Van Pelt - Middle East Seminar Reserve
|
825
|
-
moor:
|
826
|
-
specific_location: Engineering Library
|
827
|
-
library: Engineering Library
|
828
|
-
display: Engineering Library
|
829
|
-
moorrefe:
|
830
|
-
specific_location: Engineering Library - Reference
|
831
|
-
library: Engineering Library
|
832
|
-
display: Engineering Library - Reference
|
833
|
-
moorrese:
|
834
|
-
specific_location: Engineering Library - Reserve
|
835
|
-
library:
|
836
|
-
- Engineering Library
|
837
|
-
- Reserve
|
838
|
-
display: Engineering Library - Reserve
|
839
773
|
muse:
|
840
774
|
specific_location: Penn Museum Library
|
841
775
|
library: Penn Museum Library
|
@@ -876,6 +810,10 @@ musemedia:
|
|
876
810
|
specific_location: Penn Museum Library - Media
|
877
811
|
library: Penn Museum Library
|
878
812
|
display: Penn Museum Library - Media
|
813
|
+
musenewbk:
|
814
|
+
specific_location: Penn Museum Library - New Books Display
|
815
|
+
library: Penn Museum Library
|
816
|
+
display: Penn Museum Library - New Books Display
|
879
817
|
muserefe:
|
880
818
|
specific_location: Penn Museum Library - Reference
|
881
819
|
library: Penn Museum Library
|
@@ -965,83 +903,6 @@ nursarch:
|
|
965
903
|
specific_location: Nursing Archives
|
966
904
|
library: Nursing Archives
|
967
905
|
display: Barbara Bates Center for History of Nursing - Fagin Hall 2U
|
968
|
-
oobiom:
|
969
|
-
specific_location: On Order
|
970
|
-
library:
|
971
|
-
- Health Sciences Libraries
|
972
|
-
- Holman Biotech Commons
|
973
|
-
display: Ordered for Holman Biotech Commons
|
974
|
-
oochem:
|
975
|
-
specific_location: On Order
|
976
|
-
library: Chemistry Library
|
977
|
-
display: Ordered for Chemistry Library
|
978
|
-
oocjs:
|
979
|
-
specific_location: On Order
|
980
|
-
library: Library at the Katz Center for Advanced Judaic Studies
|
981
|
-
display: Ordered for Center for Judaic Studies Library
|
982
|
-
oodental:
|
983
|
-
specific_location: On Order
|
984
|
-
library:
|
985
|
-
- Health Sciences Libraries
|
986
|
-
- Levy Dental Medicine Library
|
987
|
-
display: Ordered for Levy Dental Medicine Library
|
988
|
-
ooeastasia:
|
989
|
-
specific_location: On Order
|
990
|
-
library: Van Pelt-Dietrich Library Center
|
991
|
-
display: Ordered for East Asia
|
992
|
-
ooengi:
|
993
|
-
specific_location: On Order
|
994
|
-
library: Engineering Library
|
995
|
-
display: Ordered for Engineering Library
|
996
|
-
oofine:
|
997
|
-
specific_location: On Order
|
998
|
-
library: Fisher Fine Arts Library
|
999
|
-
display: Ordered for Fine Arts Library
|
1000
|
-
oolipp:
|
1001
|
-
specific_location: On Order
|
1002
|
-
library: Lippincott Library
|
1003
|
-
display: Ordered for Lippincott Library
|
1004
|
-
oomath:
|
1005
|
-
specific_location: On Order
|
1006
|
-
library: Math/Physics/Astronomy Library
|
1007
|
-
display: Ordered for Math-Physics-Astronomy Library
|
1008
|
-
oomuse:
|
1009
|
-
specific_location: On Order
|
1010
|
-
library: Penn Museum Library
|
1011
|
-
display: Ordered for Museum Library
|
1012
|
-
oomusic:
|
1013
|
-
specific_location: On Order
|
1014
|
-
library: Van Pelt-Dietrich Library Center
|
1015
|
-
display: Ordered for Music Library
|
1016
|
-
oonewbolt:
|
1017
|
-
specific_location: On Order
|
1018
|
-
library:
|
1019
|
-
- Health Sciences Libraries
|
1020
|
-
- Veterinary
|
1021
|
-
- 'Veterinary: du Pont Library (New Bolton)'
|
1022
|
-
display: Ordered for New Bolton Library
|
1023
|
-
ooormandy:
|
1024
|
-
specific_location: On Order
|
1025
|
-
library: Van Pelt-Dietrich Library Center
|
1026
|
-
display: Ordered for Ormandy Center
|
1027
|
-
oostor:
|
1028
|
-
specific_location: On Order
|
1029
|
-
library: LIBRA
|
1030
|
-
display: Ordered for LIBRA
|
1031
|
-
oovanp:
|
1032
|
-
specific_location: On Order
|
1033
|
-
library: Van Pelt-Dietrich Library Center
|
1034
|
-
display: Ordered for Van Pelt Library
|
1035
|
-
oovete:
|
1036
|
-
specific_location: On Order
|
1037
|
-
library:
|
1038
|
-
- Health Sciences Libraries
|
1039
|
-
- Veterinary
|
1040
|
-
display: 'Ordered for Veterinary: Atwood Library (Campus)'
|
1041
|
-
ooyarn:
|
1042
|
-
specific_location: On Order
|
1043
|
-
library: Yarnall Collection
|
1044
|
-
display: Ordered for Yarnall collection
|
1045
906
|
pah:
|
1046
907
|
specific_location: Pennsylvania Hospital Library
|
1047
908
|
library:
|
@@ -1108,24 +969,6 @@ religious:
|
|
1108
969
|
specific_location: Van Pelt - Medieval Studies Resource Room
|
1109
970
|
library: Van Pelt-Dietrich Library Center
|
1110
971
|
display: Van Pelt - Medieval Studies Resource Room (405)
|
1111
|
-
rosedesk:
|
1112
|
-
specific_location: Van Pelt - Rosengarten Reserve
|
1113
|
-
library:
|
1114
|
-
- Van Pelt-Dietrich Library Center
|
1115
|
-
- Reserve
|
1116
|
-
display: Van Pelt - Rosengarten Reserve Desk
|
1117
|
-
roserefe:
|
1118
|
-
specific_location: Van Pelt - Rosengarten Reserve
|
1119
|
-
library:
|
1120
|
-
- Van Pelt-Dietrich Library Center
|
1121
|
-
- Reserve
|
1122
|
-
display: Van Pelt - Rosengarten Reserve Reference
|
1123
|
-
roserese:
|
1124
|
-
specific_location: Van Pelt - Rosengarten Reserve
|
1125
|
-
library:
|
1126
|
-
- Van Pelt-Dietrich Library Center
|
1127
|
-
- Reserve
|
1128
|
-
display: Van Pelt - Rosengarten Reserve
|
1129
972
|
rotc:
|
1130
973
|
specific_location:
|
1131
974
|
library:
|
@@ -1526,41 +1369,14 @@ scrunning:
|
|
1526
1369
|
- Special Collections
|
1527
1370
|
- LIBRA
|
1528
1371
|
display: LIBRA Running Press Collection
|
1529
|
-
sw3rdfl:
|
1530
|
-
specific_location: Van Pelt - Temporarily shelved on third floor southwest corner
|
1531
|
-
library: Van Pelt-Dietrich Library Center
|
1532
|
-
display: Van Pelt - Temporarily shelved on third floor southwest corner
|
1533
|
-
refsw3rdfl:
|
1534
|
-
specific_location: Van Pelt - Temporarily shelved on third floor southwest reference
|
1535
|
-
corner
|
1536
|
-
library: Van Pelt-Dietrich Library Center
|
1537
|
-
display: Van Pelt - Temporarily shelved on third floor southwest reference corner
|
1538
|
-
town:
|
1539
|
-
specific_location: Engineering Library
|
1540
|
-
library: Engineering Library
|
1541
|
-
display: Engineering Library
|
1542
|
-
townrefe:
|
1543
|
-
specific_location: Engineering Library - Reference
|
1544
|
-
library: Engineering Library
|
1545
|
-
display: Engineering Library - Reference
|
1546
|
-
townrese:
|
1547
|
-
specific_location: Engineering Library - Reserve
|
1548
|
-
library:
|
1549
|
-
- Engineering Library
|
1550
|
-
- Reserve
|
1551
|
-
display: Engineering Library - Reserve
|
1552
|
-
townthes:
|
1553
|
-
specific_location: Engineering Library - Theses
|
1554
|
-
library: Engineering Library
|
1555
|
-
display: Engineering Library - Theses
|
1556
|
-
twcirc:
|
1557
|
-
specific_location:
|
1558
|
-
library: Engineering Library
|
1559
|
-
display: Engineering Library - Circulation Desk
|
1560
1372
|
univarch:
|
1561
1373
|
specific_location: University Archives
|
1562
1374
|
library: University Archives
|
1563
1375
|
display: University Archives
|
1376
|
+
RDDSXBooks:
|
1377
|
+
specific_location: Van Pelt - RDDSX Books
|
1378
|
+
library: Van Pelt-Dietrich Library Center
|
1379
|
+
display: Van Pelt - RDDSX Books
|
1564
1380
|
vanp:
|
1565
1381
|
specific_location: Van Pelt - Stacks
|
1566
1382
|
library: Van Pelt-Dietrich Library Center
|
@@ -1577,14 +1393,14 @@ vanpcgc:
|
|
1577
1393
|
specific_location: Van Pelt - Center for Global Collections
|
1578
1394
|
library: Van Pelt-Dietrich Library Center
|
1579
1395
|
display: Van Pelt - Center for Global Collections
|
1396
|
+
vanpcgccm:
|
1397
|
+
specific_location: Van Pelt - Global Comics Collection
|
1398
|
+
library: Van Pelt-Dietrich Library Center
|
1399
|
+
display: Van Pelt - Global Comics Collection
|
1580
1400
|
vanpmicro:
|
1581
1401
|
specific_location: Van Pelt - Microtext
|
1582
1402
|
library: Van Pelt-Dietrich Library Center
|
1583
1403
|
display: Van Pelt - Microtext
|
1584
|
-
vanpmiddle:
|
1585
|
-
specific_location:
|
1586
|
-
library:
|
1587
|
-
display: Van Pelt - Middle East Tech Services
|
1588
1404
|
vanpNoCirc:
|
1589
1405
|
specific_location: Van Pelt - Non Circulating
|
1590
1406
|
library: Van Pelt-Dietrich Library Center
|
@@ -1798,4 +1614,4 @@ hspref:
|
|
1798
1614
|
hspstafref:
|
1799
1615
|
specific_location: Historical Society of Pennsylvania - Staff Reference
|
1800
1616
|
library: Historical Society of Pennsylvania
|
1801
|
-
display: Historical Society of Pennsylvania - Staff Reference
|
1617
|
+
display: Historical Society of Pennsylvania - Staff Reference
|
data/lib/pennmarc/version.rb
CHANGED
data/pennmarc.gemspec
CHANGED
@@ -18,7 +18,7 @@ describe 'PennMARC::Access' do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
context 'with enrichment with availability info via the Alma API' do
|
21
|
-
let(:tag) { PennMARC::
|
21
|
+
let(:tag) { PennMARC::EnrichedMarc::AlmaApi::TAG_ELECTRONIC_INVENTORY }
|
22
22
|
|
23
23
|
it 'returns expected access value' do
|
24
24
|
expect(helper.facet(record)).to contain_exactly(PennMARC::Access::ONLINE)
|
@@ -38,7 +38,7 @@ describe 'PennMARC::Access' do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
context 'with enrichment with availability info via the Alma API' do
|
41
|
-
let(:tag) { PennMARC::
|
41
|
+
let(:tag) { PennMARC::EnrichedMarc::AlmaApi::TAG_PHYSICAL_INVENTORY }
|
42
42
|
|
43
43
|
it 'returns expected access value' do
|
44
44
|
expect(helper.facet(record)).to contain_exactly(PennMARC::Access::AT_THE_LIBRARY)
|
@@ -21,39 +21,39 @@ describe 'PennMARC::Database' do
|
|
21
21
|
])
|
22
22
|
end
|
23
23
|
|
24
|
-
describe '.
|
24
|
+
describe '.type_facet' do
|
25
25
|
it 'returns database types' do
|
26
|
-
expect(helper.
|
27
|
-
|
26
|
+
expect(helper.type_facet(record)).to contain_exactly('Dictionaries and Thesauri (language based)',
|
27
|
+
'Reference and Handbooks')
|
28
28
|
end
|
29
29
|
|
30
30
|
context 'with uncurated database' do
|
31
31
|
it 'returns empty array' do
|
32
|
-
expect(helper.
|
32
|
+
expect(helper.type_facet(record_uncurated_db)).to be_empty
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
-
describe '.
|
37
|
+
describe '.category_facet' do
|
38
38
|
it 'returns database categories' do
|
39
|
-
expect(helper.
|
39
|
+
expect(helper.category_facet(record)).to contain_exactly('Humanities', 'Social Sciences')
|
40
40
|
end
|
41
41
|
|
42
42
|
context 'with uncurated database' do
|
43
43
|
it 'returns empty array' do
|
44
|
-
expect(helper.
|
44
|
+
expect(helper.category_facet(record_uncurated_db)).to be_empty
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
|
-
describe '.
|
49
|
+
describe '.subcategory_facet' do
|
50
50
|
it 'returns database subcategories' do
|
51
|
-
expect(helper.
|
51
|
+
expect(helper.subcategory_facet(record)).to contain_exactly('Social Sciences--Linguistics')
|
52
52
|
end
|
53
53
|
|
54
54
|
context 'with uncurated database' do
|
55
55
|
it 'returns empty array' do
|
56
|
-
expect(helper.
|
56
|
+
expect(helper.subcategory_facet(record_uncurated_db)).to be_empty
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -60,18 +60,38 @@ describe 'PennMARC::Format' do
|
|
60
60
|
end
|
61
61
|
|
62
62
|
it 'returns a facet value of only "Microformat"' do
|
63
|
-
# expect(formats).to eq %w[Microformat Thesis/Dissertation]
|
64
63
|
expect(formats).to eq %w[Microformat]
|
65
64
|
end
|
66
65
|
end
|
67
66
|
|
68
67
|
context 'with Microformats as determined by the holding call numbers' do
|
69
|
-
|
70
|
-
|
68
|
+
context 'with API enriched fields' do
|
69
|
+
let(:record) do
|
70
|
+
marc_record fields: [
|
71
|
+
marc_field(tag: PennMARC::EnrichedMarc::AlmaApi::TAG_PHYSICAL_INVENTORY, subfields: {
|
72
|
+
:h => 'AB123',
|
73
|
+
PennMARC::EnrichedMarc::AlmaApi::SUB_PHYSICAL_CALL_NUMBER_TYPE => '.456 Microfilm'
|
74
|
+
})
|
75
|
+
]
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'returns a facet value of "Microformat"' do
|
79
|
+
expect(formats).to eq ['Microformat']
|
80
|
+
end
|
71
81
|
end
|
72
82
|
|
73
|
-
|
74
|
-
|
83
|
+
context 'with publishing enriched fields' do
|
84
|
+
let(:record) do
|
85
|
+
marc_record fields: [
|
86
|
+
marc_field(tag: PennMARC::EnrichedMarc::TAG_HOLDING,
|
87
|
+
subfields: { :h => 'AB123',
|
88
|
+
PennMARC::EnrichedMarc::SUB_ITEM_CALL_NUMBER_TYPE => '.456 Microfilm' })
|
89
|
+
]
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'returns a facet value of "Microformat"' do
|
93
|
+
expect(formats).to eq ['Microformat']
|
94
|
+
end
|
75
95
|
end
|
76
96
|
end
|
77
97
|
|
@@ -5,7 +5,7 @@ describe 'PennMARC::Link' do
|
|
5
5
|
|
6
6
|
let(:helper) { PennMARC::Link }
|
7
7
|
|
8
|
-
describe '.
|
8
|
+
describe '.full_text_link' do
|
9
9
|
let(:record) do
|
10
10
|
marc_record fields: [marc_field(tag: '856', subfields: { '3': 'Materials specified',
|
11
11
|
z: 'Public note',
|
@@ -15,12 +15,12 @@ describe 'PennMARC::Link' do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it 'returns full text link text and url' do
|
18
|
-
expect(helper.
|
19
|
-
|
18
|
+
expect(helper.full_text_links(record)).to contain_exactly({ link_text: 'Materials specified Public note',
|
19
|
+
link_url: 'https://www.test-uri.com/' })
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
describe '.
|
23
|
+
describe '.web_link' do
|
24
24
|
let(:record) do
|
25
25
|
marc_record fields: [marc_field(tag: '856', subfields: { '3': 'Materials specified',
|
26
26
|
z: 'Public note',
|
@@ -30,8 +30,8 @@ describe 'PennMARC::Link' do
|
|
30
30
|
end
|
31
31
|
|
32
32
|
it 'returns web link text and url' do
|
33
|
-
expect(helper.
|
34
|
-
|
33
|
+
expect(helper.web_links(record)).to contain_exactly({ link_text: 'Materials specified Public note',
|
34
|
+
link_url: 'https://www.test-uri.com/' })
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
@@ -67,5 +67,17 @@ describe 'PennMARC::Location' do
|
|
67
67
|
display_value: :library)).to contain_exactly('LIBRA', 'Online library')
|
68
68
|
end
|
69
69
|
end
|
70
|
+
|
71
|
+
context 'with AVA fields' do
|
72
|
+
let(:record) do
|
73
|
+
marc_record(fields: [marc_field(tag: 'AVA', subfields: { b: 'Libra', c: 'LIBRA', j: 'stor' })])
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'returns expected values' do
|
77
|
+
expect(helper.location(record: record, location_map: mapping, display_value: :library)).to(
|
78
|
+
contain_exactly('LIBRA')
|
79
|
+
)
|
80
|
+
end
|
81
|
+
end
|
70
82
|
end
|
71
83
|
end
|
@@ -18,6 +18,7 @@ describe 'PennMARC::Note' do
|
|
18
18
|
b: 'UK', c: 'Historical Association',
|
19
19
|
d: '1917', e: '434 reels',
|
20
20
|
f: '(Seized records)' }),
|
21
|
+
marc_field(tag: '540', subfields: { a: 'Restricted: Copying allowed only for nonprofit organizations' }),
|
21
22
|
marc_field(tag: '588', subfields: { a: 'Print version record', '5': 'LoC' }),
|
22
23
|
marc_field(tag: '880', subfields: { b: 'Alt PhD', c: 'Alt UPenn', d: 'Alt 2021', '6': '502' }),
|
23
24
|
marc_field(tag: '880', subfields: { b: 'Ignore Note', '6': '501' })
|
@@ -32,6 +33,7 @@ describe 'PennMARC::Note' do
|
|
32
33
|
'PhD University of Pennsylvania 2021',
|
33
34
|
'Includes bibliographical references (pages 329-[342]) and index.',
|
34
35
|
'Archives Microfilm UK Historical Association 1917 434 reels (Seized records)',
|
36
|
+
'Restricted: Copying allowed only for nonprofit organizations',
|
35
37
|
'Print version record', 'Alt PhD Alt UPenn Alt 2021')
|
36
38
|
end
|
37
39
|
end
|
@@ -18,7 +18,7 @@ describe 'PennMARC::Series' do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
describe '.show' do
|
21
|
-
it 'returns the series' do
|
21
|
+
it 'returns the series values for display' do
|
22
22
|
expect(helper.show(record, relator_map: mapping)).to contain_exactly(
|
23
23
|
'Bean Bagatolvski 1997- bk. 1',
|
24
24
|
'Teachings of the feathered pillow',
|
@@ -28,7 +28,7 @@ describe 'PennMARC::Series' do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
describe '.values' do
|
31
|
-
it 'returns the values' do
|
31
|
+
it 'returns the series values' do
|
32
32
|
expect(helper.values(record, relator_map: mapping)).to contain_exactly('Bean Bagatolvski 1997- bk. 1.')
|
33
33
|
end
|
34
34
|
end
|
@@ -43,15 +43,15 @@ describe 'PennMARC::Series' do
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
-
describe '.
|
47
|
-
it 'gets continues for display' do
|
48
|
-
expect(helper.
|
46
|
+
describe '.get_continues_show' do
|
47
|
+
it 'gets continues values for display' do
|
48
|
+
expect(helper.get_continues_show(record)).to contain_exactly('National Comfort Association')
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
|
-
describe '.
|
53
|
-
it 'gets continued by display' do
|
54
|
-
expect(helper.
|
52
|
+
describe '.get_continued_by_show' do
|
53
|
+
it 'gets continued by values for display' do
|
54
|
+
expect(helper.get_continued_by_show(record)).to contain_exactly('NCA quarterly comfortology bulletin')
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -195,7 +195,7 @@ describe 'PennMARC::Title' do
|
|
195
195
|
end
|
196
196
|
end
|
197
197
|
|
198
|
-
describe '.
|
198
|
+
describe '.standardized_show' do
|
199
199
|
let(:record) do
|
200
200
|
marc_record fields: [
|
201
201
|
marc_field(tag: '130', subfields: { a: 'Uniform Title', f: '2000', '8': 'Not Included' }),
|
@@ -208,7 +208,7 @@ describe 'PennMARC::Title' do
|
|
208
208
|
end
|
209
209
|
|
210
210
|
it 'returns the expected standardized title display values' do
|
211
|
-
values = helper.
|
211
|
+
values = helper.standardized_show(record)
|
212
212
|
expect(values).to contain_exactly(
|
213
213
|
'Another Uniform Title', 'Translated Uniform Title', 'Uniform Title 2000', 'Yet Another Uniform Title'
|
214
214
|
)
|
@@ -216,7 +216,7 @@ describe 'PennMARC::Title' do
|
|
216
216
|
end
|
217
217
|
end
|
218
218
|
|
219
|
-
describe '.
|
219
|
+
describe '.other_show' do
|
220
220
|
let(:record) do
|
221
221
|
marc_record fields: [
|
222
222
|
marc_field(tag: '246', subfields: { a: 'Varied Title', f: '2000', '8': 'Not Included' }),
|
@@ -227,13 +227,13 @@ describe 'PennMARC::Title' do
|
|
227
227
|
end
|
228
228
|
|
229
229
|
it 'returns the expected other title display values' do
|
230
|
-
expect(helper.
|
230
|
+
expect(helper.other_show(record)).to contain_exactly(
|
231
231
|
'Alternate Varied Title', 'Uncontrolled Title', 'Varied Title 2000'
|
232
232
|
)
|
233
233
|
end
|
234
234
|
end
|
235
235
|
|
236
|
-
describe '.
|
236
|
+
describe '.former_show' do
|
237
237
|
let(:record) do
|
238
238
|
marc_record fields: [
|
239
239
|
marc_field(tag: '247', subfields: { a: 'Former Title', n: 'Part', '6': 'Linkage', e: 'Append' }),
|
@@ -242,7 +242,7 @@ describe 'PennMARC::Title' do
|
|
242
242
|
end
|
243
243
|
|
244
244
|
it 'returns the expected former title value' do
|
245
|
-
values = helper.
|
245
|
+
values = helper.former_show(record)
|
246
246
|
expect(values).to contain_exactly 'Former Title Part Append', 'Alt Title Part'
|
247
247
|
expect(values).not_to include 'Linkage', '247'
|
248
248
|
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.0.
|
4
|
+
version: 1.0.11.pre1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Kanning
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-01-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -77,6 +77,7 @@ extensions: []
|
|
77
77
|
extra_rdoc_files: []
|
78
78
|
files:
|
79
79
|
- ".gitignore"
|
80
|
+
- ".gitlab-ci.yml"
|
80
81
|
- ".gitleaks.toml"
|
81
82
|
- ".rspec"
|
82
83
|
- ".rubocop.yml"
|
@@ -148,7 +149,7 @@ homepage: https://gitlab.library.upenn.edu/dld/catalog/pennmarc
|
|
148
149
|
licenses:
|
149
150
|
- MIT
|
150
151
|
metadata:
|
151
|
-
rubygems_mfa_required: '
|
152
|
+
rubygems_mfa_required: 'false'
|
152
153
|
post_install_message:
|
153
154
|
rdoc_options: []
|
154
155
|
require_paths:
|
@@ -160,9 +161,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
161
|
version: '3.2'
|
161
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
163
|
requirements:
|
163
|
-
- - "
|
164
|
+
- - ">"
|
164
165
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
166
|
+
version: 1.3.1
|
166
167
|
requirements: []
|
167
168
|
rubygems_version: 3.4.10
|
168
169
|
signing_key:
|