pennmarc 1.0.1 → 1.0.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/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +32 -8
- data/Gemfile.lock +3 -0
- data/lib/pennmarc/helpers/identifier.rb +32 -15
- data/lib/pennmarc/helpers/note.rb +0 -2
- data/lib/pennmarc/helpers/series.rb +1 -2
- data/lib/pennmarc/helpers/subject.rb +2 -1
- data/lib/pennmarc/helpers/title.rb +1 -1
- data/lib/pennmarc/version.rb +5 -0
- data/pennmarc.gemspec +5 -1
- data/spec/lib/pennmarc/helpers/identifer_spec.rb +43 -14
- data/spec/lib/pennmarc/helpers/series_spec.rb +4 -3
- 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: 33527bf43532170690b9b591097fb03f854130b3383debfafe931417d0394f52
|
4
|
+
data.tar.gz: a18a5be08df6d7b74d2aaa61275cdecdedec6caa4b5e8b2b81c99e91411ce093
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 627a4da06351037f520bc02b0a9fd61ce6cfdec35c563f2b29e3c1c01b4ad76766f155630cafe680b010783ea4f4c285df2d499fd784b7ee4f3cb4948cd421dd
|
7
|
+
data.tar.gz: c966233bb00009a14babc5bc92f0399e75640e886f7c32d176fea8983813aca8936d0e8fab98576a797afaf0b60c5f24268c2ae4e2d8cca31900e590db0a9bc6
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,11 +1,35 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 10000`
|
3
|
-
# on 2023-08-
|
3
|
+
# on 2023-08-25 13:55:25 UTC using RuboCop version 1.51.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
+
# Offense count: 2
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
11
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
12
|
+
# SupportedStyles: with_first_argument, with_fixed_indentation
|
13
|
+
Layout/ArgumentAlignment:
|
14
|
+
Exclude:
|
15
|
+
- 'spec/lib/pennmarc/helpers/series_spec.rb'
|
16
|
+
|
17
|
+
# Offense count: 1
|
18
|
+
# This cop supports safe autocorrection (--autocorrect).
|
19
|
+
# Configuration parameters: EnforcedStyle.
|
20
|
+
# SupportedStyles: empty_lines, no_empty_lines
|
21
|
+
Layout/EmptyLinesAroundBlockBody:
|
22
|
+
Exclude:
|
23
|
+
- 'spec/lib/pennmarc/helpers/identifer_spec.rb'
|
24
|
+
|
25
|
+
# Offense count: 1
|
26
|
+
# This cop supports safe autocorrection (--autocorrect).
|
27
|
+
# Configuration parameters: EnforcedStyle.
|
28
|
+
# SupportedStyles: final_newline, final_blank_line
|
29
|
+
Layout/TrailingEmptyLines:
|
30
|
+
Exclude:
|
31
|
+
- 'spec/lib/pennmarc/helpers/identifer_spec.rb'
|
32
|
+
|
9
33
|
# Offense count: 22
|
10
34
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
11
35
|
Metrics/AbcSize:
|
@@ -86,7 +110,7 @@ Metrics/PerceivedComplexity:
|
|
86
110
|
- 'lib/pennmarc/helpers/title.rb'
|
87
111
|
- 'lib/pennmarc/util.rb'
|
88
112
|
|
89
|
-
# Offense count:
|
113
|
+
# Offense count: 4
|
90
114
|
# This cop supports safe autocorrection (--autocorrect).
|
91
115
|
# Configuration parameters: EnforcedStyle, BlockForwardingName.
|
92
116
|
# SupportedStyles: anonymous, explicit
|
@@ -104,7 +128,7 @@ Naming/PredicateName:
|
|
104
128
|
Exclude:
|
105
129
|
- 'lib/pennmarc/helpers/relation.rb'
|
106
130
|
|
107
|
-
# Offense count:
|
131
|
+
# Offense count: 1
|
108
132
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
109
133
|
# SupportedStyles: snake_case, normalcase, non_integer
|
110
134
|
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
|
@@ -135,9 +159,9 @@ RSpec/NestedGroups:
|
|
135
159
|
- 'spec/lib/pennmarc/helpers/format_spec.rb'
|
136
160
|
|
137
161
|
# Offense count: 2
|
138
|
-
# This cop supports
|
139
|
-
# Configuration parameters:
|
140
|
-
#
|
141
|
-
|
162
|
+
# This cop supports safe autocorrection (--autocorrect).
|
163
|
+
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
164
|
+
# URISchemes: http, https
|
165
|
+
Layout/LineLength:
|
142
166
|
Exclude:
|
143
|
-
- 'lib/pennmarc/helpers/
|
167
|
+
- 'spec/lib/pennmarc/helpers/creator_spec.rb'
|
data/Gemfile.lock
CHANGED
@@ -21,6 +21,8 @@ GEM
|
|
21
21
|
minitest (5.18.0)
|
22
22
|
nokogiri (1.15.2-arm64-darwin)
|
23
23
|
racc (~> 1.4)
|
24
|
+
nokogiri (1.15.2-x64-mingw-ucrt)
|
25
|
+
racc (~> 1.4)
|
24
26
|
nokogiri (1.15.2-x86_64-linux)
|
25
27
|
racc (~> 1.4)
|
26
28
|
parallel (1.23.0)
|
@@ -101,6 +103,7 @@ GEM
|
|
101
103
|
PLATFORMS
|
102
104
|
arm64-darwin-21
|
103
105
|
arm64-darwin-22
|
106
|
+
x64-mingw-ucrt
|
104
107
|
x86_64-linux
|
105
108
|
|
106
109
|
DEPENDENCIES
|
@@ -33,14 +33,12 @@ module PennMARC
|
|
33
33
|
#
|
34
34
|
# @param [MARC::Record] record
|
35
35
|
# @return [Array<String>]
|
36
|
-
# @todo look into z subfield for 020 field, should we show cancelled isbn?
|
37
36
|
def isbn_show(record)
|
38
37
|
isbn_values = record.fields('020').filter_map do |field|
|
39
|
-
joined_isbn = join_subfields(field, &subfield_in?(%w[a
|
38
|
+
joined_isbn = join_subfields(field, &subfield_in?(%w[a]))
|
40
39
|
joined_isbn.presence
|
41
40
|
end
|
42
|
-
isbn_values
|
43
|
-
isbn_values
|
41
|
+
isbn_values + linked_alternate(record, '020', &subfield_in?(%w[a]))
|
44
42
|
end
|
45
43
|
|
46
44
|
# Get ISSN values for display from the {https://www.oclc.org/bibformats/en/0xx/022.html 022 field} and related
|
@@ -50,11 +48,10 @@ module PennMARC
|
|
50
48
|
# @return [Array<String>]
|
51
49
|
def issn_show(record)
|
52
50
|
issn_values = record.fields('022').filter_map do |field|
|
53
|
-
joined_issn = join_subfields(field, &subfield_in?(%w[a
|
51
|
+
joined_issn = join_subfields(field, &subfield_in?(%w[a]))
|
54
52
|
joined_issn.presence
|
55
53
|
end
|
56
|
-
issn_values
|
57
|
-
issn_values
|
54
|
+
issn_values + linked_alternate(record, '022', &subfield_in?(%w[a]))
|
58
55
|
end
|
59
56
|
|
60
57
|
# Get numeric OCLC ID of first {https://www.oclc.org/bibformats/en/0xx/035.html 035 field}
|
@@ -85,17 +82,22 @@ module PennMARC
|
|
85
82
|
|
86
83
|
# Get publisher issued identifiers from fields {https://www.oclc.org/bibformats/en/0xx/024.html 024},
|
87
84
|
# {https://www.oclc.org/bibformats/en/0xx/024.html 028}, and related
|
88
|
-
# {https://www.oclc.org/bibformats/en/8xx/880.html 880 field}.
|
85
|
+
# {https://www.oclc.org/bibformats/en/8xx/880.html 880 field}. We do not return DOI values stored in 024 ǂ2,
|
86
|
+
# see {PennMARC::Identifier.doi_show} for parsing DOI values.
|
89
87
|
#
|
90
88
|
# @param [MARC::Record] record
|
91
89
|
# @return [Array<string>]
|
92
90
|
def publisher_number_show(record)
|
93
|
-
|
94
|
-
|
95
|
-
|
91
|
+
record.fields(%w[024 028 880]).filter_map do |field|
|
92
|
+
next if field.tag == '880' && subfield_value_not_in?(field, '6', %w[024 028])
|
93
|
+
|
94
|
+
# do not return doi values from 024 ǂ2
|
95
|
+
if field.tag == '024' && subfield_value_in?(field, '2', %w[doi])
|
96
|
+
join_subfields(field, &subfield_not_in?(%w[a 2 5 6])).presence
|
97
|
+
else
|
98
|
+
join_subfields(field, &subfield_not_in?(%w[5 6])).presence
|
99
|
+
end
|
96
100
|
end
|
97
|
-
publisher_numbers += linked_alternate(record, %w[024 028], &subfield_not_in?(%w[5 6]))
|
98
|
-
publisher_numbers
|
99
101
|
end
|
100
102
|
|
101
103
|
# Get publisher issued identifiers for searching of a record. Values extracted from fields
|
@@ -119,6 +121,21 @@ module PennMARC
|
|
119
121
|
end
|
120
122
|
end
|
121
123
|
|
124
|
+
# Retrieve DOI values stored in {https://www.oclc.org/bibformats/en/0xx/024.html 024}.
|
125
|
+
# Penn MARC records give the first indicator a value of '7' and ǂ2 a value of 'doi' to denote that ǂa is a doi.
|
126
|
+
# @param [MARC::Record] record
|
127
|
+
# @return [Array<String>]
|
128
|
+
def doi_show(record)
|
129
|
+
record.fields('024').filter_map do |field|
|
130
|
+
# skip unless indicator1 is '7'
|
131
|
+
next unless field.indicator1.in?(%w[7])
|
132
|
+
# skip unless ǂ2 is the string literal 'doi'
|
133
|
+
next unless subfield_value_in?(field, '2', %w[doi])
|
134
|
+
|
135
|
+
join_subfields(field, &subfield_in?(%w[a]))
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
122
139
|
private
|
123
140
|
|
124
141
|
# Determine if subfield 'a' is an OCLC id.
|
@@ -126,11 +143,11 @@ module PennMARC
|
|
126
143
|
# @param [MARC::Subfield]
|
127
144
|
# @return [TrueClass, FalseClass]
|
128
145
|
def subfield_a_is_oclc?(subfield)
|
129
|
-
subfield.code == 'a' && subfield.value =~ /^\(OCoLC\).*/
|
146
|
+
subfield.code == 'a' && (subfield.value =~ /^\(OCoLC\).*/).present?
|
130
147
|
end
|
131
148
|
|
132
149
|
# Normalize isbn value using {https://github.com/billdueber/library_stdnums library_stdnums gem}.
|
133
|
-
# Converts ISBN10 (ten-digit) to validated ISBN13 (
|
150
|
+
# Converts ISBN10 (ten-digit) to validated ISBN13 (thirteen-digit) and returns both values. If passed
|
134
151
|
# ISBN13 parameter, only returns validated ISBN13 value.
|
135
152
|
#
|
136
153
|
# @param [String] isbn
|
@@ -11,8 +11,6 @@ module PennMARC
|
|
11
11
|
# {https://www.oclc.org/bibformats/en/5xx/550.html 550}, {https://www.oclc.org/bibformats/en/5xx/580.html 580},
|
12
12
|
# {https://www.oclc.org/bibformats/en/5xx/586.html 586}, {https://www.oclc.org/bibformats/en/5xx/588.html 588},
|
13
13
|
# and their linked alternates.
|
14
|
-
# @todo legacy implementation used conditional to separate join logic for 588 field. However, this doesn't seem
|
15
|
-
# necessary because 588 only has subfields 'a', '5', '6', and '8'. Do we need to look into this?
|
16
14
|
# @param [MARC::Record] record
|
17
15
|
# @return [Array<String>]
|
18
16
|
def notes_show(record)
|
@@ -4,7 +4,6 @@ module PennMARC
|
|
4
4
|
# Do Series and series-related field processing. Many of these fields are added entries that are justified by
|
5
5
|
# corresponding series statements (usually 490). These fields provide information about the published series in which
|
6
6
|
# a book, encoded finding aid, or other published work has appeared
|
7
|
-
# @todo We may want to include 410 in the display tags, since it is included in references below.
|
8
7
|
class Series < Helper
|
9
8
|
class << self
|
10
9
|
# 800 - Series Added Entry-Personal Name - https://www.loc.gov/marc/bibliographic/bd800.html
|
@@ -16,7 +15,7 @@ module PennMARC
|
|
16
15
|
# 411 - Series Statement/Added Entry Meeting Name - https://www.loc.gov/marc/bibliographic/bd411.html
|
17
16
|
# 440 - Series Statement/Added Entry-Title - https://www.loc.gov/marc/bibliographic/bd440.html
|
18
17
|
# 490 - Series Statement - https://www.loc.gov/marc/bibliographic/bd490.html
|
19
|
-
DISPLAY_TAGS = %w[800 810 811 830 400 411 440 490].freeze
|
18
|
+
DISPLAY_TAGS = %w[800 810 811 830 400 410 411 440 490].freeze
|
20
19
|
|
21
20
|
# Fields for display that pertain to series information.
|
22
21
|
# @param [MARC::Record] record
|
@@ -168,7 +168,8 @@ module PennMARC
|
|
168
168
|
def format_term(type:, term:)
|
169
169
|
return unless type.in? %i[facet display]
|
170
170
|
|
171
|
-
|
171
|
+
# attempt to handle poorly coded record
|
172
|
+
normalize_single_subfield(term[:parts].first) if term[:count] == 1 && term[:parts].first.present?
|
172
173
|
|
173
174
|
case type.to_sym
|
174
175
|
when :facet
|
@@ -89,7 +89,7 @@ module PennMARC
|
|
89
89
|
end
|
90
90
|
raw_title = join_subfields(title_field, &subfield_in?(['a'])) # get title from subfield a
|
91
91
|
value = if offset.between?(1, 9)
|
92
|
-
{ prefix: raw_title[0..offset - 1]
|
92
|
+
{ prefix: raw_title[0..offset - 1]&.strip, filing: raw_title[offset..]&.strip }
|
93
93
|
elsif raw_title.present?
|
94
94
|
handle_bracket_prefix raw_title
|
95
95
|
else
|
data/pennmarc.gemspec
CHANGED
@@ -1,8 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'pennmarc/version'
|
6
|
+
|
3
7
|
Gem::Specification.new do |s|
|
4
8
|
s.name = 'pennmarc'
|
5
|
-
s.version =
|
9
|
+
s.version = PennMARC::VERSION
|
6
10
|
s.summary = 'Penn Libraries Catalog MARC parsing wisdom for cross-project usage'
|
7
11
|
s.description = 'This gem provides methods for parsing a Penn Libraries MARCXML record into string, array and date
|
8
12
|
objects for use in discovery or preservation applications.'
|
@@ -16,13 +16,14 @@ describe 'PennMARC::Identifier' do
|
|
16
16
|
describe '.isxn_search' do
|
17
17
|
let(:record) do
|
18
18
|
marc_record fields: [
|
19
|
-
marc_field(tag: '020', subfields: { a: '9781594205071', z: '
|
20
|
-
marc_field(tag: '022', subfields: { a: '0008-6533', l: '0300-7162', z: '
|
19
|
+
marc_field(tag: '020', subfields: { a: '9781594205071', z: '1555975275' }),
|
20
|
+
marc_field(tag: '022', subfields: { a: '0008-6533', l: '0300-7162', z: '0799-5946 ' })
|
21
21
|
]
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'returns expected search values' do
|
25
|
-
expect(helper.isxn_search(record)).to contain_exactly('9781594205071', '
|
25
|
+
expect(helper.isxn_search(record)).to contain_exactly('9781594205071', '1555975275', '9781555975272',
|
26
|
+
'1594205078', '0300-7162', '0008-6533', '0799-5946 ')
|
26
27
|
end
|
27
28
|
|
28
29
|
it 'converts ISBN10 values to ISBN13' do
|
@@ -40,9 +41,9 @@ describe 'PennMARC::Identifier' do
|
|
40
41
|
]
|
41
42
|
end
|
42
43
|
|
43
|
-
it 'returns expected
|
44
|
-
expect(helper.isbn_show(record)).to contain_exactly('9781594205071
|
45
|
-
'0735222789
|
44
|
+
it 'returns expected ǂa values' do
|
45
|
+
expect(helper.isbn_show(record)).to contain_exactly('9781594205071', '0805073698',
|
46
|
+
'0735222789')
|
46
47
|
end
|
47
48
|
end
|
48
49
|
|
@@ -55,9 +56,9 @@ describe 'PennMARC::Identifier' do
|
|
55
56
|
]
|
56
57
|
end
|
57
58
|
|
58
|
-
it 'returns
|
59
|
-
expect(helper.issn_show(record)).to contain_exactly('0008-6533
|
60
|
-
'1080-6512
|
59
|
+
it 'returns ǂa values' do
|
60
|
+
expect(helper.issn_show(record)).to contain_exactly('0008-6533', '2470-6302',
|
61
|
+
'1080-6512')
|
61
62
|
end
|
62
63
|
end
|
63
64
|
|
@@ -79,9 +80,11 @@ describe 'PennMARC::Identifier' do
|
|
79
80
|
let(:record) do
|
80
81
|
marc_record fields: [
|
81
82
|
marc_field(tag: '024', subfields: { a: '602537854325', '6': '880-01' }),
|
83
|
+
marc_field(tag: '024', subfields: { a: '10.18574/9781479842865', '2': 'doi' }),
|
82
84
|
marc_field(tag: '028', subfields: { a: 'B002086600', b: 'Island Def Jam Music Group', '6': '880-01' }),
|
83
85
|
marc_field(tag: '880', subfields: { a: '523458735206', '6': '024' }),
|
84
|
-
marc_field(tag: '880', subfields: { a: '006680200B', b: 'Island', '6': '028' })
|
86
|
+
marc_field(tag: '880', subfields: { a: '006680200B', b: 'Island', '6': '028' }),
|
87
|
+
marc_field(tag: '880', subfields: { a: '006680200B', b: 'Island', '6': '021' })
|
85
88
|
]
|
86
89
|
end
|
87
90
|
|
@@ -90,18 +93,26 @@ describe 'PennMARC::Identifier' do
|
|
90
93
|
'B002086600 Island Def Jam Music Group',
|
91
94
|
'523458735206', '006680200B Island')
|
92
95
|
end
|
96
|
+
|
97
|
+
it 'does not return DOI values' do
|
98
|
+
expect(helper.publisher_number_show(record)).not_to include('10.18574/9781479842865')
|
99
|
+
expect(helper.publisher_number_show(record)).not_to include('doi')
|
100
|
+
|
101
|
+
end
|
93
102
|
end
|
94
103
|
|
95
104
|
describe '.publisher_number_search' do
|
96
105
|
let(:record) do
|
97
106
|
marc_record fields: [
|
98
|
-
marc_field(tag: '024', subfields: { a: '602537854325' }),
|
107
|
+
marc_field(tag: '024', subfields: { a: '602537854325', b: 'exclude' }),
|
108
|
+
marc_field(tag: '024', subfields: { a: '10.18574/9781479842865', '2': 'doi' }),
|
99
109
|
marc_field(tag: '028', subfields: { a: 'B002086600', b: 'Island Def Jam Music Group' })
|
100
110
|
]
|
101
111
|
end
|
102
112
|
|
103
|
-
it 'returns
|
104
|
-
expect(helper.publisher_number_search(record)).to contain_exactly('
|
113
|
+
it 'returns publisher numbers from 024/028 ǂa and DOI values in 024 ǂ2' do
|
114
|
+
expect(helper.publisher_number_search(record)).to contain_exactly('10.18574/9781479842865', '602537854325',
|
115
|
+
'B002086600')
|
105
116
|
end
|
106
117
|
end
|
107
118
|
|
@@ -117,4 +128,22 @@ describe 'PennMARC::Identifier' do
|
|
117
128
|
expect(helper.fingerprint_show(record)).to contain_exactly('dete nkck vess lodo Anno Domini MDCXXXVI 3')
|
118
129
|
end
|
119
130
|
end
|
120
|
-
|
131
|
+
|
132
|
+
describe '.doi_show' do
|
133
|
+
let(:record) do
|
134
|
+
marc_record fields: [
|
135
|
+
marc_field(tag: '024', indicator1: '7', subfields: { a: '10.1038/sdata.2016.18 ', '2': 'doi' }),
|
136
|
+
marc_field(tag: '024', indicator1: '7', subfields: { a: '10.18574/9781479842865', '2': 'doi' }),
|
137
|
+
marc_field(tag: '024', indicator1: '7',
|
138
|
+
subfields: { a: '10.1016.12.31/nature.S0735-1097(98)2000/12?/31/34:7-7', '2': 'doi' }),
|
139
|
+
marc_field(tag: '024', indicator1: '7', subfields: { a: 'excluded', '2': 'non doi' }),
|
140
|
+
marc_field(tag: '024', indicator1: '0', subfields: { a: 'excluded', '2': 'doi' })
|
141
|
+
]
|
142
|
+
end
|
143
|
+
|
144
|
+
it 'returns valid DOI values' do
|
145
|
+
expect(helper.doi_show(record)).to contain_exactly('10.1016.12.31/nature.S0735-1097(98)2000/12?/31/34:7-7',
|
146
|
+
'10.1038/sdata.2016.18', '10.18574/9781479842865')
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
@@ -6,7 +6,8 @@ describe 'PennMARC::Series' do
|
|
6
6
|
let(:helper) { PennMARC::Series }
|
7
7
|
let(:mapping) { { aut: 'Author' } }
|
8
8
|
let(:record) do
|
9
|
-
marc_record fields: [marc_field(tag: '
|
9
|
+
marc_record fields: [marc_field(tag: '410', subfields: { a: 'Evil Giant Megacorp' }),
|
10
|
+
marc_field(tag: '490', subfields: { a: 'Teachings of the feathered pillow' }),
|
10
11
|
marc_field(tag: '880', subfields: { '6': '490', a: 'Учения пернатой подушки' }),
|
11
12
|
marc_field(tag: '800', subfields: { a: 'Bean Bagatolvski', d: '1997-', v: 'bk. 1' }),
|
12
13
|
marc_field(tag: '780', subfields: { a: 'National Comfort Association' }),
|
@@ -20,7 +21,7 @@ describe 'PennMARC::Series' do
|
|
20
21
|
it 'returns the series' do
|
21
22
|
expect(helper.show(record, relator_map: mapping)).to contain_exactly('Bean Bagatolvski 1997- bk. 1',
|
22
23
|
'Teachings of the feathered pillow',
|
23
|
-
'Учения пернатой подушки')
|
24
|
+
'Учения пернатой подушки', 'Evil Giant Megacorp')
|
24
25
|
end
|
25
26
|
end
|
26
27
|
|
@@ -32,7 +33,7 @@ describe 'PennMARC::Series' do
|
|
32
33
|
|
33
34
|
describe '.search' do
|
34
35
|
it 'returns the search values' do
|
35
|
-
expect(helper.search(record)).to contain_exactly('Bean Bagatolvski 1997- bk. 1')
|
36
|
+
expect(helper.search(record)).to contain_exactly('Bean Bagatolvski 1997- bk. 1', 'Evil Giant Megacorp')
|
36
37
|
end
|
37
38
|
|
38
39
|
it 'returns an empty array if no values are found' do
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Kanning
|
8
8
|
- Amrey Mathurin
|
9
9
|
- Patrick Perkins
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-10-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- lib/pennmarc/mappings/relator.yml
|
113
113
|
- lib/pennmarc/parser.rb
|
114
114
|
- lib/pennmarc/util.rb
|
115
|
+
- lib/pennmarc/version.rb
|
115
116
|
- pennmarc.gemspec
|
116
117
|
- spec/fixtures/marcxml/test.xml
|
117
118
|
- spec/lib/pennmarc/helpers/citation_spec.rb
|
@@ -139,7 +140,7 @@ licenses:
|
|
139
140
|
- MIT
|
140
141
|
metadata:
|
141
142
|
rubygems_mfa_required: 'true'
|
142
|
-
post_install_message:
|
143
|
+
post_install_message:
|
143
144
|
rdoc_options: []
|
144
145
|
require_paths:
|
145
146
|
- lib
|
@@ -155,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
156
|
version: '0'
|
156
157
|
requirements: []
|
157
158
|
rubygems_version: 3.4.10
|
158
|
-
signing_key:
|
159
|
+
signing_key:
|
159
160
|
specification_version: 4
|
160
161
|
summary: Penn Libraries Catalog MARC parsing wisdom for cross-project usage
|
161
162
|
test_files: []
|