stanford-mods 3.3.4 → 3.3.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fa228dc93f0f24e8f5c5b9b96106761ef03fcb2ad25fe2c9083fb6d1025a1a5
4
- data.tar.gz: eb507bdb0c5d07dc0b2d6aa6f5b4132d54f5d1fbeac528a91eb5ea2c97c3ad17
3
+ metadata.gz: b3c8cd48602aa7d71d0187cd6351dd4496e908bea0520c2ad168be06607e78e6
4
+ data.tar.gz: e6159c3b26883f55945f1b182c2243d6019ff0106558b07e8c13226c69cf0d77
5
5
  SHA512:
6
- metadata.gz: b6bd720575deaefb97c80bacbddde3a2c9e6b8d48c469575ec22a04dbbf5f1ec6fc18c48951a4ff45619ed6c305608c4e954bc4d07b87201d825ae13c4dee7ce
7
- data.tar.gz: ce40138bb0489021788b64f08fc689bd23ce7c376fde6f8b9a5d897b57a3c7205c023e5b09834495ec9557a75f1efab68a484cae30df0140be074d6097bbf432
6
+ metadata.gz: c837186247e98a97edcae6e53941df131cb63b3de584d5e8983cb96b161ee6f240d66497819a7e39fad9c0f3a91a50dfb40dadb95bd8b4ff390ba62eb96bcf44
7
+ data.tar.gz: e0461f103546a3f266ae61699765e0db14851034f7aacf1e03f138af49bcb823e6383b34dfafe333ca19ee6b0ce2cb4b227cc6b17016842c4987193a409aeabf
@@ -160,6 +160,8 @@ module Stanford
160
160
  end
161
161
 
162
162
  def sort_key
163
+ return unless date
164
+
163
165
  year = if date.is_a?(EDTF::Interval)
164
166
  date.from.year
165
167
  else
@@ -1,6 +1,6 @@
1
1
  module Stanford
2
2
  module Mods
3
3
  # this is the Ruby Gem version
4
- VERSION = '3.3.4'.freeze
4
+ VERSION = '3.3.5'.freeze
5
5
  end
6
6
  end
@@ -442,6 +442,22 @@ describe "computations from /originInfo field" do
442
442
  end
443
443
  end
444
444
 
445
+ context 'with a date not handled by EDTF' do
446
+ let(:modsxml) do
447
+ <<-EOF
448
+ <mods xmlns="http://www.loc.gov/mods/v3">
449
+ <originInfo>
450
+ <dateIssued encoding="marc">1uuu</dateIssued>
451
+ </originInfo>
452
+ </mods>
453
+ EOF
454
+ end
455
+
456
+ it 'ignores the date' do
457
+ expect(record.pub_year_sort_str).to eq nil
458
+ end
459
+ end
460
+
445
461
  context 'when it has an open-ended date range' do
446
462
  let(:modsxml) do
447
463
  <<-EOF
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stanford-mods
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.4
4
+ version: 3.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay