stanford-mods 1.2.0 → 1.2.1

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
  SHA1:
3
- metadata.gz: 025c7efb3e29b5c56eaf05af7f58eb364e13c8f7
4
- data.tar.gz: 4d66ca23ed45283c8374fa50166f694f63c31bb8
3
+ metadata.gz: dec8a7a5501522cd7e061ee8c78ad8e9155f09ee
4
+ data.tar.gz: 279acc503c49653d0edf63d86909fd7b3679efcc
5
5
  SHA512:
6
- metadata.gz: f4c1b8aaf08deb76e6de29153cd492def619aa884b8841e7c68254ea076da2948d91ab81123f81ee565f1cb41f7ba85ee2a4dff4bec1a4b2f10f72cd77775a44
7
- data.tar.gz: 8b90601ce966f4ac16cac8dd78c255b692eff2bfdaef8dcd889bdc257acdc594f47925baddd705b2d969cc646c3df4295198edefba1f1bd0c6bfe3011232be6f
6
+ metadata.gz: 7a2239d5219fffa8346568392897d2561f7a0c68307329fa4bdbe72dc5ad5d3f24b9aeb3b3fbc4b1085d26fdb19a0eedadd00c439aa93c1313a3726d3b216a18
7
+ data.tar.gz: b03a84ad3ae27ebd0b6222959afc534f2468169f1262659d74645107339b9bb21b6168a55c7252b032f000edb4b3c3e8862983adaf5c4475143c39b08899ea62
@@ -53,10 +53,13 @@ module Stanford
53
53
  def non_collector_person_authors
54
54
  result = []
55
55
  @mods_ng_xml.personal_name.map do |n|
56
- r = n.role
57
- unless (r.authority.include?('marcrelator') && r.value.include?('Collector')) ||
58
- r.roleTerm.valueURI.first == COLLECTOR_ROLE_URI
59
- result << n.display_value_w_date
56
+ unless n.role.size == 0
57
+ n.role.each { |r|
58
+ unless (r.authority.include?('marcrelator') && r.value.include?('Collector')) ||
59
+ r.roleTerm.valueURI.first == COLLECTOR_ROLE_URI
60
+ result << n.display_value_w_date
61
+ end
62
+ }
60
63
  end
61
64
  end
62
65
  result unless result.empty?
@@ -1,6 +1,6 @@
1
1
  module Stanford
2
2
  module Mods
3
3
  # this is the Ruby Gem version
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
6
6
  end
data/spec/name_spec.rb CHANGED
@@ -305,6 +305,16 @@ describe "name/author concepts" do
305
305
  smods_rec.from_str(mods_start + name_snippet + mods_end)
306
306
  expect(smods_rec.non_collector_person_authors).to eq nil
307
307
  end
308
+ it 'no role present' do
309
+ name_snippet =
310
+ <<-EOF
311
+ <name type="personal" usage="primary">
312
+ <namePart>#{name}</namePart>
313
+ </name>
314
+ EOF
315
+ smods_rec.from_str(mods_start + name_snippet + mods_end)
316
+ expect(smods_rec.non_collector_person_authors).to eq nil
317
+ end
308
318
  end
309
319
 
310
320
  context '#collectors_w_dates' do
@@ -417,5 +427,15 @@ describe "name/author concepts" do
417
427
  smods_rec.from_str(mods_start + name_snippet + mods_end)
418
428
  expect(smods_rec.collectors_w_dates).to eq nil
419
429
  end
430
+ it 'no role present' do
431
+ name_snippet =
432
+ <<-EOF
433
+ <name type="personal" usage="primary">
434
+ <namePart>Nobody</namePart>
435
+ </name>
436
+ EOF
437
+ smods_rec.from_str(mods_start + name_snippet + mods_end)
438
+ expect(smods_rec.collectors_w_dates).to eq nil
439
+ end
420
440
  end
421
441
  end
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: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naomi Dushay
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-17 00:00:00.000000000 Z
12
+ date: 2015-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mods
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  requirements: []
143
143
  rubyforge_project:
144
- rubygems_version: 2.4.8
144
+ rubygems_version: 2.4.5.1
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Stanford specific wrangling of MODS metadata