cul_hydra 1.9.4 → 1.9.5

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: c425738e5a5c4634305f4dd908e2c2448db50cc7194c88743a560fd1b2ee8db8
4
- data.tar.gz: 0a69f6de80f11f56812f83ebccd1f0610b4db6e447a8b0c39188449135a830b5
3
+ metadata.gz: 9cbe0237339bc24069451b8fae3742430d8ba2b9e2d102ee7d2cebcf0d6905d3
4
+ data.tar.gz: 9ee494352f8aeb9be9f597a6ec2b24e358a89193e5a4e69e0bfd89113ede246a
5
5
  SHA512:
6
- metadata.gz: b8c9b87f2e4dc966c221d7b32e8cc4e7389b40d5db802e6feb7b2209127464bfd3ae616cc369abe80606fb84b85384edc7f2a59fb2da587b94f90fe0352489c5
7
- data.tar.gz: a09fb529dcb1ff328e20e7d8f67afb020767d0c48d4ef29aef77db38283d3923eb63191e0e4e799338a0f52896f7a67dbd3912b4d2689262dda7bc3a723fef54
6
+ metadata.gz: d94d52aa21a5739cce5277e60f72980d7d542ae28bf6e19491ec9baa6cef141147e10cceae46ae94192952b748dc46ea357de4133d12f2e0677f69eb3873af6c
7
+ data.tar.gz: c95522636da024ea1eb7f34fe11fbfed9f2de266c5f0eba22bbfa06ea4084e1ddaaab9b8f466812b2f3ad9de6d5410935be3d4b451568558a5baaf96d38850a9
@@ -0,0 +1,2 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <mods xmlns='http://www.loc.gov/mods/v3' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd'><titleInfo><nonSort>The </nonSort><title xml:lang="eng">(ġhotogråphs) ゐ </title></titleInfo></mods>
@@ -1 +1 @@
1
- <doc xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:mods="http://www.loc.gov/mods/v3" xmlns="http://solr.apache.org" xmlns:index="http://repository.cul.columbia.edu/namespace/index/1_0/" xmlns:local="http://local.org/custom"><field name="format">multipartitem</field><field name="collection_h">Columbia University Libraries Content/Online Projects/PRD Customer Orders/</field><field name="internal_h">ldpd:91655/ldpd:91656/ldpd:101479/ldpd:102275/</field><field name="format_h">multipartitem/</field><field name="id">ldpd:102275@ldpd:103434</field><field name="pid_ssi">ldpd:102275</field><field name="descriptor">mods</field><field name="object_ssm">https://repository2.cul.columbia.edu:8443/fedora/get/ldpd:102275</field><field name="identifier_ssi">prd.custord.070017</field><field name="all_text_teim">AN070017</field><field name="all_text_teim">prd.custord.070017</field><field name="lib_collection_sim">Pulitzer Prizes</field><field name="lib_collection_ssm">Pulitzer Prizes</field><field name="lib_project_sim">Pres Orders</field><field name="lib_project_ssm">Customer Order Collection</field><field name="lib_project_teim">Customer Order Collection</field><field name="title_sort">Photographs</field><field name="title_ssm">Photographs</field><field name="title_teim">Photographs</field><field name="lib_name_sim">Kennerly, David</field><field name="lib_name_teim">Kennerly, David</field><field name="lib_name_ssm">Kennerly, David</field><field name="lib_repo_long_ssim">Rare Book and Manuscript Library</field><field name="lib_repo_sim">RBML</field><field name="lib_repo_teim">RBML</field><field name="lib_format_ssm">photographs</field><field name="lib_format_sim">photographs</field><field name="all_text_teim">Original PRD customer order number: 070017</field><field name="extent_teim">2 items</field><field name="access_condition_ssi">Columbia Libraries Staff Use Only</field><field name="all_text_teim">Box 8, JP2 Feature Photography</field></doc>
1
+ <doc xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:mods="http://www.loc.gov/mods/v3" xmlns="http://solr.apache.org" xmlns:index="http://repository.cul.columbia.edu/namespace/index/1_0/" xmlns:local="http://local.org/custom"><field name="format">multipartitem</field><field name="collection_h">Columbia University Libraries Content/Online Projects/PRD Customer Orders/</field><field name="internal_h">ldpd:91655/ldpd:91656/ldpd:101479/ldpd:102275/</field><field name="format_h">multipartitem/</field><field name="id">ldpd:102275@ldpd:103434</field><field name="pid_ssi">ldpd:102275</field><field name="descriptor">mods</field><field name="object_ssm">https://repository2.cul.columbia.edu:8443/fedora/get/ldpd:102275</field><field name="identifier_ssi">prd.custord.070017</field><field name="all_text_teim">AN070017</field><field name="all_text_teim">prd.custord.070017</field><field name="lib_collection_sim">Pulitzer Prizes</field><field name="lib_collection_ssm">Pulitzer Prizes</field><field name="lib_project_sim">Pres Orders</field><field name="lib_project_ssm">Customer Order Collection</field><field name="lib_project_teim">Customer Order Collection</field><field name="title_sort">PHOTOGRAPHS</field><field name="title_ssm">Photographs</field><field name="title_teim">Photographs</field><field name="lib_name_sim">Kennerly, David</field><field name="lib_name_teim">Kennerly, David</field><field name="lib_name_ssm">Kennerly, David</field><field name="lib_repo_long_ssim">Rare Book and Manuscript Library</field><field name="lib_repo_sim">RBML</field><field name="lib_repo_teim">RBML</field><field name="lib_format_ssm">photographs</field><field name="lib_format_sim">photographs</field><field name="all_text_teim">Original PRD customer order number: 070017</field><field name="extent_teim">2 items</field><field name="access_condition_ssi">Columbia Libraries Staff Use Only</field><field name="all_text_teim">Box 8, JP2 Feature Photography</field></doc>
@@ -19,7 +19,7 @@ lib_collection_sim: ['Pulitzer Prizes']
19
19
  lib_collection_ssm: ['Pulitzer Prizes']
20
20
  lib_project_short_ssim: ['Pres Orders']
21
21
  lib_project_full_ssim: ['Customer Order Collection']
22
- title_si: 'Photographs'
22
+ title_si: 'PHOTOGRAPHS'
23
23
  title_display_ssm: ['The Photographs']
24
24
  lib_format_sim: ['photographs']
25
25
  lib_format_ssm: ['photographs']
@@ -39,7 +39,11 @@ module Cul::Hydra::Solrizer
39
39
  n_t = n_t.sub(/^"(.*)"$/, "\\1")
40
40
  n_t = n_t.sub(/^'(.*)'$/, "\\1")
41
41
  is_negative_number = n_t =~ /^-\d+$/
42
- n_t = n_t.sub(/^[[:punct:]]+/, '')
42
+ if strip_punctuation == :all
43
+ n_t = n_t.gsub(/[[:punct:]]/, '')
44
+ else
45
+ n_t = n_t.sub(/^[[:punct:]]+/, '')
46
+ end
43
47
  # this may have 'created' leading/trailing space, so strip
44
48
  n_t.strip!
45
49
  n_t = '-' + n_t if is_negative_number
@@ -92,7 +96,13 @@ module Cul::Hydra::Solrizer
92
96
  base_text << child.text unless child.name == 'nonSort'
93
97
  end
94
98
  end
95
- base_text = ModsFieldable.normalize(base_text, true)
99
+ base_text = ModsFieldable.normalize(base_text, :all)
100
+ # decompose and strip unicode combining characters
101
+ base_text = base_text.unicode_normalize(:nfd)
102
+ base_text.gsub!(/[\u0300-\u036F]/,'')
103
+ # uppercase per Unicode, for ASCII/Latin
104
+ # TODO: decide whether to use full Unicode case, other language options (Turkish, Lithuanian, etc.)
105
+ base_text = base_text.upcase(:ascii)
96
106
  base_text = nil if base_text.empty?
97
107
  base_text
98
108
  end
@@ -1,6 +1,6 @@
1
1
  module Cul
2
2
  module Hydra
3
- VERSION = '1.9.4'
3
+ VERSION = '1.9.5'
4
4
  def self.version
5
5
  VERSION
6
6
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul_hydra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.4
4
+ version: 1.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Armintor
8
8
  - Eric O'Hanlon
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-15 00:00:00.000000000 Z
12
+ date: 2020-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -492,6 +492,7 @@ files:
492
492
  - fixtures/spec/CUL_MODS/mods-subjects.xml
493
493
  - fixtures/spec/CUL_MODS/mods-textual-date.xml
494
494
  - fixtures/spec/CUL_MODS/mods-textual-dates-with-unusual-chars.xml
495
+ - fixtures/spec/CUL_MODS/mods-titles-extended.xml
495
496
  - fixtures/spec/CUL_MODS/mods-titles.xml
496
497
  - fixtures/spec/CUL_MODS/mods-top-level-location-vs-relateditem-location.xml
497
498
  - fixtures/spec/CUL_MODS/mods-unmapped-project.xml
@@ -547,7 +548,7 @@ files:
547
548
  homepage: https://github.com/cul/cul_hydra
548
549
  licenses: []
549
550
  metadata: {}
550
- post_install_message:
551
+ post_install_message:
551
552
  rdoc_options: []
552
553
  require_paths:
553
554
  - app
@@ -565,8 +566,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
565
566
  - !ruby/object:Gem::Version
566
567
  version: '0'
567
568
  requirements: []
568
- rubygems_version: 3.1.2
569
- signing_key:
569
+ rubygems_version: 3.0.8
570
+ signing_key:
570
571
  specification_version: 4
571
572
  summary: ActiveFedora, OM, and Solrizer implementations for CUL repository apps
572
573
  test_files: []