stanford-mods 2.6.3 → 2.6.4

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: 0f3ee98d51451363706aeeeec977b5836e1d9b4c0ed4959672382fafc996a283
4
- data.tar.gz: 466e49dceede8b1c04c959f9b69b839ec31f62a3d34af686f45ef1e255943b56
3
+ metadata.gz: 922ecb4ab53df951ef735de705037f218347938cac621886b54dc71463c215a6
4
+ data.tar.gz: 5426c132435bdc34a74df664b4bcbc6797682482689e0843ebdc7527e8df0715
5
5
  SHA512:
6
- metadata.gz: '079d53973ab2747996b97cd64c562ebcfd62f0173196d9edd4e644cea1c6726cba9a42a831f9ab1a27d2044c7573bffcd5a7a82a11659fff4bbb65aa19b132a6'
7
- data.tar.gz: 6ea034ef6590c9cdf48d934fc80f464f7dd495d4f9aa2a8848727c70db7645bd4ec1ee6ce463ba649da799ae1369a9a54bc878c88cb1a0ae43c04a88245fc4bf
6
+ metadata.gz: eb12a388c219e4b9f99746d543ecc38cc1a67bc68302dc4255c81a088ffaad2fada7f6387b9525441d199c7ec536f54ba109f38ad92bf2d1d6d771077cdbc6d5
7
+ data.tar.gz: 2b904ae85c26eef0717a8e1250a7385889b00fe55c2e8ee59c83798f55f46e4e0ee4593f054dc3ab1a02e18095813ba3b16632f77340ddc212a54f36a871931a
@@ -1,3 +1,5 @@
1
+ require 'active_support/core_ext/integer/inflections'
2
+
1
3
  module Stanford
2
4
  module Mods
3
5
  # Parsing date strings
@@ -228,7 +230,6 @@ module Stanford
228
230
 
229
231
  century_matches = orig_date_str.match(CENTURY_4CHAR_REGEXP)
230
232
  if century_matches
231
- require 'active_support/core_ext/integer/inflections'
232
233
  return "#{($1.to_i + 1).ordinalize} century"
233
234
  end
234
235
  end
@@ -1,3 +1,5 @@
1
+ require 'active_support/core_ext/integer/inflections'
2
+
1
3
  module Stanford
2
4
  module Mods
3
5
  ##
@@ -400,7 +402,6 @@ module Stanford
400
402
  # note: not calling DateParsing.display_str_for_century directly because non-year text is lost
401
403
  century_matches = orig_date_str.match(CENTURY_4CHAR_REGEXP) if orig_date_str
402
404
  if century_matches
403
- require 'active_support/core_ext/integer/inflections'
404
405
  new_century_str = "#{(century_matches[3].to_i + 1).ordinalize} century"
405
406
  my_ng_date_element.content = "#{century_matches[1]}#{new_century_str}#{century_matches[4]}"
406
407
  else
@@ -1,6 +1,7 @@
1
1
  # Language Values used by SearchWorks
2
2
  # From https://github.com/solrmarc/stanford-solr-marc/blob/master/stanford-sw/translation_maps/language_map.properties
3
3
  # code 'ase' from iso639-3
4
+ # code egy-Egyd from rfc5646
4
5
  SEARCHWORKS_LANGUAGES = {
5
6
  'aaa' => 'Afar',
6
7
  'abk' => 'Abkhaz',
@@ -125,6 +126,7 @@ SEARCHWORKS_LANGUAGES = {
125
126
  'dzo' => 'Dzongkha',
126
127
  'efi' => 'Efik',
127
128
  'egy' => 'Egyptian',
129
+ 'egy-Egyd' => 'Egyptian, Demotic',
128
130
  'eka' => 'Ekajuk',
129
131
  'elx' => 'Elamite',
130
132
  'eng' => 'English',
@@ -1,6 +1,6 @@
1
1
  module Stanford
2
2
  module Mods
3
3
  # this is the Ruby Gem version
4
- VERSION = '2.6.3'.freeze
4
+ VERSION = '2.6.4'.freeze
5
5
  end
6
6
  end
data/lib/stanford-mods.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'active_support'
1
2
  require 'mods'
2
3
  require 'stanford-mods/date_parsing'
3
4
  require 'stanford-mods/coordinate'
@@ -272,7 +272,7 @@ describe "date parsing methods" do
272
272
  '10/1/90' => '1990',
273
273
  '10/21/08' => '2008',
274
274
  '5-1-59' => '1959',
275
- '5-1-21' => '1921',
275
+ '5-1-29' => '1929',
276
276
  '5-1-14' => '2014'
277
277
  }
278
278
  # example string as key, expected parsed value as value
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stanford-mods
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.3
4
+ version: 2.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
8
8
  - Bess Sadler
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-02-17 00:00:00.000000000 Z
12
+ date: 2022-01-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mods
@@ -197,7 +197,7 @@ files:
197
197
  homepage: https://github.com/sul-dlss/stanford-mods
198
198
  licenses: []
199
199
  metadata: {}
200
- post_install_message:
200
+ post_install_message:
201
201
  rdoc_options: []
202
202
  require_paths:
203
203
  - lib
@@ -212,8 +212,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  - !ruby/object:Gem::Version
213
213
  version: '0'
214
214
  requirements: []
215
- rubygems_version: 3.1.4
216
- signing_key:
215
+ rubygems_version: 3.2.32
216
+ signing_key:
217
217
  specification_version: 4
218
218
  summary: Stanford specific wrangling of MODS metadata
219
219
  test_files: