stanford-mods 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +0 -1
- data/lib/stanford-mods/searchworks.rb +2 -2
- data/lib/stanford-mods/version.rb +1 -1
- data/spec/searchworks_gdor_spec.rb +6 -1
- metadata +4 -4
data/.travis.yml
CHANGED
@@ -77,7 +77,6 @@ module Stanford
|
|
77
77
|
# @return [Array<String>] values for author_corp_display
|
78
78
|
def sw_corporate_authors
|
79
79
|
val=@mods_ng_xml.plain_name.select {|n| n.type_at == 'corporate'}.map { |n| n.display_value_w_date }
|
80
|
-
puts val.to_s
|
81
80
|
val
|
82
81
|
end
|
83
82
|
|
@@ -329,7 +328,8 @@ module Stanford
|
|
329
328
|
when 'text'
|
330
329
|
val << 'Thesis' if genres and genres.include? 'thesis'
|
331
330
|
val << 'Book' if issuance and issuance.include? 'monographic'
|
332
|
-
val << 'Journal
|
331
|
+
val << 'Journal/Periodical' if issuance and issuance.include? 'continuing'
|
332
|
+
val << 'Journal/Periodical' if genres and genres.include? 'article'
|
333
333
|
when 'still image'
|
334
334
|
val << 'Image'
|
335
335
|
when 'mixed material'
|
@@ -607,7 +607,12 @@ describe "Searchworks mixin for Stanford::Mods::Record" do
|
|
607
607
|
@smods_rec.from_str(m)
|
608
608
|
@smods_rec.format.should == ['Book']
|
609
609
|
end
|
610
|
-
|
610
|
+
it "should work for a hydrus journal article" do
|
611
|
+
m = "<mods #{@ns_decl}><typeOfResource>text</typeOfResouce><genre>article</genre></mods>"
|
612
|
+
@smods_rec = Stanford::Mods::Record.new
|
613
|
+
@smods_rec.from_str(m)
|
614
|
+
@smods_rec.format.should == ['Journal/Periodical']
|
615
|
+
end
|
611
616
|
it "should choose the format" do
|
612
617
|
m = "<mods #{@ns_decl}><typeOfResource>still image</typeOfResouce></mods>"
|
613
618
|
@smods_rec = Stanford::Mods::Record.new
|
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: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mods
|
@@ -170,7 +170,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
170
|
version: '0'
|
171
171
|
segments:
|
172
172
|
- 0
|
173
|
-
hash: -
|
173
|
+
hash: -3033686945404462688
|
174
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
175
|
none: false
|
176
176
|
requirements:
|
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: '0'
|
180
180
|
segments:
|
181
181
|
- 0
|
182
|
-
hash: -
|
182
|
+
hash: -3033686945404462688
|
183
183
|
requirements: []
|
184
184
|
rubyforge_project:
|
185
185
|
rubygems_version: 1.8.25
|