stanford-mods 0.0.15 → 0.0.16

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.
data/.travis.yml CHANGED
@@ -2,7 +2,6 @@ language: ruby
2
2
  script: rake rspec
3
3
  rvm:
4
4
  - 1.9.3
5
- - 1.9.2
6
5
  - jruby-19mode
7
6
  notifications:
8
7
  email:
@@ -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 / Periodical' if issuance and issuance.include? 'continuing'
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'
@@ -1,6 +1,6 @@
1
1
  module Stanford
2
2
  module Mods
3
3
  # this is the Ruby Gem version
4
- VERSION = "0.0.15"
4
+ VERSION = "0.0.16"
5
5
  end
6
6
  end
@@ -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.15
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-06-25 00:00:00.000000000 Z
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: -914844583045883292
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: -914844583045883292
182
+ hash: -3033686945404462688
183
183
  requirements: []
184
184
  rubyforge_project:
185
185
  rubygems_version: 1.8.25