pennmarc 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c48634bf726b824f79d9682b82973af5223035ff6e0a999ffb0a83d26f338893
4
- data.tar.gz: 4b874bd557519dd16a898faaa4c74ef6415b0b489fbf1ed2082fb1956c4cfaa4
3
+ metadata.gz: 96396e62916d963919d655e236402c3ae40386dc9ac6078e135f2d9c41481375
4
+ data.tar.gz: 554416ba78ce36f00e15b240e988421096349966edc5617b6c5b1f3d573d19f8
5
5
  SHA512:
6
- metadata.gz: 88c102ca50391a3f48076c626bdca735612ddc0ca33eb93c11b4268de1c896c90e12d342080c5a254a07267659f7855cc4ef2dc4ed03a329b57e313754cb6589
7
- data.tar.gz: 3c02ea8c8e60fb51b89cdc55f4f7329602cf3d5af20434dda37b181f0db527bce20d4fdaf6fe0383d2f26c9a910d49935ffa0173c832d35c57837e446bca82b4
6
+ metadata.gz: 7b64b529c5929690130cce0480a0e7fd99d32c435e5cf37daa058ab55838c28f246c8cb250f0ee9a4c2c243a118a6815add56f16df6c8bd54edd4b08022b7e36
7
+ data.tar.gz: fcb648bce5413f48f719050e528ed9f329618cbb5ca0af5e15aa02abd40f35fedb81e64d4614e8fcea2f32a6c6b5784ac7559c44a4771a1ef17321fc56d2b220
@@ -39,7 +39,7 @@ module PennMARC
39
39
  # TODO: use term hash here? pro/chr would be rejected...
40
40
  # TODO: should we care about punctuation in a search field? relator mapping?
41
41
  case subfield.code
42
- when '5', '6', '8' then next
42
+ when '5', '6', '8', '7' then next
43
43
  when 'a'
44
44
  # remove %PRO or PRO or %CHR or CHR
45
45
  # remove any ? at the end
@@ -249,7 +249,7 @@ module PennMARC
249
249
  vernacular: field.tag == '880' }
250
250
  field.each do |subfield|
251
251
  case subfield.code
252
- when '0', '6', '8', '5'
252
+ when '0', '6', '8', '5', '7'
253
253
  # explicitly ignore these subfields
254
254
  next
255
255
  when '1'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PennMARC
4
- VERSION = '1.2.2'
4
+ VERSION = '1.2.3'
5
5
  end
@@ -14,7 +14,8 @@ describe 'PennMARC::Subject' do
14
14
  let(:fields) do
15
15
  [marc_field(tag: '600', indicator2: '5', subfields: { a: 'Excluded Canadian' }),
16
16
  marc_field(tag: '610', indicator2: '0', subfields: { a: 'University of Pennsylvania', b: 'Libraries' }),
17
- marc_field(tag: '691', indicator2: '7', subfields: { a: 'Van Pelt Library', '2': 'local' }),
17
+ marc_field(tag: '691', indicator2: '7', subfields: { a: 'Van Pelt Library', '2': 'local',
18
+ '7': 'Heading derived magically.' }),
18
19
  marc_field(tag: '696', indicator2: '4', subfields: { a: 'A Developer' }),
19
20
  marc_field(tag: '880', indicator2: '0', subfields: { a: 'Alt. Name', '6': '610' })]
20
21
  end
@@ -100,7 +101,7 @@ describe 'PennMARC::Subject' do
100
101
  [marc_field(tag: '650', indicator2: '7',
101
102
  subfields: {
102
103
  a: 'Libraries,', d: '22nd Century,', x: 'History.', e: 'relator',
103
- '2': 'fast', '0': 'http://fast.org/libraries'
104
+ '2': 'fast', '0': 'http://fast.org/libraries', '7': 'Heading derived magically.'
104
105
  })]
105
106
  end
106
107
 
@@ -117,6 +118,10 @@ describe 'PennMARC::Subject' do
117
118
  expect(values.first).not_to include 'relator'
118
119
  end
119
120
 
121
+ it 'excludes any values from ǂ7' do
122
+ expect(values.first).not_to include 'magically'
123
+ end
124
+
120
125
  it 'includes active dates from ǂd' do
121
126
  expect(values.first).to include '22nd Century'
122
127
  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.2.2
4
+ version: 1.2.3
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-10-28 00:00:00.000000000 Z
15
+ date: 2024-10-29 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport