pennmarc 1.0.30 → 1.0.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -1
  3. data/Gemfile.lock +0 -2
  4. data/lib/pennmarc/heading_control.rb +9 -5
  5. data/lib/pennmarc/helpers/access.rb +4 -4
  6. data/lib/pennmarc/helpers/citation.rb +2 -2
  7. data/lib/pennmarc/helpers/classification.rb +10 -7
  8. data/lib/pennmarc/helpers/creator.rb +27 -25
  9. data/lib/pennmarc/helpers/database.rb +8 -8
  10. data/lib/pennmarc/helpers/date.rb +5 -5
  11. data/lib/pennmarc/helpers/edition.rb +7 -7
  12. data/lib/pennmarc/helpers/format.rb +36 -40
  13. data/lib/pennmarc/helpers/genre.rb +5 -5
  14. data/lib/pennmarc/helpers/identifier.rb +18 -18
  15. data/lib/pennmarc/helpers/inventory.rb +7 -7
  16. data/lib/pennmarc/helpers/inventory_entry/base.rb +2 -2
  17. data/lib/pennmarc/helpers/language.rb +4 -4
  18. data/lib/pennmarc/helpers/link.rb +6 -6
  19. data/lib/pennmarc/helpers/location.rb +14 -14
  20. data/lib/pennmarc/helpers/note.rb +2 -2
  21. data/lib/pennmarc/helpers/production.rb +7 -6
  22. data/lib/pennmarc/helpers/relation.rb +14 -14
  23. data/lib/pennmarc/helpers/series.rb +19 -19
  24. data/lib/pennmarc/helpers/subject.rb +28 -28
  25. data/lib/pennmarc/helpers/title.rb +18 -18
  26. data/lib/pennmarc/mappings/headings_override.yml +12 -8
  27. data/lib/pennmarc/parser.rb +5 -5
  28. data/lib/pennmarc/test/marc_helpers.rb +11 -11
  29. data/lib/pennmarc/util.rb +18 -18
  30. data/lib/pennmarc/version.rb +1 -1
  31. data/pennmarc.gemspec +0 -1
  32. data/spec/lib/pennmarc/heading_control_spec.rb +17 -10
  33. data/spec/lib/pennmarc/helpers/creator_spec.rb +15 -12
  34. data/spec/lib/pennmarc/marc_util_spec.rb +12 -0
  35. data/spec/support/fixture_helpers.rb +1 -1
  36. metadata +2 -16
@@ -323,6 +323,18 @@ describe 'PennMARC::Util' do
323
323
  end
324
324
  end
325
325
 
326
+ context 'when relator term has trailing comma' do
327
+ let(:field) do
328
+ marc_field(tag: '100', subfields: {
329
+ a: 'Capus, Alex,', e: ['author,', 'illustrator,', 'translator']
330
+ })
331
+ end
332
+
333
+ it 'punctuates the value as expected' do
334
+ expect(result).to eq 'Capus, Alex, author, illustrator, translator.'
335
+ end
336
+ end
337
+
326
338
  context 'when joined subfield values ends with an open date' do
327
339
  let(:joined_subfields) { [field.subfields.first.value, field.subfields.second.value].join(' ') }
328
340
  let(:field) { marc_field(tag: '100', subfields: { a: 'Capus, Alex,', d: '1808-', '4': %w[aut ill] }) }
@@ -2,7 +2,7 @@
2
2
 
3
3
  module FixtureHelpers
4
4
  # Get the path for a test MARC XML file
5
- # @param [String] filename of MARCXML fixture
5
+ # @param filename [String] filename of MARCXML fixture
6
6
  # @return [String] full path of MARCXML fixture
7
7
  def marc_xml_path(filename)
8
8
  File.join File.dirname(__FILE__), '..', 'fixtures', 'marcxml', filename
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.30
4
+ version: 1.0.32
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-07-15 00:00:00.000000000 Z
15
+ date: 2024-07-30 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport
@@ -56,20 +56,6 @@ dependencies:
56
56
  - - "~>"
57
57
  - !ruby/object:Gem::Version
58
58
  version: '1.2'
59
- - !ruby/object:Gem::Dependency
60
- name: multi_string_replace
61
- requirement: !ruby/object:Gem::Requirement
62
- requirements:
63
- - - "~>"
64
- - !ruby/object:Gem::Version
65
- version: '2.0'
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: !ruby/object:Gem::Requirement
69
- requirements:
70
- - - "~>"
71
- - !ruby/object:Gem::Version
72
- version: '2.0'
73
59
  - !ruby/object:Gem::Dependency
74
60
  name: nokogiri
75
61
  requirement: !ruby/object:Gem::Requirement