stanford-mods 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stanford-mods/searchworks.rb +2 -3
- data/lib/stanford-mods/version.rb +1 -1
- data/spec/searchworks_format_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1edee19ce68af157f4912685e670abd888bc4353
|
4
|
+
data.tar.gz: dfed761858e10ec8c4909d28c8f1a245c9a3d8b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31183275be3ff6bffb919d900cdc7ba7cd7f7831d8beb9148d12c63ff6a7263f769bc7bad2248297ddf767ae17629785ff8ef36fd4bfead5590cc8e3e427843b
|
7
|
+
data.tar.gz: 113574dfe94ef773584af8006d127c5773e373d73efdf2535748ea690231d4ff2143c24d900ad58fe568c93ebb1c6ae8d517e2bdc63693be3d3f23f10697f1ce
|
@@ -323,6 +323,7 @@ module Stanford
|
|
323
323
|
val << 'Book' if issuance && issuance.include?('monographic')
|
324
324
|
val << 'Book' if genres && !(genres & book_genres).empty?
|
325
325
|
val << 'Journal/Periodical' if issuance && issuance.include?('continuing')
|
326
|
+
val << 'Archived website' if genres && genres.include?('archived website')
|
326
327
|
when 'three dimensional object'
|
327
328
|
val << 'Object'
|
328
329
|
end
|
@@ -336,6 +337,7 @@ module Stanford
|
|
336
337
|
def sw_genre
|
337
338
|
val = []
|
338
339
|
genres = self.term_values(:genre)
|
340
|
+
types = self.term_values(:typeOfResource)
|
339
341
|
if genres
|
340
342
|
val << genres.map(&:capitalize)
|
341
343
|
val.flatten! if !val.empty?
|
@@ -345,7 +347,6 @@ module Stanford
|
|
345
347
|
end
|
346
348
|
conf_pub = ['conference publication', 'Conference publication', 'Conference Publication']
|
347
349
|
if !(genres & conf_pub).empty?
|
348
|
-
types = self.term_values(:typeOfResource)
|
349
350
|
if types && types.include?('text')
|
350
351
|
val << 'Conference proceedings'
|
351
352
|
val.delete 'Conference publication'
|
@@ -353,7 +354,6 @@ module Stanford
|
|
353
354
|
end
|
354
355
|
gov_pub = ['government publication', 'Government publication', 'Government Publication']
|
355
356
|
if !(genres & gov_pub).empty?
|
356
|
-
types = self.term_values(:typeOfResource)
|
357
357
|
if types && types.include?('text')
|
358
358
|
val << 'Government document'
|
359
359
|
val.delete 'Government publication'
|
@@ -361,7 +361,6 @@ module Stanford
|
|
361
361
|
end
|
362
362
|
tech_rpt = ['technical report', 'Technical report', 'Technical Report']
|
363
363
|
if !(genres & tech_rpt).empty?
|
364
|
-
types = self.term_values(:typeOfResource)
|
365
364
|
if types && types.include?('text')
|
366
365
|
val << 'Technical report'
|
367
366
|
end
|
@@ -284,6 +284,12 @@ describe "Format fields (searchworks.rb)" do
|
|
284
284
|
expect(@smods_rec.format_main).to eq ['Archive/Manuscript']
|
285
285
|
end
|
286
286
|
|
287
|
+
it "Archived website: typeOfResource text, genre 'archived website'" do
|
288
|
+
m = "<mods #{@ns_decl}><typeOfResource>text</typeOfResource><genre authority=\"local\">archived website</genre></mods>"
|
289
|
+
@smods_rec.from_str(m)
|
290
|
+
expect(@smods_rec.format_main).to eq ['Archived website']
|
291
|
+
end
|
292
|
+
|
287
293
|
context "Book, formerly Article: typeOfResource text, genre" do
|
288
294
|
it "'article'" do
|
289
295
|
m = "<mods #{@ns_decl}><typeOfResource>text</typeOfResource><genre authority=\"marcgt\">article</genre></mods>"
|
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.5.
|
4
|
+
version: 1.5.2
|
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: 2016-
|
12
|
+
date: 2016-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mods
|